Skip to content

Commit b940cfd

Browse files
committed
View module typos
1 parent 8ed08be commit b940cfd

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

system/View/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function __construct($config, string $viewPath = null, $loader = null, bo
118118
*
119119
* @return string
120120
*/
121-
public function render(string $view, array $options = null, $saveData = null): string
121+
public function render(string $view, array $options = null, bool $saveData = null): string
122122
{
123123
$start = microtime(true);
124124
if (is_null($saveData))
@@ -185,7 +185,7 @@ public function render(string $view, array $options = null, $saveData = null): s
185185
*
186186
* @return string
187187
*/
188-
public function renderString(string $template, array $options = null, $saveData = null): string
188+
public function renderString(string $template, array $options = null, bool $saveData = null): string
189189
{
190190
$start = microtime(true);
191191
if (is_null($saveData))
@@ -599,7 +599,7 @@ protected function replaceSingle($pattern, $content, $template, bool $escape = f
599599
*
600600
* @return string
601601
*/
602-
protected function prepareReplacement(array $matches, string $replace, bool $escape = true)
602+
protected function prepareReplacement(array $matches, string $replace, bool $escape = true): string
603603
{
604604
$orig = array_shift($matches);
605605

system/View/Plugins.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function previousURL(array $params = [])
6868
*
6969
* @return string
7070
*/
71-
public static function mailto(array $params = [])
71+
public static function mailto(array $params = []): string
7272
{
7373
$email = $params['email'] ?? '';
7474
$title = $params['title'] ?? '';
@@ -84,7 +84,7 @@ public static function mailto(array $params = [])
8484
*
8585
* @return string
8686
*/
87-
public static function safeMailto(array $params = [])
87+
public static function safeMailto(array $params = []): string
8888
{
8989
$email = $params['email'] ?? '';
9090
$title = $params['title'] ?? '';
@@ -100,7 +100,7 @@ public static function safeMailto(array $params = [])
100100
*
101101
* @return string
102102
*/
103-
public static function lang(array $params = [])
103+
public static function lang(array $params = []): string
104104
{
105105
$line = array_shift($params);
106106

@@ -114,7 +114,7 @@ public static function lang(array $params = [])
114114
*
115115
* @return string
116116
*/
117-
public static function ValidationErrors(array $params = [])
117+
public static function ValidationErrors(array $params = []): string
118118
{
119119
$validator = \Config\Services::validation();
120120
if (empty($params))
@@ -130,7 +130,7 @@ public static function ValidationErrors(array $params = [])
130130
/**
131131
* @param array $params
132132
*
133-
* @return string|
133+
* @return string|false
134134
*/
135135
public static function route(array $params = [])
136136
{
@@ -144,7 +144,7 @@ public static function route(array $params = [])
144144
*
145145
* @return string
146146
*/
147-
public static function siteURL(array $params = [])
147+
public static function siteURL(array $params = []): string
148148
{
149149
return site_url(...$params);
150150
}

system/View/RendererInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface RendererInterface
6060
*
6161
* @return string
6262
*/
63-
public function render(string $view, array $options = null, $saveData = false): string;
63+
public function render(string $view, array $options = null, bool $saveData = false): string;
6464

6565
//--------------------------------------------------------------------
6666

@@ -78,7 +78,7 @@ public function render(string $view, array $options = null, $saveData = false):
7878
*
7979
* @return string
8080
*/
81-
public function renderString(string $view, array $options = null, $saveData = false): string;
81+
public function renderString(string $view, array $options = null, bool $saveData = false): string;
8282

8383
//--------------------------------------------------------------------
8484

system/View/View.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function __construct($config, string $viewPath = null, $loader = null, bo
179179
*
180180
* @return string
181181
*/
182-
public function render(string $view, array $options = null, $saveData = null): string
182+
public function render(string $view, array $options = null, bool $saveData = null): string
183183
{
184184
$this->renderVars['start'] = microtime(true);
185185

@@ -294,7 +294,7 @@ public function render(string $view, array $options = null, $saveData = null): s
294294
*
295295
* @return string
296296
*/
297-
public function renderString(string $view, array $options = null, $saveData = null): string
297+
public function renderString(string $view, array $options = null, bool $saveData = null): string
298298
{
299299
$start = microtime(true);
300300
if (is_null($saveData))
@@ -388,7 +388,7 @@ public function setVar(string $name, $value = null, string $context = null): Ren
388388
*
389389
* @return RendererInterface
390390
*/
391-
public function resetData()
391+
public function resetData(): RendererInterface
392392
{
393393
$this->data = [];
394394

@@ -402,7 +402,7 @@ public function resetData()
402402
*
403403
* @return array
404404
*/
405-
public function getData()
405+
public function getData(): array
406406
{
407407
return $this->data;
408408
}
@@ -494,7 +494,7 @@ public function renderSection(string $sectionName)
494494
*
495495
* @return string
496496
*/
497-
public function include(string $view, array $options = null, $saveData = null)
497+
public function include(string $view, array $options = null, $saveData = null): string
498498
{
499499
return $this->render($view, $options, $saveData);
500500
}

0 commit comments

Comments
 (0)