1111
1212namespace CodeIgniter \View ;
1313
14+ use CodeIgniter \Autoloader \FileLocator ;
1415use CodeIgniter \View \Exceptions \ViewException ;
1516use Config \View as ViewConfig ;
1617use ParseError ;
@@ -72,10 +73,7 @@ class Parser extends View
7273 /**
7374 * Constructor
7475 *
75- * @param string $viewPath
76- * @param mixed $loader
77- * @param bool $debug
78- * @param LoggerInterface $logger
76+ * @param FileLocator|null $loader
7977 */
8078 public function __construct (ViewConfig $ config , ?string $ viewPath = null , $ loader = null , ?bool $ debug = null , ?LoggerInterface $ logger = null )
8179 {
@@ -90,9 +88,6 @@ public function __construct(ViewConfig $config, ?string $viewPath = null, $loade
9088 *
9189 * Parses pseudo-variables contained in the specified template view,
9290 * replacing them with any data that has already been set.
93- *
94- * @param array $options
95- * @param bool $saveData
9691 */
9792 public function render (string $ view , ?array $ options = null , ?bool $ saveData = null ): string
9893 {
@@ -153,9 +148,6 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n
153148 *
154149 * Parses pseudo-variables contained in the specified string,
155150 * replacing them with any data that has already been set.
156- *
157- * @param array $options
158- * @param bool $saveData
159151 */
160152 public function renderString (string $ template , ?array $ options = null , ?bool $ saveData = null ): string
161153 {
@@ -187,8 +179,8 @@ public function renderString(string $template, ?array $options = null, ?bool $sa
187179 * so that the variable is correctly handled within the
188180 * parsing itself, and contexts (including raw) are respected.
189181 *
190- * @param string $context The context to escape it for: html, css, js, url, raw
191- * If 'raw', no escaping will happen
182+ * @param string|null $context The context to escape it for: html, css, js, url, raw
183+ * If 'raw', no escaping will happen
192184 */
193185 public function setData (array $ data = [], ?string $ context = null ): RendererInterface
194186 {
@@ -503,9 +495,9 @@ public function setConditionalDelimiters($leftDelimiter = '{', $rightDelimiter =
503495 * Handles replacing a pseudo-variable with the actual content. Will double-check
504496 * for escaping brackets.
505497 *
506- * @param mixed $pattern
507- * @param string $content
508- * @param string $template
498+ * @param array|string $pattern
499+ * @param string $content
500+ * @param string $template
509501 */
510502 protected function replaceSingle ($ pattern , $ content , $ template , bool $ escape = false ): string
511503 {
@@ -698,9 +690,9 @@ public function removePlugin(string $alias)
698690 * Converts an object to an array, respecting any
699691 * toArray() methods on an object.
700692 *
701- * @param mixed $value
693+ * @param array|bool|float|int|object|string|null $value
702694 *
703- * @return mixed
695+ * @return array|bool|float|int|string|null
704696 */
705697 protected function objectToArray ($ value )
706698 {
0 commit comments