Skip to content

Commit

Permalink
Fix QA
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Sep 14, 2022
1 parent 7ea8b53 commit 1e30337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"phpunit/phpunit": "~7.5.20 || ^8",
"inpsyde/php-coding-standards": "^1",
"vimeo/psalm": "^4.27.0",
"mockery/mockery": "~1.5.1",
"mockery/mockery": "~1.3.6",
"brain/monkey": "^2.6.1",
"inpsyde/wp-stubs": "dev-main"
},
Expand All @@ -41,7 +41,7 @@
"prefer-stable": true,
"scripts": {
"cs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs",
"psalm": "@php ./vendor/vimeo/psalm/psalm",
"psalm": "@php ./vendor/vimeo/psalm/psalm --no-cache --output-format=compact",
"tests": "@php ./vendor/phpunit/phpunit/phpunit",
"tests:no-cov": "@php ./vendor/phpunit/phpunit/phpunit --no-coverage",
"phpcompat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -p . --standard=PHPCompatibility --ignore=*/vendor/* --extensions=php --basepath=./ --runtime-set testVersion 7.1-",
Expand Down
4 changes: 3 additions & 1 deletion src/WpContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ final public static function new(): WpContext
*/
final public static function determine(): WpContext
{
/** @psalm-suppress RedundantCondition */
$installing = defined('WP_INSTALLING') && WP_INSTALLING;
/** @psalm-suppress RedundantCondition */
$xmlRpc = defined('XMLRPC_REQUEST') && XMLRPC_REQUEST;
$isCore = defined('ABSPATH');
$isCli = defined('WP_CLI');
Expand Down Expand Up @@ -138,7 +140,7 @@ private static function isLoginRequest(): bool
{
/** TODO: we'll just use is_login_screen() when 6.1 will be the min WP supported version */
if (function_exists('is_login_screen')) {
return is_login_screen();
return is_login_screen() !== false;
}

if (!empty($_REQUEST['interim-login'])) { // phpcs:ignore
Expand Down

0 comments on commit 1e30337

Please sign in to comment.