Completed
Push — master ( 1edf2c...bc33ad )
by Stefano
16s queued 12s
created
src/View/Twig/BeditaTwigExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/View/Helper/HtmlHelper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
397 397
             return $jsOutput;
398 398
         }
399 399
 
400
-        return $cssOutput . (string)$jsOutput;
400
+        return $cssOutput . (string) $jsOutput;
401 401
     }
402 402
 }
Please login to merge, or discard this patch.
src/Utility/Asset/Strategy/EntrypointsStrategy.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Utility/Asset/AssetStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Utility/AssetsRevisions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/View/TwigView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function initialize(): void
30 30
     {
31
-        $environment = (array)Configure::read('Twig.environment', []) + ['strict_variables' => false];
31
+        $environment = (array) Configure::read('Twig.environment', []) + ['strict_variables' => false];
32 32
         $this->setConfig('environment', $environment);
33 33
 
34 34
         parent::initialize();
Please login to merge, or discard this patch.
src/Controller/ApiProxyTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
         $this->response = $this->response->withStatus($status);
183 183
         $errorData = [
184
-            'status' => (string)$status,
184
+            'status' => (string) $status,
185 185
             'title' => $error->getMessage(),
186 186
         ];
187 187
         $this->set('error', $errorData);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             $response = $this->maskMultiLinks($response, 'meta.resources', 'href');
214 214
         }
215 215
 
216
-        $data = (array)Hash::get($response, 'data');
216
+        $data = (array) Hash::get($response, 'data');
217 217
         if (empty($data)) {
218 218
             return $response;
219 219
         }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             $response['data'] = $this->maskMultiLinks($data);
229 229
         }
230 230
 
231
-        return (array)$response;
231
+        return (array) $response;
232 232
     }
233 233
 
234 234
     /**
Please login to merge, or discard this patch.
src/View/Helper/WebComponentsHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 join('', $statements)
70 70
             );
71 71
             // @codingStandardsIgnoreEnd
72
-            $this->Html->scriptBlock($content, [ 'block' => 'scriptsComponents' ]);
72
+            $this->Html->scriptBlock($content, ['block' => 'scriptsComponents']);
73 73
         }
74 74
 
75 75
         return $attributes;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function is(string $tagName, array $properties = [], string $scriptPath = ''): string
87 87
     {
88 88
         if (!empty($scriptPath)) {
89
-            $this->Html->script($scriptPath, [ 'block' => 'scriptsComponents' ]);
89
+            $this->Html->script($scriptPath, ['block' => 'scriptsComponents']);
90 90
         }
91 91
 
92 92
         $options = ['is' => $tagName] + $this->props($properties);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function element(string $tagName, array $properties = [], $scriptPath = ''): string
106 106
     {
107 107
         if (!empty($scriptPath)) {
108
-            $this->Html->script($scriptPath, [ 'block' => 'scriptsComponents' ]);
108
+            $this->Html->script($scriptPath, ['block' => 'scriptsComponents']);
109 109
         }
110 110
 
111 111
         return $this->Html->tag($tagName, '', $this->props($properties));
Please login to merge, or discard this patch.
src/Controller/Component/ApiFormatterComponent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function embedIncluded(array $response): array
27 27
     {
28
-        $data = (array)Hash::get($response, 'data');
28
+        $data = (array) Hash::get($response, 'data');
29 29
         if (empty($data)) {
30 30
             return $response;
31 31
         }
32 32
 
33
-        $included = (array)Hash::get($response, 'included');
33
+        $included = (array) Hash::get($response, 'included');
34 34
         if (empty($included)) {
35 35
             return $response;
36 36
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 continue;
67 67
             }
68 68
 
69
-            $relation['data'] = $this->extractFromIncluded($included, (array)$relation['data']);
69
+            $relation['data'] = $this->extractFromIncluded($included, (array) $relation['data']);
70 70
         }
71 71
         unset($relation);
72 72
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function extractFromIncluded(Collection $included, array $relationshipData): array
85 85
     {
86 86
         foreach ($relationshipData as &$data) {
87
-            $data = (array)$included->firstMatch([
87
+            $data = (array) $included->firstMatch([
88 88
                 'type' => $data['type'],
89 89
                 'id' => $data['id'],
90 90
             ]);
Please login to merge, or discard this patch.