@@ -101,19 +101,19 @@ discard block |
||
101 | 101 | $html = ''; |
102 | 102 | |
103 | 103 | // description |
104 | - $description = (string)$this->getMeta($data, 'description', ''); |
|
104 | + $description = (string) $this->getMeta($data, 'description', ''); |
|
105 | 105 | $html .= $this->metaDescription($description); |
106 | 106 | |
107 | 107 | // author |
108 | - $author = (string)$this->getMeta($data, 'author', ''); |
|
108 | + $author = (string) $this->getMeta($data, 'author', ''); |
|
109 | 109 | $html .= $this->metaAuthor($author); |
110 | 110 | |
111 | 111 | // css |
112 | - $docType = (string)$this->getMeta($data, 'docType', 'xhtml-strict'); |
|
112 | + $docType = (string) $this->getMeta($data, 'docType', 'xhtml-strict'); |
|
113 | 113 | $html .= $this->metaCss($docType); |
114 | 114 | |
115 | 115 | // generator |
116 | - $project = (array)$this->getMeta($data, 'project', []); |
|
116 | + $project = (array) $this->getMeta($data, 'project', []); |
|
117 | 117 | $html .= $this->metaGenerator($project); |
118 | 118 | |
119 | 119 | // other data |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function metaAuthor(?string $creator): string |
163 | 163 | { |
164 | 164 | if (empty($creator)) { |
165 | - $creator = (string)$this->getMeta([], 'author', ''); |
|
165 | + $creator = (string) $this->getMeta([], 'author', ''); |
|
166 | 166 | if (empty($creator)) { |
167 | 167 | return ''; |
168 | 168 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public function metaCss(string $docType): string |
188 | 188 | { |
189 | 189 | if ($docType === 'html5') { |
190 | - $docType = (string)$this->getMeta([], 'docType', ''); |
|
190 | + $docType = (string) $this->getMeta([], 'docType', ''); |
|
191 | 191 | if (empty($docType)) { |
192 | 192 | return ''; |
193 | 193 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | public function metaGenerator(array $project): string |
213 | 213 | { |
214 | 214 | if (empty($project['name'])) { |
215 | - $project = (array)$this->getMeta([], 'project', []); |
|
215 | + $project = (array) $this->getMeta([], 'project', []); |
|
216 | 216 | if (empty($project['name'])) { |
217 | 217 | return ''; |
218 | 218 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $path = CONFIG . 'rev-manifest.json'; |
42 | 42 | } |
43 | 43 | if (file_exists($path)) { |
44 | - static::$assets = (array)json_decode(file_get_contents($path), true); |
|
44 | + static::$assets = (array) json_decode(file_get_contents($path), true); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | if (!empty(static::$assets[$name])) { |
62 | - return (string)static::$assets[$name]; |
|
62 | + return (string) static::$assets[$name]; |
|
63 | 63 | } |
64 | 64 | if (!empty($extension) && !empty(static::$assets[$name . $extension])) { |
65 | - return (string)static::$assets[$name . $extension]; |
|
65 | + return (string) static::$assets[$name . $extension]; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | return $name; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | return [ |
42 | 42 | new TwigFunction('config', [Configure::class, 'read']), |
43 | - new TwigFunction('write_config', function ($key, $val) { |
|
43 | + new TwigFunction('write_config', function($key, $val) { |
|
44 | 44 | // avoid unwanted return value display in templates |
45 | 45 | Configure::write($key, $val); |
46 | 46 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return [ |
58 | 58 | new TwigFilter( |
59 | 59 | 'shuffle', |
60 | - function (array $array) { |
|
60 | + function(array $array) { |
|
61 | 61 | shuffle($array); |
62 | 62 | |
63 | 63 | return $array; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ), |
66 | 66 | new TwigFilter( |
67 | 67 | 'ksort', |
68 | - function (array $array) { |
|
68 | + function(array $array) { |
|
69 | 69 | ksort($array); |
70 | 70 | |
71 | 71 | return $array; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ), |
74 | 74 | new TwigFilter( |
75 | 75 | 'krsort', |
76 | - function (array $array) { |
|
76 | + function(array $array) { |
|
77 | 77 | krsort($array); |
78 | 78 | |
79 | 79 | return $array; |