Passed
Push — states-and-image-validation ( f2659b...385aa6 )
by Philippe
15:30 queued 08:05
created
src/Concerns/Translatable/Translatable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $available_locales = static::availableLocales();
147 147
         $current_locales = $this->translations->pluck('locale')->toArray();
148 148
 
149
-        return array_filter($available_locales, function ($v) use ($current_locales, $available) {
149
+        return array_filter($available_locales, function($v) use ($current_locales, $available) {
150 150
             return $available ? in_array($v, $current_locales) : !in_array($v, $current_locales);
151 151
         }, ARRAY_FILTER_USE_BOTH);
152 152
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     private function validateLocale($locale)
160 160
     {
161 161
         if (!in_array($locale, static::availableLocales())) {
162
-            throw new InvalidArgumentException('Locale [' . $locale . '] is not available');
162
+            throw new InvalidArgumentException('Locale ['.$locale.'] is not available');
163 163
         }
164 164
     }
165 165
 
Please login to merge, or discard this patch.
src/Concerns/Sortable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public static function reorderAgainstSiblings(array $sequence)
21 21
     {
22
-        array_walk($sequence, function ($id, $i) {
22
+        array_walk($sequence, function($id, $i) {
23 23
             self::findOrFail($id)->reorder($i);
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
src/FlatReferences/FlatReferencePresenter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     public static function toSelectValues(Collection $collection): Collection
10 10
     {
11
-        return $collection->map(function (ProvidesFlatReference $item) {
11
+        return $collection->map(function(ProvidesFlatReference $item) {
12 12
             return [
13 13
                 'id'    => $item->flatReference()->get(),
14 14
                 'label' => $item->flatReferenceLabel(),
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $grouped = [];
23 23
 
24
-        static::toSelectValues($collection)->each(function ($item) use (&$grouped) {
24
+        static::toSelectValues($collection)->each(function($item) use (&$grouped) {
25 25
             if (isset($grouped[$item['group']])) {
26 26
                 $grouped[$item['group']]['values'][] = $item;
27
-            } else {
27
+            }else {
28 28
                 $grouped[$item['group']] = ['group' => $item['group'], 'values' => [$item]];
29 29
             }
30 30
         });
Please login to merge, or discard this patch.
src/FlatReferences/FlatReferenceCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@
 block discarded – undo
21 21
             $referenceStrings = [];
22 22
         }
23 23
 
24
-        return (new Collection($referenceStrings))->reject(function ($referenceString) {
24
+        return (new Collection($referenceStrings))->reject(function($referenceString) {
25 25
             return is_null($referenceString);
26
-        })->map(function ($referenceString) {
26
+        })->map(function($referenceString) {
27 27
             return FlatReferenceFactory::fromString($referenceString)->instance();
28 28
         });
29 29
     }
30 30
 
31 31
     public function toFlatReferences(): Collection
32 32
     {
33
-        return (new Collection($this->all()))->map(function (ProvidesFlatReference $item) {
33
+        return (new Collection($this->all()))->map(function(ProvidesFlatReference $item) {
34 34
             return $item->flatReference()->get();
35 35
         });
36 36
     }
Please login to merge, or discard this patch.
src/Pages/PublishedFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function apply($value = null): Closure
21 21
     {
22
-        return function ($query) use ($value) {
22
+        return function($query) use ($value) {
23 23
             if ($value == 'all') {
24 24
                 return $query;
25 25
             }
Please login to merge, or discard this patch.
src/Authorization/Role.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public static function rolesForSelect($includeDeveloperRole = false)
20 20
     {
21
-        $roles = $includeDeveloperRole ? static::all() : static::all()->reject(function ($role) {
21
+        $roles = $includeDeveloperRole ? static::all() : static::all()->reject(function($role) {
22 22
             return $role->name == 'developer';
23 23
         });
24 24
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function getPermissionsForIndex()
41 41
     {
42
-        $this->permissions->each(function ($permission) {
42
+        $this->permissions->each(function($permission) {
43 43
             $model = explode("_", $permission->name, 2)[1];
44 44
             $temp = $this->permission;
45 45
             $temp[$model][] = explode("_", $permission->name, 2)[0];
Please login to merge, or discard this patch.
src/Filters/Types/InputFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function apply($value = null): Closure
17 17
     {
18
-        return $this->query && $this->query instanceof Closure ? $this->query : function ($query) {
18
+        return $this->query && $this->query instanceof Closure ? $this->query : function($query) {
19 19
             return $query;
20 20
         };
21 21
     }
Please login to merge, or discard this patch.
src/Settings/SettingsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     public function register()
15 15
     {
16
-        $this->app->singleton(Settings::class, function ($app) {
16
+        $this->app->singleton(Settings::class, function($app) {
17 17
             return new Settings();
18 18
         });
19 19
     }
Please login to merge, or discard this patch.
src/Settings/Application/ChangeHomepage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     {
54 54
         foreach ($flatReferences as $locale => $flatReferenceString) {
55 55
             if (!$flatReferenceString) {
56
-                throw new \InvalidArgumentException('Homepage setting value cannot be empty. Value for locale ' . $locale . ' is missing.');
56
+                throw new \InvalidArgumentException('Homepage setting value cannot be empty. Value for locale '.$locale.' is missing.');
57 57
             }
58 58
         }
59 59
     }
Please login to merge, or discard this patch.