@@ -33,7 +33,7 @@ |
||
33 | 33 | 'default' => [ |
34 | 34 | 'server' => 'mongodb://localhost:27017', |
35 | 35 | 'database' => 'spiral-empty', |
36 | - 'options' => ['connect' => true] |
|
36 | + 'options' => [ 'connect' => true ] |
|
37 | 37 | ], |
38 | 38 | /*{{databases}}*/ |
39 | 39 | ] |
@@ -35,16 +35,16 @@ |
||
35 | 35 | */ |
36 | 36 | public function getSnapshots(): PaginableArray |
37 | 37 | { |
38 | - $order = []; |
|
39 | - $snapshots = []; |
|
38 | + $order = [ ]; |
|
39 | + $snapshots = [ ]; |
|
40 | 40 | |
41 | 41 | if (!$this->files->exists($this->config->reportingDirectory())) { |
42 | 42 | return new PaginableArray(); |
43 | 43 | } |
44 | 44 | |
45 | 45 | foreach ($this->files->getFiles($this->config->reportingDirectory(), '*.html') as $file) { |
46 | - $snapshots[] = new FileSnapshot($file); |
|
47 | - $order[] = $this->files->time($file); |
|
46 | + $snapshots[ ] = new FileSnapshot($file); |
|
47 | + $order[ ] = $this->files->time($file); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | array_multisort($order, SORT_DESC, $snapshots); |
@@ -24,9 +24,9 @@ |
||
24 | 24 | <vault:uri target="snapshots:suppressIncident" |
25 | 25 | class="btn blue-grey darken-2 waves-effect waves-light" icon="archive" |
26 | 26 | options="<?= [ |
27 | - 'id' => $snapshot->primaryKey(), |
|
28 | - 'incident' => $incident->primaryKey() |
|
29 | - ] ?>"> |
|
27 | + 'id' => $snapshot->primaryKey(), |
|
28 | + 'incident' => $incident->primaryKey() |
|
29 | + ] ?>"> |
|
30 | 30 | [[Suppress]] |
31 | 31 | </vault:uri> |
32 | 32 | <?php } ?> |
@@ -32,7 +32,7 @@ |
||
32 | 32 | <?php } ?> |
33 | 33 | |
34 | 34 | <vault:uri target="snapshots:view" class="btn-flat waves-effect" |
35 | - post-icon="trending_flat" options="<?= ['id' => $snapshot->primaryKey()] ?>"> |
|
35 | + post-icon="trending_flat" options="<?= [ 'id' => $snapshot->primaryKey() ] ?>"> |
|
36 | 36 | [[BACK]] |
37 | 37 | </vault:uri> |
38 | 38 | </vault:guard> |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | return [ |
158 | 158 | 'status' => 200, |
159 | 159 | 'message' => $this->say('Snapshots deleted.'), |
160 | - 'action' => ['redirect' => $uri] |
|
160 | + 'action' => [ 'redirect' => $uri ] |
|
161 | 161 | ]; |
162 | 162 | } else { |
163 | 163 | return $this->response->redirect($uri); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | return [ |
194 | 194 | 'status' => 200, |
195 | 195 | 'message' => $this->say('Snapshot deleted.'), |
196 | - 'action' => ['redirect' => $uri] |
|
196 | + 'action' => [ 'redirect' => $uri ] |
|
197 | 197 | ]; |
198 | 198 | } else { |
199 | 199 | return $this->response->redirect($uri); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | if (array_key_exists('backToList', $query)) { |
213 | 213 | $uri = $this->vault->uri('snapshots'); |
214 | 214 | } else { |
215 | - $uri = $request->getServerParams()['HTTP_REFERER']; |
|
215 | + $uri = $request->getServerParams()[ 'HTTP_REFERER' ]; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | return $uri; |
@@ -252,14 +252,14 @@ discard block |
||
252 | 252 | $incident->save(); |
253 | 253 | |
254 | 254 | $uri = $this->vault |
255 | - ->uri('snapshots:view', ['id' => $snapshot->primaryKey()]) |
|
255 | + ->uri('snapshots:view', [ 'id' => $snapshot->primaryKey() ]) |
|
256 | 256 | ->withFragment('history'); |
257 | 257 | |
258 | 258 | if ($this->input->isAjax()) { |
259 | 259 | return [ |
260 | 260 | 'status' => 200, |
261 | 261 | 'message' => $this->say('Snapshot incident suppressed.'), |
262 | - 'action' => ['redirect' => $uri] |
|
262 | + 'action' => [ 'redirect' => $uri ] |
|
263 | 263 | ]; |
264 | 264 | } else { |
265 | 265 | return $this->response->redirect($uri); |
@@ -368,14 +368,14 @@ discard block |
||
368 | 368 | $incident->delete(); |
369 | 369 | |
370 | 370 | $uri = $this->vault |
371 | - ->uri('snapshots:view', ['id' => $snapshot->primaryKey()]) |
|
371 | + ->uri('snapshots:view', [ 'id' => $snapshot->primaryKey() ]) |
|
372 | 372 | ->withFragment('history'); |
373 | 373 | |
374 | 374 | if ($this->input->isAjax()) { |
375 | 375 | return [ |
376 | 376 | 'status' => 200, |
377 | 377 | 'message' => $this->say('Snapshot incident deleted.'), |
378 | - 'action' => ['redirect' => $uri] |
|
378 | + 'action' => [ 'redirect' => $uri ] |
|
379 | 379 | ]; |
380 | 380 | } else { |
381 | 381 | return $this->response->redirect($uri); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | <div class="col s12 m2 right-align"> |
33 | 33 | <vault:guard permission="vault.snapshots.view"> |
34 | 34 | <vault:uri target="snapshots:view" icon="import_contacts" class="btn waves-effect waves-light" |
35 | - options="<?= ['id' => $lastSnapshot->primaryKey()] ?>"> |
|
35 | + options="<?= [ 'id' => $lastSnapshot->primaryKey() ] ?>"> |
|
36 | 36 | [[View last]] |
37 | 37 | </vault:uri> |
38 | 38 | </vault:guard> |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | |
92 | 92 | <grid:cell style="text-align:right"> |
93 | 93 | <vault:guard permission="vault.snapshots.view"> |
94 | - <vault:uri target="snapshots:view" icon="import_contacts" title="[[View snapshot]]" options="<?= ['id' => $entity->primaryKey()] ?>" |
|
94 | + <vault:uri target="snapshots:view" icon="import_contacts" title="[[View snapshot]]" options="<?= [ 'id' => $entity->primaryKey() ] ?>" |
|
95 | 95 | class="btn waves-effect"/> |
96 | 96 | </vault:guard> |
97 | 97 | <vault:guard permission="vault.snapshots.remove"> |
98 | 98 | <vault:uri target="snapshots:remove" icon="delete" title="[[Remove snapshot]]" class="btn red waves-effect waves-light" |
99 | - options="<?= ['id' => $entity->primaryKey()] ?>"/> |
|
99 | + options="<?= [ 'id' => $entity->primaryKey() ] ?>"/> |
|
100 | 100 | </vault:guard> |
101 | 101 | </grid:cell> |
102 | 102 | </vault:grid> |
@@ -42,13 +42,13 @@ |
||
42 | 42 | <grid:cell style="text-align:right"> |
43 | 43 | <vault:guard permission="vault.snapshots.view"> |
44 | 44 | <vault:uri target="snapshots:view" icon="import_contacts" title="[[View snapshot]]" |
45 | - options="<?= ['filename' => $entity->id()] ?>" |
|
45 | + options="<?= [ 'filename' => $entity->id() ] ?>" |
|
46 | 46 | class="btn waves-effect"/> |
47 | 47 | </vault:guard> |
48 | 48 | <vault:guard permission="vault.snapshots.remove"> |
49 | 49 | <vault:uri target="snapshots:remove" icon="delete" title="[[Remove snapshot]]" |
50 | 50 | class="btn red waves-effect waves-light" |
51 | - options="<?= ['filename' => $entity->id()] ?>"/> |
|
51 | + options="<?= [ 'filename' => $entity->id() ] ?>"/> |
|
52 | 52 | </vault:guard> |
53 | 53 | </grid:cell> |
54 | 54 | </vault:grid> |
@@ -64,8 +64,8 @@ |
||
64 | 64 | * {@inheritdoc} |
65 | 65 | */ |
66 | 66 | const INDEXES = [ |
67 | - [self::INDEX, 'exception_hash'], |
|
68 | - [self::INDEX, 'exception_hash', 'status'], |
|
67 | + [ self::INDEX, 'exception_hash' ], |
|
68 | + [ self::INDEX, 'exception_hash', 'status' ], |
|
69 | 69 | ]; |
70 | 70 | |
71 | 71 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | use LoggerTrait; |
95 | 95 | |
96 | - public function log($level, $message, array $context = []) |
|
96 | + public function log($level, $message, array $context = [ ]) |
|
97 | 97 | { |
98 | 98 | if ($level == LogLevel::ERROR) { |
99 | 99 | echo " \n! \033[31m" . $message . "\033[0m"; |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | return $this->orm->source(SnapshotRecord::class)->findOne( |
175 | - [], |
|
176 | - ['id' => SelectQuery::SORT_DESC] |
|
175 | + [ ], |
|
176 | + [ 'id' => SelectQuery::SORT_DESC ] |
|
177 | 177 | ); |
178 | 178 | } |
179 | 179 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | protected function handleFileSnapshot(Snapshot $snapshot, bool $report = true) |
185 | 185 | { |
186 | - $this->app->getBootloader()->bootload([FileHandlerBootloader::class]); |
|
186 | + $this->app->getBootloader()->bootload([ FileHandlerBootloader::class ]); |
|
187 | 187 | |
188 | 188 | /** @var DelegateSnapshot $delegate */ |
189 | 189 | $delegate = $this->factory->make(DelegateSnapshot::class, [ |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function testFileRender() |
13 | 13 | { |
14 | - $this->app->getBootloader()->bootload([FileHandlerBootloader::class]); |
|
14 | + $this->app->getBootloader()->bootload([ FileHandlerBootloader::class ]); |
|
15 | 15 | |
16 | 16 | $snapshot = $this->makeSnapshot('File error', 123); |
17 | 17 | /** @var DelegateSnapshot $delegate */ |