Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency vimeo/psalm to v5 #334

Merged
merged 2 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"php-stubs/wordpress-stubs": "^6.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpunit/php-code-coverage": "^9.2",
"vimeo/psalm": "^4.7",
"vimeo/psalm": "^5.0",
"wildwolf/wordpress-test-library-stubs": "^6.0",
"wp-cli/i18n-command": "^2.2",
"wp-coding-standards/wpcs": "^2.3",
Expand Down
189 changes: 99 additions & 90 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/class-inputfactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static function get_attributes( array $params ): string {
}

/**
* @psalm-param HelpArgs $args
* @psalm-param HelpArgs&mixed[] $args
*/
private static function render_help( array $args ): void {
if ( ! empty( $args['help'] ) ) {
Expand Down
1 change: 1 addition & 0 deletions inc/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function init(): void {
/**
* @psalm-param array<class-string,string> $providers
* @psalm-return array<class-string,string>
* @psalm-suppress MoreSpecificReturnType, LessSpecificReturnStatement
*/
public function two_factor_providers( array $providers ): array {
$providers[ TwoFactor_Provider_WebAuthn::class ] = __DIR__ . '/class-twofactor-provider-webauthn.php';
Expand Down
1 change: 0 additions & 1 deletion inc/class-webauthn-provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function get_label() {
* @return void
*/
public function authentication_page( $user ) {
/** @psalm-suppress UnresolvableInclude */
require_once ABSPATH . '/wp-admin/includes/template.php';

if ( ! is_ssl() ) {
Expand Down
11 changes: 11 additions & 0 deletions stubs/wordpress.stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ function wp_send_json_error( $data = null, $status_code = null, $options = 0 ) {
* @psalm-return never-return
*/
function wp_send_json( $response, $status_code = null, $options = 0 ) {}

/**
* @param string $id
* @param string $title
* @param callable $callback
* @param string $page
* @param string $section
* @psalm-param array{class?: string, label_for?: string, ...} $args
* @return void
*/
function add_settings_field( $id, $title, $callback, $page, $section = 'default', $args = array() ) {}
}