Passed
Push — ft/package ( 5ee474...180175 )
by Philippe
05:16 queued 12s
created
src/Common/Traits/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/Common/Relations/RelatedCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
     
22 22
     public static function relationIds(Collection $collection): Collection
23 23
     {
24
-        return $collection->map(function ($entry) {
24
+        return $collection->map(function($entry) {
25 25
             return $entry->getRelationId();
26 26
         });
27 27
     }
28 28
 
29 29
     public function flattenForSelect()
30 30
     {
31
-        return $this->map(function (ActsAsChild $child) {
31
+        return $this->map(function(ActsAsChild $child) {
32 32
             return [
33 33
                 'id'    => $child->getRelationId(),
34 34
                 'label' => $child->getRelationLabel(),
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $grouped = [];
43 43
 
44
-        $this->flattenForSelect()->each(function ($entry) use (&$grouped) {
44
+        $this->flattenForSelect()->each(function($entry) use (&$grouped) {
45 45
             if (isset($grouped[$entry['group']])) {
46 46
                 $grouped[$entry['group']]['values'][] = $entry;
47
-            } else {
47
+            }else {
48 48
                 $grouped[$entry['group']] = ['group' => $entry['group'], 'values' => [$entry]];
49 49
             }
50 50
         });
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             $relateds = [];
60 60
         }
61 61
 
62
-        return (new static($relateds))->map(function ($related) {
62
+        return (new static($relateds))->map(function($related) {
63 63
             list($type, $id) = explode('@', $related);
64 64
             return (new $type)->find($id);
65 65
         });
Please login to merge, or discard this patch.
src/Common/Relations/ActingAsParent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     public function presentChildren(): \Illuminate\Support\Collection
36 36
     {
37
-        return $this->children()->map(function ($child) {
37
+        return $this->children()->map(function($child) {
38 38
             return $child->presentForParent($this, $child->relation);
39 39
         });
40 40
     }
Please login to merge, or discard this patch.
src/Common/Relations/Relation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
             ->orderBy('sort', 'ASC')
18 18
             ->get();
19 19
 
20
-        return $relations->map(function ($relation) {
20
+        return $relations->map(function($relation) {
21 21
             $parent = (new $relation->parent_type)->find($relation->parent_id);
22 22
             $parent->relation = $relation;
23 23
             return $parent;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             ->orderBy('sort', 'ASC')
32 32
             ->get();
33 33
 
34
-        return $relations->map(function ($relation) {
34
+        return $relations->map(function($relation) {
35 35
             $child = (new $relation->child_type)->find($relation->child_id);
36 36
             $child->relation = $relation;
37 37
             return $child;
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
         return [
50 50
             [
51 51
                 'label' => 'Pagina\'s',
52
-                'values' => Page::all()->map(function ($page) {
53
-                    return ['composite_id' => $page->getMorphClass().'@'.$page->id, 'label' => 'Pagina ' . teaser($page->title, 20, '...')];
52
+                'values' => Page::all()->map(function($page) {
53
+                    return ['composite_id' => $page->getMorphClass().'@'.$page->id, 'label' => 'Pagina '.teaser($page->title, 20, '...')];
54 54
                 })->toArray(),
55 55
             ]
56 56
         ];
Please login to merge, or discard this patch.
src/Common/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/Common/Translatable/TranslatableController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
             }
24 24
 
25 25
             foreach ($rules as $key => $rule) {
26
-                $translationrules['trans.' . $locale . '.'.$key] = $rule;
26
+                $translationrules['trans.'.$locale.'.'.$key] = $rule;
27 27
             }
28 28
 
29 29
             foreach ($attributes as $key => $attribute) {
30
-                $translationattributes['trans.' . $locale . '.'.$key] = $attribute;
30
+                $translationattributes['trans.'.$locale.'.'.$key] = $attribute;
31 31
             }
32 32
 
33 33
             foreach ($messages as $key => $message) {
34
-                $translationmessages['trans.' . $locale . '.'.$key] = $message;
34
+                $translationmessages['trans.'.$locale.'.'.$key] = $message;
35 35
             }
36 36
         }
37 37
 
Please login to merge, or discard this patch.
src/Authorization/Permission.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@
 block discarded – undo
19 19
     {
20 20
         $abilities = ['view', 'create', 'update', 'delete'];
21 21
 
22
-        return array_map(function ($val) use ($scope) {
23
-            return $val . '-'. $scope;
22
+        return array_map(function($val) use ($scope) {
23
+            return $val.'-'.$scope;
24 24
         }, $abilities);
25 25
     }
26 26
 
27 27
     public static function getPermissionsForIndex()
28 28
     {
29 29
         $permissions = $temp = [];
30
-        self::all()->each(function ($permission) use (&$permissions, &$temp) {
30
+        self::all()->each(function($permission) use (&$permissions, &$temp) {
31 31
             $model = explode("_", $permission->name, 2)[1];
32 32
             $temp[$model][$permission->id] = explode("_", $permission->name, 2)[0];
33 33
             $permissions = $temp;
Please login to merge, or discard this patch.
src/Authorization/Console/GeneratePermissionCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             Permission::findOrCreate($permission, 'chief');
40 40
         }
41 41
 
42
-        $this->info('Permissions ' . implode(', ', $permissions) . ' created.');
42
+        $this->info('Permissions '.implode(', ', $permissions).' created.');
43 43
     }
44 44
 
45 45
     /**
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         foreach ($roleNames as $roleName) {
57 57
             if ($role = Role::where('name', trim($roleName))->first()) {
58 58
                 $role->syncPermissions($permissions);
59
-                $this->info('Role ' . $roleName . ' assigned the given permissions.');
60
-            } else {
61
-                $this->warn('Role not found by name ' . $roleName . '!');
59
+                $this->info('Role '.$roleName.' assigned the given permissions.');
60
+            }else {
61
+                $this->warn('Role not found by name '.$roleName.'!');
62 62
             }
63 63
         }
64 64
     }
Please login to merge, or discard this patch.
src/Authorization/Console/GenerateRoleCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             // Generate all permissions if only scope is passed
43 43
             if (false === strpos($permissionName, '-')) {
44 44
                 $cleanPermissionNames = array_merge($cleanPermissionNames, Permission::generate($permissionName));
45
-            } else {
45
+            }else {
46 46
                 // Trim the value
47 47
                 $cleanPermissionNames[] = $permissionName;
48 48
             }
@@ -55,6 +55,6 @@  discard block
 block discarded – undo
55 55
             $role->givePermissionTo($cleanPermissionName);
56 56
         }
57 57
 
58
-        $this->info('Role ' . $role->name . ' was assigned the permissions: ' . implode(',', $cleanPermissionNames));
58
+        $this->info('Role '.$role->name.' was assigned the permissions: '.implode(',', $cleanPermissionNames));
59 59
     }
60 60
 }
Please login to merge, or discard this patch.