Passed
Pull Request — master (#3)
by Valentin
03:18
created
source/Snapshotter/AggregationHandler/Controllers/SnapshotsController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use Spiral\Snapshotter\AggregationHandler\Services\SnapshotService;
16 16
 use Spiral\Snapshotter\Helpers\Names;
17 17
 use Spiral\Snapshotter\Helpers\Timestamps;
18
-
19 18
 use Spiral\Vault\Vault;
20 19
 use Spiral\Views\ViewManager;
21 20
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
252 252
         $incident->save();
253 253
 
254 254
         $uri = $this->vault
255
-            ->uri('snapshots:edit', ['id' => $snapshot->primaryKey()])
255
+            ->uri('snapshots:edit', [ '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
 block discarded – undo
368 368
         $incident->delete();
369 369
 
370 370
         $uri = $this->vault
371
-            ->uri('snapshots:edit', ['id' => $snapshot->primaryKey()])
371
+            ->uri('snapshots:edit', [ '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);
Please login to merge, or discard this patch.
source/Snapshotter/AggregationHandler/Services/SnapshotService.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Spiral\Snapshotter\AggregationHandler\Database\SnapshotRecord;
9 9
 use Spiral\Snapshotter\AggregationHandler\Database\Sources\SnapshotSource;
10 10
 use Spiral\Snapshotter\AggregationHandler\Database\Sources\IncidentSource;
11
-use Spiral\Snapshotter\AggregationHandler\Database\Types\IncidentStatus;
12 11
 
13 12
 class SnapshotService extends Service
14 13
 {
Please login to merge, or discard this patch.
tests/BaseTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Spiral\Snapshotter\DelegateSnapshot;
15 15
 use Spiral\Snapshotter\AggregationHandler\Database\SnapshotRecord;
16 16
 use Spiral\Snapshotter\AggregationHandler;
17
-use Spiral\Snapshotter\FileHandler;
18 17
 
19 18
 /**
20 19
  * @property \Spiral\Core\MemoryInterface             $memory
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             {
95 95
                 use LoggerTrait;
96 96
 
97
-                public function log($level, $message, array $context = [])
97
+                public function log($level, $message, array $context = [ ])
98 98
                 {
99 99
                     if ($level == LogLevel::ERROR) {
100 100
                         echo " \n! \033[31m" . $message . "\033[0m";
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
         }
174 174
 
175 175
         return $this->orm->source(SnapshotRecord::class)->findOne(
176
-            [],
177
-            ['id' => SelectQuery::SORT_DESC]
176
+            [ ],
177
+            [ 'id' => SelectQuery::SORT_DESC ]
178 178
         );
179 179
     }
180 180
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     protected function handleFileSnapshot(Snapshot $snapshot, bool $report = true)
186 186
     {
187
-        $this->app->getBootloader()->bootload([FileSnapshotterBootloader::class]);
187
+        $this->app->getBootloader()->bootload([ FileSnapshotterBootloader::class ]);
188 188
 
189 189
         /** @var DelegateSnapshot $delegate */
190 190
         $delegate = $this->factory->make(DelegateSnapshot::class, [
Please login to merge, or discard this patch.
tests/Snapshotter/DelegateTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Spiral\Snapshotter\DelegateSnapshot;
8 8
 use Spiral\Snapshotter\HandlerInterface;
9 9
 use Spiral\Tests\BaseTest;
10
-use Symfony\Component\Debug\Debug;
11 10
 
12 11
 class DelegateTest extends BaseTest
13 12
 {
Please login to merge, or discard this patch.
tests/Snapshotter/FileHandlerTest.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Spiral\Tests\Snapshotter;
4 4
 
5
-use Spiral\Snapshotter\AggregationHandler;
6
-use Spiral\Snapshotter\AggregationHandler\Database\IncidentRecord;
7
-use Spiral\Snapshotter\AggregationHandler\Database\SnapshotRecord;
8 5
 use Spiral\Snapshotter\Bootloaders\FileSnapshotterBootloader;
9 6
 use Spiral\Snapshotter\DelegateSnapshot;
10 7
 use Spiral\Tests\BaseTest;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
     public function testFileRender()
15 15
     {
16
-        $this->app->getBootloader()->bootload([FileSnapshotterBootloader::class]);
16
+        $this->app->getBootloader()->bootload([ FileSnapshotterBootloader::class ]);
17 17
 
18 18
         $snapshot = $this->makeSnapshot('File error', 123);
19 19
         /** @var DelegateSnapshot $delegate */
Please login to merge, or discard this patch.
source/views/file/list.dark.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
         <grid:cell style="text-align:right">
40 40
             <vault:guard permission="vault.snapshots.view">
41 41
                 <vault:uri target="snapshots:view" icon="edit"
42
-                           options="<?= ['filename' => $entity->id()] ?>"
42
+                           options="<?= [ 'filename' => $entity->id() ] ?>"
43 43
                            class="btn-flat waves-effect"/>
44 44
             </vault:guard>
45 45
             <vault:guard permission="vault.snapshots.remove">
46 46
                 <vault:uri target="snapshots:remove" icon="delete"
47 47
                            class="btn red waves-effect waves-light"
48
-                           options="<?= ['filename' => $entity->id()] ?>"/>
48
+                           options="<?= [ 'filename' => $entity->id() ] ?>"/>
49 49
             </vault:guard>
50 50
         </grid:cell>
51 51
     </vault:grid>
Please login to merge, or discard this patch.
source/views/file/snapshot.dark.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 <define:actions>
29 29
     <vault:guard permission="vault.snapshots.remove">
30 30
         <vault:uri target="snapshots:remove" icon="delete" class="btn red waves-effect waves-light"
31
-                   options="<?= ['filename' => $snapshot->id(), 'backToList' => 1] ?>">
31
+                   options="<?= [ 'filename' => $snapshot->id(), 'backToList' => 1 ] ?>">
32 32
             [[Remove]]
33 33
         </vault:uri>
34 34
     </vault:guard>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         </vault:card>
47 47
         <vault:block>
48 48
             <iframe src="<?= vault()->uri('snapshots:iframe',
49
-                ['filename' => $snapshot->id()]) ?>" width="100%" height="100%" frameborder="0"
49
+                [ 'filename' => $snapshot->id() ]) ?>" width="100%" height="100%" frameborder="0"
50 50
                     scrolling="no" onload="javascript:resizeIframe(this);"></iframe>
51 51
         </vault:block>
52 52
     </vault:guard>
Please login to merge, or discard this patch.
source/views/aggregation/list.dark.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     <vault:guard permission="vault.snapshots.view">
36 36
                         <vault:uri target="snapshots:view" icon="edit"
37 37
                                    class="btn teal waves-effect waves-light"
38
-                                   options="<?= ['id' => $lastSnapshot->primaryKey()] ?>">
38
+                                   options="<?= [ 'id' => $lastSnapshot->primaryKey() ] ?>">
39 39
                             [[View last]]
40 40
                         </vault:uri>
41 41
                     </vault:guard>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         <grid:cell style="text-align:right">
96 96
             <vault:guard permission="vault.snapshots.view">
97 97
                 <vault:uri target="snapshots:view" icon="edit"
98
-                           options="<?= ['id' => $entity->primaryKey()] ?>"
98
+                           options="<?= [ 'id' => $entity->primaryKey() ] ?>"
99 99
                            class="btn-flat waves-effect"/>
100 100
             </vault:guard>
101 101
         </grid:cell>
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             <vault:guard permission="vault.snapshots.remove">
104 104
                 <vault:uri target="snapshots:remove" icon="delete"
105 105
                            class="btn red waves-effect waves-light"
106
-                           options="<?= ['id' => $entity->primaryKey()] ?>"/>
106
+                           options="<?= [ 'id' => $entity->primaryKey() ] ?>"/>
107 107
             </vault:guard>
108 108
         </grid:cell>
109 109
     </vault:grid>
Please login to merge, or discard this patch.
source/views/aggregation/incident.dark.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
         <?php if ($incident->status->isStored()) { ?>
24 24
             <vault:uri target="snapshots:suppressIncident" class="btn teal waves-effect waves-light"
25 25
                        options="<?= [
26
-                           'id'       => $snapshot->primaryKey(),
27
-                           'incident' => $incident->primaryKey()
28
-                       ] ?>">[[Suppress]]
26
+                            'id'       => $snapshot->primaryKey(),
27
+                            'incident' => $incident->primaryKey()
28
+                        ] ?>">[[Suppress]]
29 29
             </vault:uri>
30 30
         <?php } ?>
31 31
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         <?php } ?>
31 31
 
32 32
         <vault:uri target="snapshots:view" class="btn-flat teal-text waves-effect"
33
-                   post-icon="trending_flat" options="<?= ['id' => $snapshot->primaryKey()] ?>">
33
+                   post-icon="trending_flat" options="<?= [ 'id' => $snapshot->primaryKey() ] ?>">
34 34
             [[BACK]]
35 35
         </vault:uri>
36 36
     </vault:guard>
Please login to merge, or discard this patch.