@@ -20,5 +20,5 @@ |
||
20 | 20 | public $base_price; |
21 | 21 | |
22 | 22 | /** @var double */ |
23 | - public $recurring_price=2.0; |
|
23 | + public $recurring_price = 2.0; |
|
24 | 24 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $version = new Version($lastVersion); |
97 | 97 | |
98 | - switch ($data['type']) { |
|
98 | + switch ($data[ 'type' ]) { |
|
99 | 99 | case 'MAJOR': |
100 | 100 | $version->incrementMajor(); |
101 | 101 | break; |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | //TODO ADD CONFIG TEMPLATE |
113 | 113 | $script->releases()->create([ |
114 | 114 | ScriptRelease::VERSION => $version->__toString(), |
115 | - ScriptRelease::TYPE => $data['type'], |
|
116 | - ScriptRelease::CHANGELOG => $data['changelog'] |
|
115 | + ScriptRelease::TYPE => $data[ 'type' ], |
|
116 | + ScriptRelease::CHANGELOG => $data[ 'changelog' ] |
|
117 | 117 | ]); |
118 | 118 | |
119 | 119 | return $script; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $review = $script->reviews()->create([ |
132 | 132 | ScriptReview::REVIEWER_ID => get_authenticated_user_id(), |
133 | 133 | ScriptReview::VERSION => $script->releases->last()->version, |
134 | - ScriptReview::MESSAGE => $data['message'] |
|
134 | + ScriptReview::MESSAGE => $data[ 'message' ] |
|
135 | 135 | ]); |
136 | 136 | |
137 | 137 | return $review; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | { |
142 | 142 | $script = $this->resolve($id); |
143 | 143 | |
144 | - $review = $script->reviews()->withTrashed()->find($data['review_id']); |
|
144 | + $review = $script->reviews()->withTrashed()->find($data[ 'review_id' ]); |
|
145 | 145 | |
146 | 146 | if (!isset($review)) { |
147 | 147 | throw new ScriptAlreadyReviewedException(); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $reply = $review->reply()->create([ |
155 | 155 | ScriptReviewReply::REPLIER_ID => get_authenticated_user_id(), |
156 | - ScriptReviewReply::MESSAGE => $data['message'] |
|
156 | + ScriptReviewReply::MESSAGE => $data[ 'message' ] |
|
157 | 157 | ]); |
158 | 158 | |
159 | 159 | return $reply; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @var array |
32 | 32 | */ |
33 | - protected $guarded = []; |
|
33 | + protected $guarded = [ ]; |
|
34 | 34 | |
35 | 35 | protected $casts = [ |
36 | 36 | ]; |
@@ -43,16 +43,16 @@ |
||
43 | 43 | $this->credentials = $credentials; |
44 | 44 | } |
45 | 45 | |
46 | - public static function create(array $state){ |
|
46 | + public static function create(array $state) { |
|
47 | 47 | return new ClientState( |
48 | - $state['type'], |
|
49 | - $state['paused'], |
|
50 | - $state['stoppable'], |
|
51 | - $state['scriptId'], |
|
52 | - $state['machineId'], |
|
53 | - $state['script_config'] ??null, |
|
54 | - $state['proxy'] ?? null, |
|
55 | - $state['credentials'] ?? null |
|
48 | + $state[ 'type' ], |
|
49 | + $state[ 'paused' ], |
|
50 | + $state[ 'stoppable' ], |
|
51 | + $state[ 'scriptId' ], |
|
52 | + $state[ 'machineId' ], |
|
53 | + $state[ 'script_config' ] ??null, |
|
54 | + $state[ 'proxy' ] ?? null, |
|
55 | + $state[ 'credentials' ] ?? null |
|
56 | 56 | ); |
57 | 57 | } |
58 | 58 |