@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function testCacheSpeed() |
21 | 21 | { |
22 | - $model = Account::create(['testthisshit' => 5]); |
|
22 | + $model = Account::create([ 'testthisshit' => 5 ]); |
|
23 | 23 | \Cache::forever('testmodel', $model); |
24 | 24 | |
25 | 25 | $time_db_start = microtime(true); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * @var array |
31 | 31 | */ |
32 | - protected $guarded = []; |
|
32 | + protected $guarded = [ ]; |
|
33 | 33 | |
34 | 34 | protected $casts = [ |
35 | 35 | 'active' => 'boolean', |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | protected static function boot() |
45 | 45 | { |
46 | 46 | parent::boot(); |
47 | - static::addGlobalScope('type', function (Builder $builder) { |
|
47 | + static::addGlobalScope('type', function(Builder $builder) { |
|
48 | 48 | $builder->where('type', get_short_class_name(static::class)); |
49 | 49 | }); |
50 | 50 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | return [ |
47 | 47 | 'id' => $app->id, |
48 | - 'alias' => $app->alias ?? $app->credentials['username'], |
|
48 | + 'alias' => $app->alias ?? $app->credentials[ 'username' ], |
|
49 | 49 | 'performance_mode' => array_random([ |
50 | 50 | 'EXTREME', |
51 | 51 | 'MEDIUM', |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | use Modules\Application\Entities\Application; |
5 | 5 | |
6 | -$factory->define(Application::class, function (Faker $faker) { |
|
6 | +$factory->define(Application::class, function(Faker $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'alias' => null, |
9 | 9 | 'user_id' => 1, |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | ]; |
20 | 20 | }); |
21 | 21 | |
22 | -$factory->state(Application::class, 'OSRS', function (Faker $faker) { |
|
22 | +$factory->state(Application::class, 'OSRS', function(Faker $faker) { |
|
23 | 23 | return [ |
24 | 24 | 'type' => 'OSRS', |
25 | 25 | 'credentials' => [ |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | return explode(',', $request->include); |
27 | 27 | } |
28 | 28 | |
29 | - return []; |
|
29 | + return [ ]; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | public function compileRelations() |
36 | 36 | { |
37 | 37 | $requestedRelations = $this->parseRequestIncludeParameter(); |
38 | - $relations = []; |
|
38 | + $relations = [ ]; |
|
39 | 39 | foreach ($requestedRelations as $requestedRelation) { |
40 | - if (isset($this->available[$requestedRelation])) { |
|
41 | - $relations[$requestedRelation] = $this->available[$requestedRelation]; |
|
40 | + if (isset($this->available[ $requestedRelation ])) { |
|
41 | + $relations[ $requestedRelation ] = $this->available[ $requestedRelation ]; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | $merge = array_merge($this->include, $relations); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if (is_array($relation)) { |
57 | 57 | $this->include = array_merge($this->include, $relation); |
58 | 58 | } else { |
59 | - $this->include[] = $relation; |
|
59 | + $this->include[ ] = $relation; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this; |
@@ -64,21 +64,21 @@ discard block |
||
64 | 64 | |
65 | 65 | protected function includeRelations() |
66 | 66 | { |
67 | - $relations = []; |
|
67 | + $relations = [ ]; |
|
68 | 68 | if ($this->resource instanceof Model) { |
69 | 69 | $relations = $this->compileRelations(); |
70 | 70 | foreach ($relations as $relation => $transformer) { |
71 | 71 | $relationMethodName = 'transform'.ucfirst(strtolower($relation)); |
72 | 72 | if (method_exists($this, $relationMethodName)) { |
73 | - $relations[$relation] = $this->$relationMethodName($this->resource->$relation); |
|
73 | + $relations[ $relation ] = $this->$relationMethodName($this->resource->$relation); |
|
74 | 74 | } else { |
75 | 75 | if ($this->resource->$relation instanceof Model) { |
76 | - $relations[$relation] = $transformer::resource($this->whenLoaded($relation)); |
|
76 | + $relations[ $relation ] = $transformer::resource($this->whenLoaded($relation)); |
|
77 | 77 | } elseif ($this->resource->$relation instanceof Collection) { |
78 | - $relations[$relation] = $transformer::collection($this->whenLoaded($relation)); |
|
78 | + $relations[ $relation ] = $transformer::collection($this->whenLoaded($relation)); |
|
79 | 79 | } |
80 | 80 | if ($this->resource->$relation == null) { |
81 | - $relations[$relation] = null; |
|
81 | + $relations[ $relation ] = null; |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function generate() |
28 | 28 | { |
29 | - if (! $this->machineIsAvailable() && $this->appShouldRun()) { |
|
29 | + if (!$this->machineIsAvailable() && $this->appShouldRun()) { |
|
30 | 30 | if ($this->applicationState->paused) { |
31 | 31 | return SynchronisationState::SCRIPT_PAUSED; |
32 | 32 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | public function registrationCondition(): bool |
21 | 21 | { |
22 | - return ! app()->environment('testing'); |
|
22 | + return !app()->environment('testing'); |
|
23 | 23 | } |
24 | 24 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | protected function getArguments() |
51 | 51 | { |
52 | 52 | return [ |
53 | - ['example', InputArgument::REQUIRED, 'An example argument.'], |
|
53 | + [ 'example', InputArgument::REQUIRED, 'An example argument.' ], |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | protected function getOptions() |
63 | 63 | { |
64 | 64 | return [ |
65 | - ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], |
|
65 | + [ 'example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null ], |
|
66 | 66 | ]; |
67 | 67 | } |
68 | 68 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * @var array |
39 | 39 | */ |
40 | - protected $guarded = []; |
|
40 | + protected $guarded = [ ]; |
|
41 | 41 | |
42 | 42 | protected $casts = [ |
43 | 43 | 'monitor' => 'boolean', |