@@ -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; |
@@ -99,19 +99,19 @@ discard block |
||
| 99 | 99 | $html = ''; |
| 100 | 100 | |
| 101 | 101 | // description |
| 102 | - $description = (string)$this->getMeta($data, 'description', ''); |
|
| 102 | + $description = (string) $this->getMeta($data, 'description', ''); |
|
| 103 | 103 | $html .= $this->metaDescription($description); |
| 104 | 104 | |
| 105 | 105 | // author |
| 106 | - $author = (string)$this->getMeta($data, 'author', ''); |
|
| 106 | + $author = (string) $this->getMeta($data, 'author', ''); |
|
| 107 | 107 | $html .= $this->metaAuthor($author); |
| 108 | 108 | |
| 109 | 109 | // css |
| 110 | - $docType = (string)$this->getMeta($data, 'docType', 'xhtml-strict'); |
|
| 110 | + $docType = (string) $this->getMeta($data, 'docType', 'xhtml-strict'); |
|
| 111 | 111 | $html .= $this->metaCss($docType); |
| 112 | 112 | |
| 113 | 113 | // generator |
| 114 | - $project = (array)$this->getMeta($data, 'project', []); |
|
| 114 | + $project = (array) $this->getMeta($data, 'project', []); |
|
| 115 | 115 | $html .= $this->metaGenerator($project); |
| 116 | 116 | |
| 117 | 117 | // other data |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | public function metaAuthor(?string $creator) : string |
| 161 | 161 | { |
| 162 | 162 | if (empty($creator)) { |
| 163 | - $creator = (string)$this->getMeta([], 'author', ''); |
|
| 163 | + $creator = (string) $this->getMeta([], 'author', ''); |
|
| 164 | 164 | if (empty($creator)) { |
| 165 | 165 | return ''; |
| 166 | 166 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | public function metaCss(string $docType) : string |
| 186 | 186 | { |
| 187 | 187 | if ($docType === 'html5') { |
| 188 | - $docType = (string)$this->getMeta([], 'docType', ''); |
|
| 188 | + $docType = (string) $this->getMeta([], 'docType', ''); |
|
| 189 | 189 | if (empty($docType)) { |
| 190 | 190 | return ''; |
| 191 | 191 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | public function metaGenerator(array $project) : string |
| 211 | 211 | { |
| 212 | 212 | if (empty($project['name'])) { |
| 213 | - $project = (array)$this->getMeta([], 'project', []); |
|
| 213 | + $project = (array) $this->getMeta([], 'project', []); |
|
| 214 | 214 | if (empty($project['name'])) { |
| 215 | 215 | return ''; |
| 216 | 216 | } |