@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | return [ |
39 | 39 | new \Twig_SimpleFunction('config', [Configure::class, 'read']), |
40 | - new \Twig_SimpleFunction('write_config', function ($key, $val) { |
|
40 | + new \Twig_SimpleFunction('write_config', function($key, $val) { |
|
41 | 41 | // avoid unwanted return value display in templates |
42 | 42 | Configure::write($key, $val); |
43 | 43 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return [ |
55 | 55 | new \Twig_SimpleFilter( |
56 | 56 | 'shuffle', |
57 | - function (array $array) { |
|
57 | + function(array $array) { |
|
58 | 58 | shuffle($array); |
59 | 59 | |
60 | 60 | return $array; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ), |
63 | 63 | new \Twig_SimpleFilter( |
64 | 64 | 'ksort', |
65 | - function (array $array) { |
|
65 | + function(array $array) { |
|
66 | 66 | ksort($array); |
67 | 67 | |
68 | 68 | return $array; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ), |
71 | 71 | new \Twig_SimpleFilter( |
72 | 72 | 'krsort', |
73 | - function (array $array) { |
|
73 | + function(array $array) { |
|
74 | 74 | krsort($array); |
75 | 75 | |
76 | 76 | return $array; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function get(string $name): string |
56 | 56 | { |
57 | 57 | if (!empty($this->assets[$name])) { |
58 | - $name = (string)$this->assets[$name]; |
|
58 | + $name = (string) $this->assets[$name]; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return $name; |
@@ -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 | } |