Completed
Pull Request — master (#414)
by Philippe
32:33 queued 15:43
created
src/Management/Managers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $registrations = collect($this->register->filterByTag($tag)->all());
52 52
 
53
-        return $registrations->map(function ($registration) {
53
+        return $registrations->map(function($registration) {
54 54
             return $this->instance($registration);
55 55
         });
56 56
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $registrations = collect($this->register->filterByTag($tag)->all());
67 67
 
68
-        return $registrations->map(function ($registration) {
68
+        return $registrations->map(function($registration) {
69 69
             return $this->instance($registration)->details();
70 70
         });
71 71
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         //return array with group name and values
77 77
         $grouped = [];
78 78
 
79
-        $managers = $managers->map(function (Manager $item) {
79
+        $managers = $managers->map(function(Manager $item) {
80 80
             return [
81 81
                 'id'    => $item->details()->id,
82 82
                 'group' => $item->details()->plural,
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $registrations = collect($this->register->all());
92 92
 
93
-        return $registrations->map(function ($registration) {
93
+        return $registrations->map(function($registration) {
94 94
             return $this->instance($registration);
95 95
         });
96 96
     }
Please login to merge, or discard this patch.
src/Management/ManagesPagebuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         
49 49
         $availableChildren = AvailableChildren::forParent($model);
50 50
         
51
-        $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) {
51
+        $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) {
52 52
             return $module->page_id != null && $module->page_id != $model->id;
53 53
         });
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $available_sets = FlatReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray();
58 58
 
59 59
         // Current sections
60
-        $sections = $model->children()->map(function ($section, $index) {
60
+        $sections = $model->children()->map(function($section, $index) {
61 61
             if ($section instanceof TranslatableContract) {
62 62
                 $section->injectTranslationForForm();
63 63
             }
Please login to merge, or discard this patch.
src/Fields/FieldArrangement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     private function validateTabs(array $tabs)
49 49
     {
50
-        array_map(function (FieldsTab $tab) {
50
+        array_map(function(FieldsTab $tab) {
51 51
         }, $tabs);
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/Concerns/Morphable/Morphables.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         }
17 17
 
18 18
         if (!class_exists($class)) {
19
-            throw new NotFoundMorphKey('No class found by morphkey [' . $class . ']. Make sure that the morphkey is a valid class reference.');
19
+            throw new NotFoundMorphKey('No class found by morphkey ['.$class.']. Make sure that the morphkey is a valid class reference.');
20 20
         }
21 21
 
22 22
         return new $class($attributes);
Please login to merge, or discard this patch.
src/Concerns/Morphable/EloquentMorphableInstantiation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     private function convertToMorphInstance(Model $model, string $morphKey): Model
46 46
     {
47 47
         // Here we load up the proper collection model instead of the generic base class.
48
-        return tap(Morphables::instance($morphKey, $model->attributes), function ($instance) use ($model) {
48
+        return tap(Morphables::instance($morphKey, $model->attributes), function($instance) use ($model) {
49 49
             $instance->setRawAttributes($model->attributes);
50 50
             $instance->setRelations($model->relations);
51 51
             $instance->exists = $model->exists;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         if ($this->requiresCustomTranslation($instance)) {
67 67
             if (!is_array($instance->with) || !in_array('translations', $instance->with)) {
68 68
                 $instance->unsetRelation('translations');
69
-            } else {
69
+            }else {
70 70
                 // TODO: this is a heavy queryload since it loads new translations for each model...
71 71
                 // Removing this could reduce load by approx. 50%.
72 72
                 // $instance->load('translations');
Please login to merge, or discard this patch.
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.