Passed
Push — master ( 00f5f9...789017 )
by Michał
21:02
created
test/BaseEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             'test_event' => [
58 58
                 'object'    => 'BlueEvent\Event\BaseEvent',
59 59
                 'listeners' => [
60
-                    function ($event) use (&$info) {
60
+                    function($event) use (&$info) {
61 61
                         /** @var $event \BlueEvent\Event\BaseEvent */
62 62
                         $info[] = $event->getEventCode();
63 63
                         $info[] = $event->getEventParameters();
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
             'test_event' => [
91 91
                 'object'    => 'BlueEvent\Event\BaseEvent',
92 92
                 'listeners' => [
93
-                    function ($event) {
93
+                    function($event) {
94 94
                         $event->something = true;
95 95
                     },
96
-                    function ($event) use (&$info) {
96
+                    function($event) use (&$info) {
97 97
                         $info = $event->something;
98 98
                     },
99 99
                 ]
Please login to merge, or discard this patch.
test/Config/YamlConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $arrayConfig = new YamlConfig;
20 20
         $config = $arrayConfig->readConfig(
21
-            __DIR__ . '/testConfig/config.yaml'
21
+            __DIR__.'/testConfig/config.yaml'
22 22
         );
23 23
 
24 24
         $this->assertEquals(
Please login to merge, or discard this patch.
test/Config/JsonConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $arrayConfig = new JsonConfig;
20 20
         $config = $arrayConfig->readConfig(
21
-            __DIR__ . '/testConfig/config.json'
21
+            __DIR__.'/testConfig/config.json'
22 22
         );
23 23
 
24 24
         $this->assertEquals(
Please login to merge, or discard this patch.
test/Config/IniConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $arrayConfig = new IniConfig;
20 20
         $config = $arrayConfig->readConfig(
21
-            __DIR__ . '/testConfig/config.ini'
21
+            __DIR__.'/testConfig/config.ini'
22 22
         );
23 23
 
24 24
         $this->assertEquals(
Please login to merge, or discard this patch.
test/Config/ArrayConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,6 @@
 block discarded – undo
31 31
      */
32 32
     public function getEventFileConfigPath()
33 33
     {
34
-        return __DIR__ . '/testConfig/config.php';
34
+        return __DIR__.'/testConfig/config.php';
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
test/Config/XmlConfigTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $arrayConfig = new XmlConfig;
20 20
         $config = $arrayConfig->readConfig(
21
-            __DIR__ . '/testConfig/config.xml'
21
+            __DIR__.'/testConfig/config.xml'
22 22
         );
23 23
 
24 24
         $this->assertEquals(
Please login to merge, or discard this patch.
test/EventDispatcherTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function setUp(): void
42 42
     {
43
-        $this->logPath = __DIR__ . '/log';
43
+        $this->logPath = __DIR__.'/log';
44 44
 
45 45
         $this->clearLog();
46 46
     }
@@ -87,21 +87,21 @@  discard block
 block discarded – undo
87 87
 
88 88
         unset($options['events']['test_event_code']['listeners'][3]);
89 89
 
90
-        $eventDispatcher   = new EventDispatcher;
90
+        $eventDispatcher = new EventDispatcher;
91 91
         $eventDispatcher->readEventConfiguration(
92 92
             $this->getEventFileConfigPath('array'),
93 93
             'array'
94 94
         );
95 95
         $this->assertEquals($options['events'], $eventDispatcher->getEventConfiguration());
96 96
 
97
-        $eventDispatcher   = new EventDispatcher;
97
+        $eventDispatcher = new EventDispatcher;
98 98
         $eventDispatcher->readEventConfiguration(
99 99
             $this->getEventFileConfigPath('json'),
100 100
             'json'
101 101
         );
102 102
         $this->assertEquals($options['events'], $eventDispatcher->getEventConfiguration());
103 103
 
104
-        $eventDispatcher   = new EventDispatcher;
104
+        $eventDispatcher = new EventDispatcher;
105 105
         $eventDispatcher->readEventConfiguration(
106 106
             $this->getEventFileConfigPath('ini'),
107 107
             'ini'
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                 'object'    => 'BlueEvent\Event\BaseEvent',
163 163
                 'listeners' => [
164 164
                     'BlueEventTest\EventDispatcherTest::trigger',
165
-                    function ($event) {
165
+                    function($event) {
166 166
                         /** @var $event \BlueEvent\Event\BaseEvent */
167 167
                         self::$eventTriggered += $event->getEventParameters()['value'];
168 168
                     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 'object'    => 'BlueEvent\Event\BaseEvent',
196 196
                 'listeners' => [
197 197
                     'BlueEventTest\EventDispatcherTest::triggerStop',
198
-                    function ($event) {
198
+                    function($event) {
199 199
                         /** @var $event \BlueEvent\Event\BaseEvent */
200 200
                         self::$eventTriggered += $event->getEventParameters()['value'];
201 201
                     }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $instance->addEventListener(
218 218
             'test_event',
219 219
             [
220
-                function ($event) {
220
+                function($event) {
221 221
                     /** @var $event \BlueEvent\Event\BaseEvent */
222 222
                     self::$eventTriggered += $event->getEventParameters()['value'];
223 223
                 }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $instance->addEventListener(
248 248
             'test_event',
249 249
             [
250
-                function ($event) {
250
+                function($event) {
251 251
                     /** @var $event \BlueEvent\Event\BaseEvent */
252 252
                     self::$eventTriggered += $event->getEventParameters()['value'];
253 253
                 }
@@ -370,15 +370,15 @@  discard block
 block discarded – undo
370 370
                 'listeners' => [
371 371
                     [__CLASS__, 'trigger'],
372 372
                     'BlueEventTest\EventDispatcherTest::triggerError',
373
-                    function () {
373
+                    function() {
374 374
                     }
375 375
                 ]
376 376
             ],
377 377
         ]);
378 378
 
379
-        $this->assertFileDoesNotExist($this->logPath . self::EVENT_LOG_NAME);
379
+        $this->assertFileDoesNotExist($this->logPath.self::EVENT_LOG_NAME);
380 380
         $instance->triggerEvent('test_event');
381
-        $this->assertFileExists($this->logPath . self::EVENT_LOG_NAME);
381
+        $this->assertFileExists($this->logPath.self::EVENT_LOG_NAME);
382 382
     }
383 383
 
384 384
     /**
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             $extension = 'php';
505 505
         }
506 506
 
507
-        return __DIR__ . '/Config/testConfig/config.' . $extension;
507
+        return __DIR__.'/Config/testConfig/config.'.$extension;
508 508
     }
509 509
 
510 510
     /**
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             'test_event' => [
547 547
                 'object'    => 'BlueEvent\Event\BaseEvent',
548 548
                 'listeners' => [
549
-                    function ($event) use (&$testData) {
549
+                    function($event) use (&$testData) {
550 550
                         /** @var $event \BlueEvent\Event\BaseEvent */
551 551
                         $testData['test_event'] = $event->getEventParameters();
552 552
                     }
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
             'test_event_other' => [
556 556
                 'object'    => 'BlueEvent\Event\BaseEvent',
557 557
                 'listeners' => [
558
-                    function ($event) use (&$testData) {
558
+                    function($event) use (&$testData) {
559 559
                         /** @var $event \BlueEvent\Event\BaseEvent */
560 560
                         $testData['test_event_other'] = $event->getEventParameters();
561 561
                     }
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 
583 583
     protected function clearLog()
584 584
     {
585
-        $logFile = $this->logPath . self::EVENT_LOG_NAME;
585
+        $logFile = $this->logPath.self::EVENT_LOG_NAME;
586 586
 
587 587
         if (file_exists($logFile)) {
588 588
             unlink($logFile);
Please login to merge, or discard this patch.
test/EventLogTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
         $instance->logEvents[] = 'some_name';
34 34
 
35
-        $this->assertFileDoesNotExist($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
35
+        $this->assertFileDoesNotExist($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
36 36
         $instance->makeLogEvent('some_name', 'some_listener', EventDispatcher::EVENT_STATUS_OK);
37
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
37
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
38 38
     }
39 39
 
40 40
 
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
         $instance->logEvents[] = 'some_name';
57 57
         $instance->logEvents[] = 'some_name_2';
58 58
 
59
-        $this->assertFileDoesNotExist($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
59
+        $this->assertFileDoesNotExist($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
60 60
         $instance->makeLogEvent('some_name', 'some_listener', EventDispatcher::EVENT_STATUS_OK);
61 61
         $instance->makeLogEvent(
62 62
             'some_name_2',
63
-            function () {
63
+            function() {
64 64
             },
65 65
             EventDispatcher::EVENT_STATUS_OK
66 66
         );
67
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
67
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
68 68
     }
69 69
 
70 70
     public function testEventLogWithGivenLogObject()
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 
83 83
         $instance->logEvents[] = 'some_name';
84 84
 
85
-        $this->assertFileDoesNotExist($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
85
+        $this->assertFileDoesNotExist($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
86 86
         $instance->makeLogEvent('some_name', ['class', 'method'], EventDispatcher::EVENT_STATUS_OK);
87
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
87
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
88 88
     }
89 89
 
90 90
     /**
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function setUp(): void
94 94
     {
95
-        $this->logPath = __DIR__ . '/log';
95
+        $this->logPath = __DIR__.'/log';
96 96
 
97 97
         $this->clearLog();
98 98
     }
99 99
 
100 100
     protected function clearLog()
101 101
     {
102
-        $logFile = $this->logPath . EventDispatcherTest::EVENT_LOG_NAME;
102
+        $logFile = $this->logPath.EventDispatcherTest::EVENT_LOG_NAME;
103 103
 
104 104
         if (file_exists($logFile)) {
105 105
             unlink($logFile);
Please login to merge, or discard this patch.
src/Event/Config/YamlConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function readConfig(string $path): array
16 16
     {
17
-        $reader = new Yaml(['Spyc','YAMLLoadString']);
17
+        $reader = new Yaml(['Spyc', 'YAMLLoadString']);
18 18
         return $reader->fromFile($path);
19 19
     }
20 20
 }
Please login to merge, or discard this patch.