Browse Source

Merge pull request #12930 from cakephp/4.x-phpstan

Fix error reported by phpstan.
Mark Story 7 years ago
parent
commit
840bbccc34
2 changed files with 1 additions and 2 deletions
  1. 0 1
      phpstan.neon
  2. 1 1
      src/Datasource/QueryInterface.php

+ 0 - 1
phpstan.neon

@@ -30,7 +30,6 @@ parameters:
         - '#Static property Cake\\Chronos\\(Date|Chronos|MutableDate|MutableDateTime)::\$diffFormatter \(Cake\\Chronos\\DifferenceFormatter\) does not accept Cake\\I18n\\RelativeTimeFormatter#'
         - '#Return type \(void\) of method Cake\\Shell\\[A-Za-z]+Shell::main\(\) should be compatible with return type \(bool|int|null\) of method Cake\\Console\\Shell::main\(\)#'
         - '#Property Cake\\TestSuite\\Fixture\\TestFixture::\$_schema \(Cake\\Database\\Schema\\SqlGeneratorInterface&Cake\\Database\\Schema\\TableSchemaInterface\) does not accept Cake\\Database\\Schema\\TableSchemaInterface#'
-        - '#Method Cake\\ORM\\Query::find\(\) should return \$this\(Cake\\Datasource\\QueryInterface\) but returns Cake\\ORM\\Query#'
         -
             message: '#Offset mixed does not exist on array\(\)|array\(2 => mixed\)|array\(string, string\)#'
             path: 'src/Database/Dialect/SqlserverDialectTrait.php'

+ 1 - 1
src/Datasource/QueryInterface.php

@@ -121,7 +121,7 @@ interface QueryInterface
      *
      * @param string $finder The finder method to use.
      * @param array $options The options for the finder.
-     * @return $this Returns a modified query.
+     * @return \Cake\Datasource\QueryInterface Returns a modified query.
      */
     public function find($finder, array $options = []);