Browse Source

Fix phpstan's invalid error

ADmad 6 years ago
parent
commit
bba86e666e
2 changed files with 4 additions and 2 deletions
  1. 3 0
      phpstan.neon
  2. 1 2
      src/View/HelperRegistry.php

+ 3 - 0
phpstan.neon

@@ -74,6 +74,9 @@ parameters:
         -
             message: '#Parameter \#1 \$connection of method Cake\\Database\\Schema\\SqlGeneratorInterface::(create|drop|truncate)Sql\(\) expects Cake\\Database\\Connection, Cake\\Datasource\\ConnectionInterface given#'
             path: 'src/TestSuite/Fixture/TestFixture.php'
+        -
+            message: '#Method Cake\\View\\HelperRegistry::__get\(\) should return Cake\\View\\Helper|null but returns object#'
+            path: 'src/View/HelperRegistry.php'
     earlyTerminatingMethodCalls:
         Cake\Console\Shell:
             - abort

+ 1 - 2
src/View/HelperRegistry.php

@@ -88,8 +88,7 @@ class HelperRegistry extends ObjectRegistry implements EventDispatcherInterface
      * Provide public read access to the loaded objects
      *
      * @param string $name Name of property to read
-     * @return object|null
-     * @psalm-return \Cake\View\Helper|null
+     * @return \Cake\View\Helper|null
      */
     public function __get(string $name)
     {