@@ -39,7 +39,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -12,7 +12,7 @@ |
||
| 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 |
@@ -15,7 +15,7 @@ |
||
| 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 | } |
@@ -6,8 +6,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -47,7 +47,7 @@ |
||
| 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 | |
@@ -16,7 +16,7 @@ |
||
| 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); |