Browse Source

Removes need for one baseline silencing.

mscherer 4 years ago
parent
commit
8a92cfb447
2 changed files with 3 additions and 6 deletions
  1. 0 5
      phpstan-baseline.neon
  2. 3 1
      src/Core/ClassLoader.php

+ 0 - 5
phpstan-baseline.neon

@@ -156,11 +156,6 @@ parameters:
 			path: src/Controller/ControllerFactory.php
 
 		-
-			message: "#^Parameter \\#1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\)\\: void, array\\(\\$this\\(Cake\\\\Core\\\\ClassLoader\\), 'loadClass'\\) given\\.$#"
-			count: 1
-			path: src/Core/ClassLoader.php
-
-		-
 			message: "#^Array \\(array\\<TObject\\>\\) does not accept object\\.$#"
 			count: 1
 			path: src/Core/ObjectRegistry.php

+ 3 - 1
src/Core/ClassLoader.php

@@ -37,7 +37,9 @@ class ClassLoader
      */
     public function register(): void
     {
-        spl_autoload_register([$this, 'loadClass']);
+        /** @var callable $callable */
+        $callable = [$this, 'loadClass'];
+        spl_autoload_register($callable);
     }
 
     /**