@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | parent::initialize($config); |
54 | 54 | |
55 | - $this->metadata = (array)Configure::read('Meta', []) + $this->metadata; |
|
56 | - $this->metadata = (array)Hash::get($config, 'meta', []) + $this->metadata; |
|
55 | + $this->metadata = (array) Configure::read('Meta', []) + $this->metadata; |
|
56 | + $this->metadata = (array) Hash::get($config, 'meta', []) + $this->metadata; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -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 | } |
@@ -397,6 +397,6 @@ discard block |
||
397 | 397 | return $jsOutput; |
398 | 398 | } |
399 | 399 | |
400 | - return $cssOutput . (string)$jsOutput; |
|
400 | + return $cssOutput . (string) $jsOutput; |
|
401 | 401 | } |
402 | 402 | } |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | declare(strict_types=1); |
3 | 3 | |
4 | - /** |
|
5 | - * BEdita, API-first content management framework |
|
6 | - * Copyright 2020 ChannelWeb Srl, Chialab Srl |
|
7 | - * |
|
8 | - * This file is part of BEdita: you can redistribute it and/or modify |
|
9 | - * it under the terms of the GNU Lesser General Public License as published |
|
10 | - * by the Free Software Foundation, either version 3 of the License, or |
|
11 | - * (at your option) any later version. |
|
12 | - * |
|
13 | - * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details. |
|
14 | - */ |
|
15 | - namespace BEdita\WebTools\Utility\Asset\Strategy; |
|
4 | + /** |
|
5 | + * BEdita, API-first content management framework |
|
6 | + * Copyright 2020 ChannelWeb Srl, Chialab Srl |
|
7 | + * |
|
8 | + * This file is part of BEdita: you can redistribute it and/or modify |
|
9 | + * it under the terms of the GNU Lesser General Public License as published |
|
10 | + * by the Free Software Foundation, either version 3 of the License, or |
|
11 | + * (at your option) any later version. |
|
12 | + * |
|
13 | + * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details. |
|
14 | + */ |
|
15 | + namespace BEdita\WebTools\Utility\Asset\Strategy; |
|
16 | 16 | |
17 | 17 | use BEdita\WebTools\Utility\Asset\AssetStrategy; |
18 | 18 | use Cake\Utility\Hash; |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $manifestPath = $this->getConfig('manifestPath'); |
71 | 71 | } |
72 | 72 | if (file_exists($manifestPath)) { |
73 | - $this->assets = (array)json_decode(file_get_contents($manifestPath), true); |
|
73 | + $this->assets = (array) json_decode(file_get_contents($manifestPath), true); |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | { |
96 | 96 | $assets = []; |
97 | 97 | foreach ($names as $val) { |
98 | - $assets = array_merge($assets, (array)static::get($val, $extension)); |
|
98 | + $assets = array_merge($assets, (array) static::get($val, $extension)); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | return $assets; |