Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F585412
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/includes/ResourceLoader/ResourceLoader.php b/includes/ResourceLoader/ResourceLoader.php
index 5bb1a34f148..37784845e48 100644
--- a/includes/ResourceLoader/ResourceLoader.php
+++ b/includes/ResourceLoader/ResourceLoader.php
@@ -1280,8 +1280,7 @@ MESSAGE;
*/
public static function ensureNewline( $str ) {
$end = substr( $str, -1 );
- // @phan-suppress-next-line PhanImpossibleTypeComparison
- if ( $end === false || $end === '' || $end === "\n" ) {
+ if ( $end === '' || $end === "\n" ) {
return $str;
}
return $str . "\n";
diff --git a/includes/language/ConverterRule.php b/includes/language/ConverterRule.php
index 75969861359..27a21ec98ea 100644
--- a/includes/language/ConverterRule.php
+++ b/includes/language/ConverterRule.php
@@ -110,8 +110,7 @@ class ConverterRule {
$flags[$validFlags[$ff]] = true;
}
}
- // @phan-suppress-next-line PhanRedundantCondition
- $text = strval( substr( $text, $sepPos + 1 ) );
+ $text = substr( $text, $sepPos + 1 );
}
if ( !$flags ) {
diff --git a/includes/language/MessageCache.php b/includes/language/MessageCache.php
index 0855d9c4c4b..17d0ae20b4a 100644
--- a/includes/language/MessageCache.php
+++ b/includes/language/MessageCache.php
@@ -1289,8 +1289,7 @@ class MessageCache implements LoggerAwareInterface {
// Message page exists as an override of a software messages
if ( substr( $entry, 0, 1 ) === ' ' ) {
// The message exists and is not '!TOO BIG' or '!ERROR'
- // @phan-suppress-next-line PhanRedundantCondition
- return (string)substr( $entry, 1 );
+ return substr( $entry, 1 );
} elseif ( $entry === '!NONEXISTENT' ) {
// The text might be '-' or missing due to some data loss
return false;
@@ -1339,8 +1338,7 @@ class MessageCache implements LoggerAwareInterface {
$this->cache->setField( $code, $title, $entry );
}
// The message exists, so make sure a string is returned
- // @phan-suppress-next-line PhanRedundantCondition
- return (string)substr( $entry, 1 );
+ return substr( $entry, 1 );
}
$this->cache->setField( $code, $title, '!NONEXISTENT' );
diff --git a/includes/libs/filebackend/MemoryFileBackend.php b/includes/libs/filebackend/MemoryFileBackend.php
index 87f75a0ac5f..dbdf6e99aa0 100644
--- a/includes/libs/filebackend/MemoryFileBackend.php
+++ b/includes/libs/filebackend/MemoryFileBackend.php
@@ -239,10 +239,7 @@ class MemoryFileBackend extends FileBackendStore {
foreach ( $this->files as $path => $data ) {
if ( strpos( $path, $prefix ) === 0 ) {
$relPath = substr( $path, $prefixLen );
- // @phan-suppress-next-line PhanImpossibleTypeComparisonInLoop
- if ( $relPath === false ) {
- continue;
- } elseif ( strpos( $relPath, '/' ) === false ) {
+ if ( strpos( $relPath, '/' ) === false ) {
continue; // just a file
}
$parts = array_slice( explode( '/', $relPath ), 0, -1 ); // last part is file name
@@ -269,10 +266,10 @@ class MemoryFileBackend extends FileBackendStore {
foreach ( $this->files as $path => $data ) {
if ( strpos( $path, $prefix ) === 0 ) {
$relPath = substr( $path, $prefixLen );
- // @phan-suppress-next-line PhanImpossibleTypeComparisonInLoop
- if ( $relPath === false ) {
- continue;
- } elseif ( !empty( $params['topOnly'] ) && strpos( $relPath, '/' ) !== false ) {
+ if (
+ $relPath === '' ||
+ ( !empty( $params['topOnly'] ) && strpos( $relPath, '/' ) !== false )
+ ) {
continue;
}
$files[] = $relPath;
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:33 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227816
Default Alt Text
(3 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment