Test Setup Failed
Push — a-simpler-manager ( 45ff68...0b86bc )
by Ben
06:29
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/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/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/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.