diff --git a/app/Config/Kint.php b/app/Config/Kint.php index 7e0a0157c065..cc8b54592b6b 100644 --- a/app/Config/Kint.php +++ b/app/Config/Kint.php @@ -3,7 +3,10 @@ namespace Config; use CodeIgniter\Config\BaseConfig; +use Kint\Parser\ConstructablePluginInterface; use Kint\Renderer\AbstractRenderer; +use Kint\Renderer\Rich\TabPluginInterface; +use Kint\Renderer\Rich\ValuePluginInterface; /** * -------------------------------------------------------------------------- @@ -23,7 +26,12 @@ class Kint extends BaseConfig |-------------------------------------------------------------------------- */ + /** + * @var array + * @phpstan-var list|ConstructablePluginInterface> + */ public $plugins; + public int $maxDepth = 6; public bool $displayCalledFrom = true; public bool $expanded = false; @@ -36,7 +44,17 @@ class Kint extends BaseConfig public string $richTheme = 'aante-light.css'; public bool $richFolder = false; public int $richSort = AbstractRenderer::SORT_FULL; + + /** + * @var array + * @phpstan-var array> + */ public $richObjectPlugins; + + /** + * @var array + * @phpstan-var array> + */ public $richTabPlugins; /* diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index ecea16206654..fb44007e5c72 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -44,7 +44,7 @@ abstract class BaseController extends Controller // protected $session; /** - * Constructor. + * @return void */ public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 7f867e95ffc4..59343333099a 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -4,7 +4,7 @@ class Home extends BaseController { - public function index() + public function index(): string { return view('welcome_message'); } diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 26a2bbdf1afb..6df649cb8bdc 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -1,31 +1,6 @@ '#^Property Config\\\\Kint\\:\\:\\$plugins has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/app/Config/Kint.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Config\\\\Kint\\:\\:\\$richObjectPlugins has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/app/Config/Kint.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Config\\\\Kint\\:\\:\\$richTabPlugins has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/app/Config/Kint.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method App\\\\Controllers\\\\BaseController\\:\\:initController\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/app/Controllers/BaseController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method App\\\\Controllers\\\\Home\\:\\:index\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/app/Controllers/Home.php', -]; $ignoreErrors[] = [ 'message' => '#^Method CodeIgniter\\\\Autoloader\\\\Autoloader\\:\\:discoverComposerNamespaces\\(\\) has no return type specified\\.$#', 'count' => 1,