Browse Source

Merge pull request #13270 from cakephp/4.x-psalm

4.x psalm
Mark Sch 6 years ago
parent
commit
97fc87e98a
3 changed files with 8 additions and 33 deletions
  1. 1 1
      composer.json
  2. 6 31
      psalm-baseline.xml
  3. 1 1
      src/ORM/Query.php

+ 1 - 1
composer.json

@@ -103,7 +103,7 @@
         "test": "phpunit",
         "test-coverage": "phpunit --coverage-clover=clover.xml",
         "stan": "phpstan.phar analyse src/ && psalm.phar --show-info=false",
-        "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 psalm/phar:^3.0 && mv composer.backup composer.json"
+        "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 psalm/phar:^3.3 && mv composer.backup composer.json"
     },
     "config": {
         "sort-packages": true,

+ 6 - 31
psalm-baseline.xml

@@ -268,7 +268,7 @@
     <MissingConstructor occurrences="1">
       <code>$_io</code>
     </MissingConstructor>
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>
@@ -303,7 +303,7 @@
     </DeprecatedClass>
   </file>
   <file src="src/Console/TaskRegistry.php">
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>
@@ -388,7 +388,7 @@
     </PropertyNotSetInConstructor>
   </file>
   <file src="src/Controller/ComponentRegistry.php">
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>
@@ -464,11 +464,6 @@
       <code>include $file</code>
     </UnresolvableInclude>
   </file>
-  <file src="src/Core/ObjectRegistry.php">
-    <PossiblyNullArgument occurrences="1">
-      <code>$className</code>
-    </PossiblyNullArgument>
-  </file>
   <file src="src/Core/StaticConfigTrait.php">
     <PossiblyInvalidArgument occurrences="1">
       <code>$key</code>
@@ -1650,7 +1645,7 @@
     </PossiblyInvalidIterator>
   </file>
   <file src="src/Mailer/TransportRegistry.php">
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>
@@ -1861,7 +1856,7 @@
     </PropertyNotSetInConstructor>
   </file>
   <file src="src/ORM/BehaviorRegistry.php">
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>
@@ -1958,9 +1953,6 @@
       <code>$method</code>
       <code>$arguments</code>
     </MissingParamType>
-    <MoreSpecificImplementedParamType occurrences="1">
-      <code>$table</code>
-    </MoreSpecificImplementedParamType>
     <NullArgument occurrences="1">
       <code>null</code>
     </NullArgument>
@@ -2562,12 +2554,6 @@
     <InvalidOperand occurrences="1">
       <code>$check[$position]</code>
     </InvalidOperand>
-    <PossiblyInvalidArgument occurrences="4">
-      <code>$file</code>
-      <code>$file</code>
-      <code>$file</code>
-      <code>$file</code>
-    </PossiblyInvalidArgument>
     <PossiblyNullArgument occurrences="2">
       <code>$check-&gt;getClientFilename()</code>
       <code>$operator</code>
@@ -2651,17 +2637,6 @@
       <code>$entity</code>
       <code>$entity</code>
     </PossiblyInvalidArgument>
-    <PossiblyInvalidMethodCall occurrences="9">
-      <code>getPrimaryKey</code>
-      <code>getSchema</code>
-      <code>getPrimaryKey</code>
-      <code>newEmptyEntity</code>
-      <code>getSchema</code>
-      <code>getAlias</code>
-      <code>getValidator</code>
-      <code>getSchema</code>
-      <code>getSchema</code>
-    </PossiblyInvalidMethodCall>
     <PossiblyNullReference occurrences="1">
       <code>getTarget</code>
     </PossiblyNullReference>
@@ -2758,7 +2733,7 @@
     </PossiblyNullOperand>
   </file>
   <file src="src/View/HelperRegistry.php">
-    <MoreSpecificImplementedParamType occurrences="2">
+    <MoreSpecificImplementedParamType occurrences="1">
       <code>$class</code>
       <code>$class</code>
     </MoreSpecificImplementedParamType>

+ 1 - 1
src/ORM/Query.php

@@ -1204,7 +1204,7 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface
      * This changes the query type to be 'update'.
      * Can be combined with set() and where() methods to create update queries.
      *
-     * @param string|null $table Unused parameter.
+     * @param string|\Cake\Database\ExpressionInterface|null $table Unused parameter.
      * @return $this
      */
     public function update($table = null)