Merge "Fix PhanPluginDuplicateExpressionBinaryOp in DjVuImage (#9)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 7 Apr 2019 09:13:09 +0000 (09:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 7 Apr 2019 09:13:09 +0000 (09:13 +0000)
.phan/config.php
includes/media/DjVuImage.php

index 64197bf..c250bcd 100644 (file)
@@ -90,8 +90,6 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
        // approximate error count: 127
        "PhanParamTooMany",
        // approximate error count: 2
-       "PhanPluginDuplicateExpressionBinaryOp",
-       // approximate error count: 2
        "PhanTraitParentReference",
        // approximate error count: 30
        "PhanTypeArraySuspicious",
index d059cd8..35cbc43 100644 (file)
@@ -108,7 +108,7 @@ class DjVuImage {
                                $this->dumpForm( $file, $chunkLength, $indent + 1 );
                        } else {
                                fseek( $file, $chunkLength, SEEK_CUR );
-                               if ( $chunkLength & 1 == 1 ) {
+                               if ( ( $chunkLength & 1 ) == 1 ) {
                                        // Padding byte between chunks
                                        fseek( $file, 1, SEEK_CUR );
                                }
@@ -166,7 +166,7 @@ class DjVuImage {
        private function skipChunk( $file, $chunkLength ) {
                fseek( $file, $chunkLength, SEEK_CUR );
 
-               if ( $chunkLength & 0x01 == 1 && !feof( $file ) ) {
+               if ( ( $chunkLength & 0x01 ) == 1 && !feof( $file ) ) {
                        // padding byte
                        fseek( $file, 1, SEEK_CUR );
                }