| @@ -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 | 
| @@ -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); | 
| @@ -45,7 +45,7 @@ discard block | ||
| 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 | ||
| 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'); | 
| @@ -146,7 +146,7 @@ discard block | ||
| 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 | ||
| 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 | |
| @@ -19,7 +19,7 @@ | ||
| 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 | } | 
| @@ -18,7 +18,7 @@ discard block | ||
| 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 | ||
| 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]; | 
| @@ -13,7 +13,7 @@ | ||
| 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 | } |