diff --git a/phpstan-baseline.php b/phpstan-baseline.php index edf7e2771bfb..b02160f16183 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -2786,10 +2786,5 @@ 'count' => 1, 'path' => __DIR__ . '/system/View/View.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Property CodeIgniter\\\\View\\\\View\\:\\:\\$tempData has no type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/View/View.php', -]; return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; diff --git a/system/Config/Services.php b/system/Config/Services.php index 66d0532e5e47..b18b99e91a91 100644 --- a/system/Config/Services.php +++ b/system/Config/Services.php @@ -445,7 +445,7 @@ public static function pager(?PagerConfig $config = null, ?RendererInterface $vi } $config ??= config(PagerConfig::class); - $view ??= AppServices::renderer(); + $view ??= AppServices::renderer(null, null, false); return new Pager($config, $view); } diff --git a/system/Pager/Pager.php b/system/Pager/Pager.php index 2c0179a69dc3..11103d56ce9c 100644 --- a/system/Pager/Pager.php +++ b/system/Pager/Pager.php @@ -123,7 +123,7 @@ protected function displayLinks(string $group, string $template): string $pager = new PagerRenderer($this->getDetails($group)); return $this->view->setVar('pager', $pager) - ->render($this->config->templates[$template], null, false); + ->render($this->config->templates[$template]); } /** diff --git a/system/View/View.php b/system/View/View.php index 164d67642305..08497438845a 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -29,14 +29,16 @@ class View implements RendererInterface use ViewDecoratorTrait; /** - * Data that is made available to the Views. + * Saved Data. * * @var array */ protected $data = []; /** - * Merge savedData and userData + * Data for the variables that are available in the Views. + * + * @var array|null */ protected $tempData; @@ -48,7 +50,7 @@ class View implements RendererInterface protected $viewPath; /** - * The render variables + * Data for rendering including Caching and Debug Toolbar data. * * @var array */