Test Setup Failed
Push — master ( 51dfb8...86fe89 )
by Ben
28:20 queued 08:12
created
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.
src/Snippets/SnippetParser.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
             return $value;
13 13
         }
14 14
 
15
-        $value = preg_replace_callback(static::$pattern, function ($matches) {
15
+        $value = preg_replace_callback(static::$pattern, function($matches) {
16 16
 
17 17
             // First entry of matches contains our full captured group, which we want to replace.
18 18
             // Second entry is the text itself, without the brackets
Please login to merge, or discard this patch.
src/Filters/Types/SelectFilter.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/Filters/Types/FilterType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 
7 7
 class FilterType
8 8
 {
9
-    const INPUT = 'input';   // oneliner text (input)
10
-    const SELECT = 'select';  // Select options
9
+    const INPUT = 'input'; // oneliner text (input)
10
+    const SELECT = 'select'; // Select options
11 11
 
12 12
     /**
13 13
      * @var string
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             static::INPUT,
21 21
             static::SELECT,
22 22
         ])) {
23
-            throw new \Exception('Invalid type identifier given [' . $type . '].');
23
+            throw new \Exception('Invalid type identifier given ['.$type.'].');
24 24
         }
25 25
 
26 26
         $this->type = $type;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public static function fromString(string $type)
30 30
     {
31
-        $class = 'Thinktomorrow\Chief\Filters\Types\\' . ucfirst($type . 'Filter');
31
+        $class = 'Thinktomorrow\Chief\Filters\Types\\'.ucfirst($type.'Filter');
32 32
 
33 33
         return new $class(new static($type));
34 34
     }
Please login to merge, or discard this patch.
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/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.