Passed
Push — ft/fixmenu ( 966d82...30530d )
by
unknown
05:47
created
src/States/Publishable/CheckPreviewTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             Session::now('note.default', 'U bekijkt een preview.');
13 13
 
14 14
             return true;
15
-        } else {
15
+        }else {
16 16
             return false;
17 17
         }
18 18
     }
Please login to merge, or discard this patch.
src/States/State/StateException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 {
7 7
     public static function invalidState($state, $currentState, $stateMachine)
8 8
     {
9
-        return new self('Transition to state [' . $state . '] is not allowed from state [' . $currentState . '] or state does not exist on ' . get_class($stateMachine));
9
+        return new self('Transition to state ['.$state.'] is not allowed from state ['.$currentState.'] or state does not exist on '.get_class($stateMachine));
10 10
     }
11 11
 
12 12
     public static function malformedTransition($transition, $stateMachine)
13 13
     {
14
-        return new self('Transition [' . $transition . '] is malformed on ' . get_class($stateMachine) . '. It should contain both a [from:array] and [to:string] value.');
14
+        return new self('Transition ['.$transition.'] is malformed on '.get_class($stateMachine).'. It should contain both a [from:array] and [to:string] value.');
15 15
     }
16 16
 
17 17
     public static function invalidTransitionKey($transition, $stateMachine)
18 18
     {
19
-        return new self('unknown transition [' . $transition . '] on ' . get_class($stateMachine));
19
+        return new self('unknown transition ['.$transition.'] on '.get_class($stateMachine));
20 20
     }
21 21
 
22 22
     public static function invalidTransition($transition, $state, $stateMachine)
23 23
     {
24
-        return new self('Transition [' . $transition . '] cannot be applied from current state [' . $state . '] on ' . get_class($stateMachine));
24
+        return new self('Transition ['.$transition.'] cannot be applied from current state ['.$state.'] on '.get_class($stateMachine));
25 25
     }
26 26
 
27 27
     public static function invalidTransitionState($transition, $state, $stateMachine)
28 28
     {
29
-        return new self('Transition [' . $transition . '] contains a non existing [' . $state . '] on ' . get_class($stateMachine));
29
+        return new self('Transition ['.$transition.'] contains a non existing ['.$state.'] on '.get_class($stateMachine));
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Media/UploadMedia.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (is_string($file) && isset(json_decode($file)->output)) {
113 113
             $image_name = json_decode($file)->output->name;
114 114
             $asset = app(AddAsset::class)->add($model, json_decode($file)->output->image, $type, $locale, $this->sluggifyFilename($image_name));
115
-        } else {
115
+        }else {
116 116
             if ($file instanceof UploadedFile) {
117 117
                 $image_name = $file->getClientOriginalName();
118 118
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 if (false !== ($key = array_search($image_name, $files_order))) {
124 124
                     $files_order[$key] = (string)$asset->id;
125 125
                 }
126
-            } else {
126
+            }else {
127 127
                 $file = Asset::find($file);
128 128
                 if ($file) {
129 129
                     if ($model->assetRelation()->where('asset_pivots.type', $type)->where('asset_pivots.locale', $locale)->get()->contains($file)) {
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
      */
143 143
     private function sluggifyFilename($filename): string
144 144
     {
145
-        $extension = substr($filename, strrpos($filename, '.') + 1);
145
+        $extension = substr($filename, strrpos($filename, '.')+1);
146 146
         $filename = substr($filename, 0, strrpos($filename, '.'));
147
-        $filename = Str::slug($filename) . '.' . $extension;
147
+        $filename = Str::slug($filename).'.'.$extension;
148 148
 
149 149
         return $filename;
150 150
     }
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
                 if ($file instanceof UploadedFile && !$file->isValid()) {
161 161
                     if ($file->getError() == UPLOAD_ERR_INI_SIZE) {
162 162
                         throw new FileTooBigException(
163
-                            'Cannot upload file because it exceeded the allowed upload_max_filesize: upload_max_filesize is smaller than post size. ' .
164
-                            'upload_max_filesize: ' . (int)ini_get('upload_max_filesize') . 'MB, ' .
165
-                            'post_max_size: ' . (int)(ini_get('post_max_size')) . 'MB'
163
+                            'Cannot upload file because it exceeded the allowed upload_max_filesize: upload_max_filesize is smaller than post size. '.
164
+                            'upload_max_filesize: '.(int)ini_get('upload_max_filesize').'MB, '.
165
+                            'post_max_size: '.(int)(ini_get('post_max_size')).'MB'
166 166
                         );
167 167
                     }
168 168
                 }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             foreach ($files as $locale => $_files) {
178 178
                 foreach ($_files as $action => $file) {
179 179
                     if (!in_array($action, $actions)) {
180
-                        throw new \InvalidArgumentException('A valid files entry should have a key of either [' . implode(',', $actions) . ']. Instead ' . $action . ' is given.');
180
+                        throw new \InvalidArgumentException('A valid files entry should have a key of either ['.implode(',', $actions).']. Instead '.$action.' is given.');
181 181
                     }
182 182
                 }
183 183
             }
Please login to merge, or discard this patch.
src/Common/helpers.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $manifestPath = '/chief-assets/back';
21 21
 
22 22
         // Manifest expects each entry to start with a leading slash - we make sure to deduplicate the manifest path.
23
-        $entry = str_replace($manifestPath, '', '/' . ltrim($filepath, '/'));
23
+        $entry = str_replace($manifestPath, '', '/'.ltrim($filepath, '/'));
24 24
 
25 25
         try {
26 26
             // Paths should be given relative to the manifestpath so make sure to remove the basepath
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         } catch (\Exception $e) {
29 29
             \Illuminate\Support\Facades\Log::error($e);
30 30
 
31
-            return $manifestPath . $entry;
31
+            return $manifestPath.$entry;
32 32
         }
33 33
     }
34 34
 }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
         $teaser = substr($text, 0, $max);
116 116
 
117
-        return strlen($text) <= $max ? $teaser : $teaser . $ending;
117
+        return strlen($text) <= $max ? $teaser : $teaser.$ending;
118 118
     }
119 119
 }
120 120
 
@@ -245,16 +245,16 @@  discard block
 block discarded – undo
245 245
             'fragment',
246 246
         ], null), $parsed_url, $overrides);
247 247
 
248
-        $scheme = $parsed_url['scheme'] ? $parsed_url['scheme'] . '://' : null;
249
-        $port = $parsed_url['port'] ? ':' . $parsed_url['port'] : null;
250
-        $fragment = $parsed_url['fragment'] ? '#' . $parsed_url['fragment'] : null;
248
+        $scheme = $parsed_url['scheme'] ? $parsed_url['scheme'].'://' : null;
249
+        $port = $parsed_url['port'] ? ':'.$parsed_url['port'] : null;
250
+        $fragment = $parsed_url['fragment'] ? '#'.$parsed_url['fragment'] : null;
251 251
 
252
-        $baseurl = $scheme . $parsed_url['host'] . $port . $parsed_url['path'];
252
+        $baseurl = $scheme.$parsed_url['host'].$port.$parsed_url['path'];
253 253
         $current_query = [];
254 254
 
255 255
         $_query = explode('&', $parsed_url['query']);
256 256
 
257
-        array_map(function ($v) use (&$current_query) {
257
+        array_map(function($v) use (&$current_query) {
258 258
             if (!$v) {
259 259
                 return;
260 260
             }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         $query = urldecode(http_build_query(array_merge($current_query, $query_params)));
274 274
 
275
-        return $baseurl . '?' . $query . $fragment;
275
+        return $baseurl.'?'.$query.$fragment;
276 276
     }
277 277
 }
278 278
 
Please login to merge, or discard this patch.
src/Common/Helpers/Memoize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         $cachableParameters = $this->convertToCachableParameters($parameters);
21 21
 
22
-        $cachekey = $this->baseKey . ':' . md5(implode('', $cachableParameters));
22
+        $cachekey = $this->baseKey.':'.md5(implode('', $cachableParameters));
23 23
 
24 24
         if (isset(static::$cache[$cachekey])) {
25 25
             return static::$cache[$cachekey];
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         foreach ($parameters as $key => $value) {
39 39
             if ($value instanceof Model) {
40
-                $parameters[$key] = get_class($value) . '@' . $value->id;
40
+                $parameters[$key] = get_class($value).'@'.$value->id;
41 41
             }
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Fields/Validation/ValidationParameters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             }
50 50
 
51 51
             if (isset($customRules[$rule])) {
52
-                $rules[$k] = $customRules[$rule] . ($params ? ':' . $params : '');
52
+                $rules[$k] = $customRules[$rule].($params ? ':'.$params : '');
53 53
             }
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Fields/Validation/ValidationNames.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 }
95 95
 
96 96
                 foreach ($replacements as $replacement) {
97
-                    $newKeySet[] = str_replace(':' . $placeholder, $replacement, $key);
97
+                    $newKeySet[] = str_replace(':'.$placeholder, $replacement, $key);
98 98
                 }
99 99
             }
100 100
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
             // Remove all 'trans' entries for this locale
144 144
             foreach ($filteredKeys as $i => $key) {
145
-                if (Str::startsWith($key, 'trans.' . $locale)) {
145
+                if (Str::startsWith($key, 'trans.'.$locale)) {
146 146
                     unset($filteredKeys[$i]);
147 147
                 }
148 148
             }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $payload = Arr::get($this->payload, $key, '_notfound_');
164 164
 
165 165
             // If the payload is empty and this is not the entry for the required locale
166
-            if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.' . $this->requiredLocale)) {
166
+            if ($payload !== '_notfound_' && !$payload && !Str::endsWith($key, '.'.$this->requiredLocale)) {
167 167
                 unset($filteredKeys[$i]);
168 168
             }
169 169
         }
Please login to merge, or discard this patch.
src/Fields/FieldName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             return $value;
80 80
         }
81 81
 
82
-        $value = str_replace('.', '][', $value) . ']';
82
+        $value = str_replace('.', '][', $value).']';
83 83
 
84 84
         return substr_replace($value, '', strpos($value, ']'), 1);
85 85
     }
Please login to merge, or discard this patch.
src/Fields/ValidationRules/ValidatesExistingAssetAttributes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     protected function validateAssetMimetypes(Asset $asset, $parameters)
57 57
     {
58 58
         return (in_array($asset->getMimeType(), $parameters) ||
59
-            in_array(explode('/', $asset->getMimeType())[0] . '/*', $parameters));
59
+            in_array(explode('/', $asset->getMimeType())[0].'/*', $parameters));
60 60
     }
61 61
 
62 62
     protected function validateAssetMax(Asset $asset, $parameters)
Please login to merge, or discard this patch.