Test Failed
Push — master ( 3e3af7...9ad88d )
by Valentin
09:45
created
tests/Snapshotter/AggregationHandler/Services/SnapshotServiceTest.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -62,18 +62,18 @@  discard block
 block discarded – undo
62 62
         $snapshotRecord = $this->handleSnapshot($snapshot, true);
63 63
         $counters = $service->countOccurred($snapshotRecord, $source);
64 64
 
65
-        $this->assertEquals(1, $counters['daily']);
66
-        $this->assertEquals(1, $counters['weekly']);
67
-        $this->assertEquals(1, $counters['monthly']);
68
-        $this->assertEquals(1, $counters['yearly']);
65
+        $this->assertEquals(1, $counters[ 'daily' ]);
66
+        $this->assertEquals(1, $counters[ 'weekly' ]);
67
+        $this->assertEquals(1, $counters[ 'monthly' ]);
68
+        $this->assertEquals(1, $counters[ 'yearly' ]);
69 69
 
70 70
         $this->handleSnapshot($snapshot, true);
71 71
         $counters = $service->countOccurred($snapshotRecord, $source);
72 72
 
73
-        $this->assertEquals(2, $counters['daily']);
74
-        $this->assertEquals(2, $counters['weekly']);
75
-        $this->assertEquals(2, $counters['monthly']);
76
-        $this->assertEquals(2, $counters['yearly']);
73
+        $this->assertEquals(2, $counters[ 'daily' ]);
74
+        $this->assertEquals(2, $counters[ 'weekly' ]);
75
+        $this->assertEquals(2, $counters[ 'monthly' ]);
76
+        $this->assertEquals(2, $counters[ 'yearly' ]);
77 77
 
78 78
         /** @var IncidentRecord $incident */
79 79
         $incident = $snapshotRecord->getIncidentsHistory()->getIterator()->current();
@@ -83,40 +83,40 @@  discard block
 block discarded – undo
83 83
         $incident->save();
84 84
 
85 85
         $counters = $service->countOccurred($snapshotRecord, $source);
86
-        $this->assertEquals(1, $counters['daily']);
87
-        $this->assertEquals(2, $counters['weekly']);
88
-        $this->assertEquals(2, $counters['monthly']);
89
-        $this->assertEquals(2, $counters['yearly']);
86
+        $this->assertEquals(1, $counters[ 'daily' ]);
87
+        $this->assertEquals(2, $counters[ 'weekly' ]);
88
+        $this->assertEquals(2, $counters[ 'monthly' ]);
89
+        $this->assertEquals(2, $counters[ 'yearly' ]);
90 90
 
91 91
         //One of them occurred not in this week
92 92
         $incident->time_created = (new \DateTime('now'))->sub(new \DateInterval('P8D'));
93 93
         $incident->save();
94 94
 
95 95
         $counters = $service->countOccurred($snapshotRecord, $source);
96
-        $this->assertEquals(1, $counters['daily']);
97
-        $this->assertEquals(1, $counters['weekly']);
98
-        $this->assertEquals(2, $counters['monthly']);
99
-        $this->assertEquals(2, $counters['yearly']);
96
+        $this->assertEquals(1, $counters[ 'daily' ]);
97
+        $this->assertEquals(1, $counters[ 'weekly' ]);
98
+        $this->assertEquals(2, $counters[ 'monthly' ]);
99
+        $this->assertEquals(2, $counters[ 'yearly' ]);
100 100
 
101 101
         //One of them occurred not in this month
102 102
         $incident->time_created = (new \DateTime('now'))->sub(new \DateInterval('P2M'));
103 103
         $incident->save();
104 104
 
105 105
         $counters = $service->countOccurred($snapshotRecord, $source);
106
-        $this->assertEquals(1, $counters['daily']);
107
-        $this->assertEquals(1, $counters['weekly']);
108
-        $this->assertEquals(1, $counters['monthly']);
109
-        $this->assertEquals(2, $counters['yearly']);
106
+        $this->assertEquals(1, $counters[ 'daily' ]);
107
+        $this->assertEquals(1, $counters[ 'weekly' ]);
108
+        $this->assertEquals(1, $counters[ 'monthly' ]);
109
+        $this->assertEquals(2, $counters[ 'yearly' ]);
110 110
 
111 111
         //One of them occurred not in this year
112 112
         $incident->time_created = (new \DateTime('now'))->sub(new \DateInterval('P2Y'));
113 113
         $incident->save();
114 114
 
115 115
         $counters = $service->countOccurred($snapshotRecord, $source);
116
-        $this->assertEquals(1, $counters['daily']);
117
-        $this->assertEquals(1, $counters['weekly']);
118
-        $this->assertEquals(1, $counters['monthly']);
119
-        $this->assertEquals(1, $counters['yearly']);
116
+        $this->assertEquals(1, $counters[ 'daily' ]);
117
+        $this->assertEquals(1, $counters[ 'weekly' ]);
118
+        $this->assertEquals(1, $counters[ 'monthly' ]);
119
+        $this->assertEquals(1, $counters[ 'yearly' ]);
120 120
     }
121 121
 
122 122
     /**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $this->assertNotEmpty($snapshotRecord->getLastIncident());
140 140
         $this->assertCount(0, $snapshotRecord->getIncidentsHistory());
141 141
         $this->assertCount(1, $incidentSource);
142
-        $this->assertCount(1, $incidentSource->find(['status' => IncidentStatus::LAST]));
142
+        $this->assertCount(1, $incidentSource->find([ 'status' => IncidentStatus::LAST ]));
143 143
 
144 144
         $service->delete($snapshotRecord);
145 145
 
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
         $this->assertEmpty($snapshotRecord->getLastIncident());
152 152
         $this->assertCount(1, $snapshotRecord->getIncidentsHistory());
153 153
         $this->assertCount(1, $incidentSource);
154
-        $this->assertCount(1, $incidentSource->find(['status' => IncidentStatus::DELETED]));
154
+        $this->assertCount(1, $incidentSource->find([ 'status' => IncidentStatus::DELETED ]));
155 155
 
156 156
         /** @var IncidentRecord $incident */
157
-        $incident = iterator_to_array($snapshotRecord->getIncidentsHistory())[0];
157
+        $incident = iterator_to_array($snapshotRecord->getIncidentsHistory())[ 0 ];
158 158
 
159 159
         $this->assertNotEmpty($incident);
160 160
         $this->assertEmpty($incident->getExceptionSource());
Please login to merge, or discard this patch.
tests/Snapshotter/AggregationHandler/Database/SnapshotRecordTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $this->assertCount(1, $record->getIncidentsHistory());
33 33
 
34 34
         /** @var IncidentRecord $incident */
35
-        $incident = iterator_to_array($record->getIncidentsHistory())[0];
35
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 0 ];
36 36
 
37 37
         $this->assertNotEmpty($incident);
38 38
         $this->assertNotEmpty($incident->getExceptionSource());
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
         $this->assertEquals(3, $record->count_occurred);
48 48
         $this->assertCount(2, $record->getIncidentsHistory());
49 49
 
50
-        $incident = iterator_to_array($record->getIncidentsHistory())[0];
50
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 0 ];
51 51
 
52 52
         $this->assertNotEmpty($incident);
53 53
         $this->assertNotEmpty($incident->getExceptionSource());
54 54
         $this->assertTrue($incident->status->isStored());
55 55
 
56
-        $incident = iterator_to_array($record->getIncidentsHistory())[1];
56
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 1 ];
57 57
 
58 58
         $this->assertNotEmpty($incident);
59 59
         $this->assertEmpty($incident->getExceptionSource());
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
         $this->assertEquals(4, $record->count_occurred);
70 70
         $this->assertCount(3, $record->getIncidentsHistory());
71 71
 
72
-        $incident = iterator_to_array($record->getIncidentsHistory())[0];
72
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 0 ];
73 73
 
74 74
         $this->assertNotEmpty($incident);
75 75
         $this->assertNotEmpty($incident->getExceptionSource());
76 76
         $this->assertTrue($incident->status->isStored());
77 77
 
78
-        $incident = iterator_to_array($record->getIncidentsHistory())[1];
78
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 1 ];
79 79
 
80 80
         $this->assertNotEmpty($incident);
81 81
         $this->assertEmpty($incident->getExceptionSource());
82 82
         $this->assertFalse($incident->status->isStored());
83 83
         $this->assertTrue($incident->status->isSuppressed());
84 84
 
85
-        $incident = iterator_to_array($record->getIncidentsHistory())[2];
85
+        $incident = iterator_to_array($record->getIncidentsHistory())[ 2 ];
86 86
 
87 87
         $this->assertNotEmpty($incident);
88 88
         $this->assertNotEmpty($incident->getExceptionSource());
Please login to merge, or discard this patch.
tests/Snapshotter/HelpersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         /** @var Timestamps $names */
28 28
         $names = $this->container->get(Timestamps::class);
29 29
 
30
-        $timestamp = new FileTimestamp(new \DateTime(), []);
30
+        $timestamp = new FileTimestamp(new \DateTime(), [ ]);
31 31
 
32 32
         $this->assertEquals($timestamp, $names->getTime($timestamp));
33 33
         $this->assertNotEquals('filename', $names->getTime($timestamp, true));
Please login to merge, or discard this patch.
tests/-app-/config/databases.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             'profiling'  => env('DEBUG', false),
58 58
             'username'   => 'sqlite',
59 59
             'password'   => '',
60
-            'options'    => []
60
+            'options'    => [ ]
61 61
         ],
62 62
         /*{{connections}}*/
63 63
     ]
Please login to merge, or discard this patch.
tests/-app-/config/translator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
         'requests'   => [
49 49
             'requests-*'
50 50
         ],
51
-        'external'   => ['external'],
52
-        'messages'   => ['*'],
51
+        'external'   => [ 'external' ],
52
+        'messages'   => [ '*' ],
53 53
         /*{{domains}}*/
54 54
     ],
55 55
 
Please login to merge, or discard this patch.
tests/-app-/config/views.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
      * goal is to provide ability to evaluate some functionality at compilation (not runtime) phase.
51 51
      */
52 52
     'environment' => [
53
-        'language' => ['translator', 'getLocale'],
54
-        'basePath' => ['http', 'basePath'],
53
+        'language' => [ 'translator', 'getLocale' ],
54
+        'basePath' => [ 'http', 'basePath' ],
55 55
         /*{{environment}}*/
56 56
     ],
57 57
 
Please login to merge, or discard this patch.
tests/-app-/config/http.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
     'router'       => [
65 65
         //You can use your own router or entirely replace http endpoint using option above
66 66
         'class'   => Http\Routing\Router::class,
67
-        'options' => []
67
+        'options' => [ ]
68 68
     ],
69 69
 
70 70
     /*
Please login to merge, or discard this patch.
tests/-app-/config/schemas/records.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 return [
10 10
     'mutators' => [
11
-        'timestamp'  => ['accessor' => Accessors\SqlTimestamp::class],
12
-        'datetime'   => ['accessor' => Accessors\SqlTimestamp::class],
13
-        'php:int'    => ['setter' => 'intval', 'getter' => 'intval'],
14
-        'php:float'  => ['setter' => 'floatval', 'getter' => 'floatval'],
15
-        'php:string' => ['setter' => 'strval'],
16
-        'php:bool'   => ['setter' => 'boolval', 'getter' => 'boolval'],
11
+        'timestamp'  => [ 'accessor' => Accessors\SqlTimestamp::class ],
12
+        'datetime'   => [ 'accessor' => Accessors\SqlTimestamp::class ],
13
+        'php:int'    => [ 'setter' => 'intval', 'getter' => 'intval' ],
14
+        'php:float'  => [ 'setter' => 'floatval', 'getter' => 'floatval' ],
15
+        'php:string' => [ 'setter' => 'strval' ],
16
+        'php:bool'   => [ 'setter' => 'boolval', 'getter' => 'boolval' ],
17 17
         /*{{mutators}}*/
18 18
     ],
19 19
     'aliases'  => [
Please login to merge, or discard this patch.
tests/-app-/config/schemas/documents.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@
 block discarded – undo
15 15
      * Set of mutators to be applied for specific field types.
16 16
      */
17 17
     'mutators' => [
18
-        'int'      => ['setter' => 'intval'],
19
-        'float'    => ['setter' => 'floatval'],
20
-        'string'   => ['setter' => 'strval'],
21
-        'bool'     => ['setter' => 'boolval'],
18
+        'int'      => [ 'setter' => 'intval' ],
19
+        'float'    => [ 'setter' => 'floatval' ],
20
+        'string'   => [ 'setter' => 'strval' ],
21
+        'bool'     => [ 'setter' => 'boolval' ],
22 22
 
23 23
         //Automatic casting of mongoID
24
-        'ObjectID' => ['setter' => [ODM::class, 'mongoID']],
24
+        'ObjectID' => [ 'setter' => [ ODM::class, 'mongoID' ] ],
25 25
 
26
-        'array::string'    => ['accessor' => ODMAccessors\StringArray::class],
27
-        'array::objectIDs' => ['accessor' => ODMAccessors\ObjectIDsArray::class],
28
-        'array::integer'   => ['accessor' => ODMAccessors\IntegerArray::class],
26
+        'array::string'    => [ 'accessor' => ODMAccessors\StringArray::class ],
27
+        'array::objectIDs' => [ 'accessor' => ODMAccessors\ObjectIDsArray::class ],
28
+        'array::integer'   => [ 'accessor' => ODMAccessors\IntegerArray::class ],
29 29
 
30
-        'timestamp' => ['accessor' => Accessors\UTCMongoTimestamp::class],
30
+        'timestamp' => [ 'accessor' => Accessors\UTCMongoTimestamp::class ],
31 31
         /*{{mutators}}*/
32 32
     ],
33 33
     /*
Please login to merge, or discard this patch.