Browse Source

Bump up phpstan and psalm.

ADmad 3 years ago
parent
commit
36381715fa

+ 2 - 2
.phive/phars.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phive xmlns="https://phar.io/phive">
-  <phar name="phpstan" version="1.9.16" installed="1.9.16" location="./tools/phpstan" copy="false"/>
-  <phar name="psalm" version="5.7.4" installed="5.7.4" location="./tools/psalm" copy="false"/>
+  <phar name="phpstan" version="1.10.6" installed="1.10.6" location="./tools/phpstan" copy="false"/>
+  <phar name="psalm" version="5.8.0" installed="5.8.0" location="./tools/psalm" copy="false"/>
 </phive>

+ 1 - 0
src/Core/StaticConfigTrait.php

@@ -157,6 +157,7 @@ trait StaticConfigTrait
         if (!isset(static::$_config[$config])) {
             return false;
         }
+        /** @phpstan-ignore-next-line */
         if (isset(static::$_registry)) {
             static::$_registry->unload($config);
         }

+ 0 - 2
src/Database/Driver/Mysql.php

@@ -223,8 +223,6 @@ class Mysql extends Driver
                 $this->featureVersions[$this->serverType][$feature->value],
                 '>='
             ),
-
-            default => false,
         };
     }
 

+ 0 - 2
src/Database/Driver/Postgres.php

@@ -188,8 +188,6 @@ class Postgres extends Driver
             DriverFeatureEnum::WINDOW => true,
 
             DriverFeatureEnum::DISABLE_CONSTRAINT_WITHOUT_TRANSACTION => false,
-
-            default => false,
         };
     }
 

+ 0 - 2
src/Database/Driver/Sqlite.php

@@ -206,8 +206,6 @@ class Sqlite extends Driver
                 $this->featureVersions[$feature->value],
                 '>='
             ),
-
-            default => false,
         };
     }
 

+ 0 - 2
src/Database/Driver/Sqlserver.php

@@ -277,8 +277,6 @@ class Sqlserver extends Driver
             DriverFeatureEnum::WINDOW => true,
 
             DriverFeatureEnum::JSON => false,
-
-            default => false,
         };
     }
 

+ 0 - 1
src/Database/Query.php

@@ -1793,7 +1793,6 @@ abstract class Query implements ExpressionInterface, Stringable
                             }
                         }
                     } elseif ($piece instanceof ExpressionInterface) {
-                        /** @psalm-suppress PossiblyUndefinedMethod */
                         $this->_parts[$name][$i] = clone $piece;
                     }
                 }

+ 0 - 1
src/Utility/Hash.php

@@ -1115,7 +1115,6 @@ class Hash
             next($intersection);
         }
 
-        /** @phpstan-ignore-next-line */
         return $data + $compare;
     }