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,8 @@ 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 string $viewPath
77+ * @param FileLocator|null $loader
7978 */
8079 public function __construct (ViewConfig $ config , ?string $ viewPath = null , $ loader = null , ?bool $ debug = null , ?LoggerInterface $ logger = null )
8180 {
@@ -90,9 +89,6 @@ public function __construct(ViewConfig $config, ?string $viewPath = null, $loade
9089 *
9190 * Parses pseudo-variables contained in the specified template view,
9291 * replacing them with any data that has already been set.
93- *
94- * @param array $options
95- * @param bool $saveData
9692 */
9793 public function render (string $ view , ?array $ options = null , ?bool $ saveData = null ): string
9894 {
@@ -155,7 +151,6 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n
155151 * replacing them with any data that has already been set.
156152 *
157153 * @param array $options
158- * @param bool $saveData
159154 */
160155 public function renderString (string $ template , ?array $ options = null , ?bool $ saveData = null ): string
161156 {
@@ -187,8 +182,8 @@ public function renderString(string $template, ?array $options = null, ?bool $sa
187182 * so that the variable is correctly handled within the
188183 * parsing itself, and contexts (including raw) are respected.
189184 *
190- * @param string $context The context to escape it for: html, css, js, url, raw
191- * If 'raw', no escaping will happen
185+ * @param string|null $context The context to escape it for: html, css, js, url, raw
186+ * If 'raw', no escaping will happen
192187 */
193188 public function setData (array $ data = [], ?string $ context = null ): RendererInterface
194189 {
@@ -503,9 +498,9 @@ public function setConditionalDelimiters($leftDelimiter = '{', $rightDelimiter =
503498 * Handles replacing a pseudo-variable with the actual content. Will double-check
504499 * for escaping brackets.
505500 *
506- * @param mixed $pattern
507- * @param string $content
508- * @param string $template
501+ * @param array|string $pattern
502+ * @param string $content
503+ * @param string $template
509504 */
510505 protected function replaceSingle ($ pattern , $ content , $ template , bool $ escape = false ): string
511506 {
@@ -698,9 +693,9 @@ public function removePlugin(string $alias)
698693 * Converts an object to an array, respecting any
699694 * toArray() methods on an object.
700695 *
701- * @param mixed $value
696+ * @param object $value
702697 *
703- * @return mixed
698+ * @return array
704699 */
705700 protected function objectToArray ($ value )
706701 {
0 commit comments