Browse Source

Upgrade to psalm 5.7

Corey Taylor 3 years ago
parent
commit
fae994f2b3
3 changed files with 4 additions and 2 deletions
  1. 1 1
      .phive/phars.xml
  2. 1 0
      psalm.xml
  3. 2 1
      src/ORM/Table.php

+ 1 - 1
.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.6.0" installed="5.6.0" location="./tools/psalm" copy="false"/>
+  <phar name="psalm" version="5.7.1" installed="5.7.1" location="./tools/psalm" copy="false"/>
 </phive>

+ 1 - 0
psalm.xml

@@ -42,6 +42,7 @@
             <errorLevel type="suppress">
                 <file name="src/Cache/Engine/ApcuEngine.php" />
                 <file name="src/Database/Driver/Sqlserver.php" />
+                <file name="src/Database/Statement/SqlserverStatement.php" />
             </errorLevel>
         </UndefinedConstant>
         <RedundantPropertyInitializationCheck errorLevel="suppress"/>

+ 2 - 1
src/ORM/Table.php

@@ -1587,7 +1587,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
      *   transaction (default: true)
      * - defaults: Whether to use the search criteria as default values for the new entity (default: true)
      *
-     * @param \Cake\ORM\Query\SelectQuery |callable|array $search The criteria to find existing
+     * @param \Cake\ORM\Query\SelectQuery|callable|array $search The criteria to find existing
      *   records by. Note that when you pass a query object you'll have to use
      *   the 2nd arg of the method to modify the entity data before saving.
      * @param callable|null $callback A callback that will be invoked for newly
@@ -2587,6 +2587,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
     {
         assert(empty($options) || !array_is_list($options), 'Finder options should be an associative array not a list');
 
+        /** @var array<string, mixed> $options */
         $query->applyOptions($options);
         $options = $query->getOptions();
         $finder = 'find' . $type;