diff options
-rw-r--r-- | includes/HookContainer/HookContainer.php | 3 | ||||
-rw-r--r-- | includes/http/MwHttpRequestToResponseInterfaceAdapter.php | 3 | ||||
-rw-r--r-- | includes/media/JpegHandler.php | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/includes/HookContainer/HookContainer.php b/includes/HookContainer/HookContainer.php index 749f1cd64452..bb9206f787d8 100644 --- a/includes/HookContainer/HookContainer.php +++ b/includes/HookContainer/HookContainer.php @@ -403,8 +403,7 @@ class HookContainer implements SalvageableService { * @return bool Whether the hook has a handler registered to it */ public function isRegistered( string $hook ): bool { - // @phan-suppress-next-line MediaWikiNoEmptyIfDefined - return !empty( $this->getHandlers( $hook ) ); + return (bool)$this->getHandlers( $hook ); } /** diff --git a/includes/http/MwHttpRequestToResponseInterfaceAdapter.php b/includes/http/MwHttpRequestToResponseInterfaceAdapter.php index 0206c6196efb..26fac9e079b9 100644 --- a/includes/http/MwHttpRequestToResponseInterfaceAdapter.php +++ b/includes/http/MwHttpRequestToResponseInterfaceAdapter.php @@ -106,8 +106,7 @@ class MwHttpRequestToResponseInterfaceAdapter implements ResponseInterface { * `execute`. The best way of determining whether a MWHttpRequest contains response information is to check * whether its headers list is empty. */ - // @phan-suppress-next-line MediaWikiNoEmptyIfDefined - if ( empty( $mwHttpRequest->getResponseHeaders() ) ) { + if ( !$mwHttpRequest->getResponseHeaders() ) { throw new LogicException( 'Trying to get response information from a request that was not yet executed' ); } } diff --git a/includes/media/JpegHandler.php b/includes/media/JpegHandler.php index 0036ef5a835c..b82a80c65721 100644 --- a/includes/media/JpegHandler.php +++ b/includes/media/JpegHandler.php @@ -270,15 +270,13 @@ class JpegHandler extends ExifBitmapHandler { // Make a regex out of the source data to match it to an array of color // spaces in a case-insensitive way $colorSpaceRegex = '/' . preg_quote( $data[0], '/' ) . '/i'; - // @phan-suppress-next-line MediaWikiNoEmptyIfDefined - if ( empty( preg_grep( $colorSpaceRegex, $colorSpaces ) ) ) { + if ( !preg_grep( $colorSpaceRegex, $colorSpaces ) ) { // We can't establish that this file matches the color space, don't process it return false; } $profileRegex = '/' . preg_quote( $data[1], '/' ) . '/i'; - // @phan-suppress-next-line MediaWikiNoEmptyIfDefined - if ( empty( preg_grep( $profileRegex, $oldProfileStrings ) ) ) { + if ( !preg_grep( $profileRegex, $oldProfileStrings ) ) { // We can't establish that this file has the expected ICC profile, don't process it return false; } |