Passed
Push — master ( 156cbf...408f83 )
by Anton
06:52
created
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.
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/snapshot.dark.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         <?php if ($selector->count()) { ?>
37 37
             <vault:uri target="snapshots:remove" icon="delete"
38 38
                        class="btn red waves-effect waves-light"
39
-                       options="<?= ['id' => $snapshot->primaryKey(), 'backToList' => 1] ?>">
39
+                       options="<?= [ 'id' => $snapshot->primaryKey(), 'backToList' => 1 ] ?>">
40 40
                 [[Remove]]
41 41
             </vault:uri>
42 42
         <?php } ?>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             <vault:guard permission="vault.snapshots.view">
53 53
                 <vault:block>
54 54
                     <iframe src="<?= vault()->uri('snapshots:iframe',
55
-                        ['id' => $snapshot->primaryKey()]) ?>" width="100%" height="100%"
55
+                        [ 'id' => $snapshot->primaryKey() ]) ?>" width="100%" height="100%"
56 56
                             frameborder="0" scrolling="no"
57 57
                             onload="javascript:resizeIframe(this);"></iframe>
58 58
                 </vault:block>
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -166,9 +166,9 @@
 block discarded – undo
166 166
                                            title="[[Suppress incident]]"
167 167
                                            class="btn blue-grey darken-2 waves-effect waves-light"
168 168
                                            options="<?= [
169
-                                               'id'       => $snapshot->primaryKey(),
170
-                                               'incident' => $entity->primaryKey(),
171
-                                           ] ?>"></vault:uri>
169
+                                                'id'       => $snapshot->primaryKey(),
170
+                                                'incident' => $entity->primaryKey(),
171
+                                            ] ?>"></vault:uri>
172 172
                             </vault:guard>
173 173
                         <?php }
174 174
 
Please login to merge, or discard this patch.
source/Snapshotter/AggregationHandler/Database/IncidentRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * {@inheritdoc}
65 65
      */
66 66
     const INDEXES = [
67
-        [self::INDEX, 'exception_hash'],
67
+        [ self::INDEX, 'exception_hash' ],
68 68
     ];
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
source/Snapshotter/AggregationHandler/Database/SnapshotRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      * {@inheritdoc}
59 59
      */
60 60
     const INDEXES = [
61
-        [self::UNIQUE, 'exception_hash'],
61
+        [ self::UNIQUE, 'exception_hash' ],
62 62
     ];
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
source/Snapshotter/AggregationHandler/Database/Types/IncidentStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /**
18 18
      * Values.
19 19
      */
20
-    const VALUES  = [self::STORED, self::DELETED, self::SUPPRESSED, self::LAST];
20
+    const VALUES = [ self::STORED, self::DELETED, self::SUPPRESSED, self::LAST ];
21 21
 
22 22
     /**
23 23
      * Default values.
Please login to merge, or discard this patch.
source/Snapshotter/AggregationHandler/Database/Sources/IncidentSource.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $where = [
25 25
             'status' => [
26
-                'IN' => new Parameter([IncidentStatus::LAST, IncidentStatus::STORED])
26
+                'IN' => new Parameter([ IncidentStatus::LAST, IncidentStatus::STORED ])
27 27
             ]
28 28
         ];
29 29
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param array          $load
73 73
      * @return null|IncidentRecord
74 74
      */
75
-    public function findStoredBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [])
75
+    public function findStoredBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [ ])
76 76
     {
77 77
         /** @var IncidentRecord $incident */
78 78
         $incident = $this->findByPK($id, $load);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @param array          $load
94 94
      * @return null|IncidentRecord
95 95
      */
96
-    public function findBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [])
96
+    public function findBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [ ])
97 97
     {
98 98
         /** @var IncidentRecord $incident */
99 99
         $incident = $this->findByPK($id, $load);
Please login to merge, or discard this patch.