Passed
Branch master (295cdc)
by Michał
02:31
created
test/EventDispatcherTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     protected function setUp()
41 41
     {
42
-        $this->logPath = __DIR__ . '/log';
42
+        $this->logPath = __DIR__.'/log';
43 43
 
44 44
         $this->clearLog();
45 45
     }
@@ -86,21 +86,21 @@  discard block
 block discarded – undo
86 86
 
87 87
         unset($options['events']['test_event_code']['listeners'][3]);
88 88
 
89
-        $eventDispatcher   = new EventDispatcher;
89
+        $eventDispatcher = new EventDispatcher;
90 90
         $eventDispatcher->readEventConfiguration(
91 91
             $this->getEventFileConfigPath('array'),
92 92
             'array'
93 93
         );
94 94
         $this->assertEquals($options['events'], $eventDispatcher->getEventConfiguration());
95 95
 
96
-        $eventDispatcher   = new EventDispatcher;
96
+        $eventDispatcher = new EventDispatcher;
97 97
         $eventDispatcher->readEventConfiguration(
98 98
             $this->getEventFileConfigPath('json'),
99 99
             'json'
100 100
         );
101 101
         $this->assertEquals($options['events'], $eventDispatcher->getEventConfiguration());
102 102
 
103
-        $eventDispatcher   = new EventDispatcher;
103
+        $eventDispatcher = new EventDispatcher;
104 104
         $eventDispatcher->readEventConfiguration(
105 105
             $this->getEventFileConfigPath('ini'),
106 106
             'ini'
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 'object'    => 'BlueEvent\Event\BaseEvent',
165 165
                 'listeners' => [
166 166
                     'BlueEventTest\EventDispatcherTest::trigger',
167
-                    function ($event) {
167
+                    function($event) {
168 168
                         /** @var $event \BlueEvent\Event\BaseEvent */
169 169
                         self::$eventTriggered += $event->getEventParameters()['value'];
170 170
                     }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 'object'    => 'BlueEvent\Event\BaseEvent',
198 198
                 'listeners' => [
199 199
                     'BlueEventTest\EventDispatcherTest::triggerStop',
200
-                    function ($event) {
200
+                    function($event) {
201 201
                         /** @var $event \BlueEvent\Event\BaseEvent */
202 202
                         self::$eventTriggered += $event->getEventParameters()['value'];
203 203
                     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $instance->addEventListener(
220 220
             'test_event',
221 221
             [
222
-                function ($event) {
222
+                function($event) {
223 223
                     /** @var $event \BlueEvent\Event\BaseEvent */
224 224
                     self::$eventTriggered += $event->getEventParameters()['value'];
225 225
                 }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $instance->addEventListener(
250 250
             'test_event',
251 251
             [
252
-                function ($event) {
252
+                function($event) {
253 253
                     /** @var $event \BlueEvent\Event\BaseEvent */
254 254
                     self::$eventTriggered += $event->getEventParameters()['value'];
255 255
                 }
@@ -373,15 +373,15 @@  discard block
 block discarded – undo
373 373
                 'listeners' => [
374 374
                     [__CLASS__, 'trigger'],
375 375
                     'BlueEventTest\EventDispatcherTest::triggerError',
376
-                    function () {
376
+                    function() {
377 377
                     }
378 378
                 ]
379 379
             ],
380 380
         ]);
381 381
 
382
-        $this->assertFileNotExists($this->logPath . self::EVENT_LOG_NAME);
382
+        $this->assertFileNotExists($this->logPath.self::EVENT_LOG_NAME);
383 383
         $instance->triggerEvent('test_event');
384
-        $this->assertFileExists($this->logPath . self::EVENT_LOG_NAME);
384
+        $this->assertFileExists($this->logPath.self::EVENT_LOG_NAME);
385 385
     }
386 386
 
387 387
     /**
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             $extension = 'php';
508 508
         }
509 509
 
510
-        return __DIR__ . '/Config/testConfig/config.' . $extension;
510
+        return __DIR__.'/Config/testConfig/config.'.$extension;
511 511
     }
512 512
 
513 513
     /**
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             'test_event' => [
550 550
                 'object'    => 'BlueEvent\Event\BaseEvent',
551 551
                 'listeners' => [
552
-                    function ($event) use (&$testData) {
552
+                    function($event) use (&$testData) {
553 553
                         /** @var $event \BlueEvent\Event\BaseEvent */
554 554
                         $testData['test_event'] = $event->getEventParameters();
555 555
                     }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             'test_event_other' => [
559 559
                 'object'    => 'BlueEvent\Event\BaseEvent',
560 560
                 'listeners' => [
561
-                    function ($event) use (&$testData) {
561
+                    function($event) use (&$testData) {
562 562
                         /** @var $event \BlueEvent\Event\BaseEvent */
563 563
                         $testData['test_event_other'] = $event->getEventParameters();
564 564
                     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 
586 586
     protected function clearLog()
587 587
     {
588
-        $logFile = $this->logPath . self::EVENT_LOG_NAME;
588
+        $logFile = $this->logPath.self::EVENT_LOG_NAME;
589 589
 
590 590
         if (file_exists($logFile)) {
591 591
             unlink($logFile);
Please login to merge, or discard this patch.
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/EventLogTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
         $instance->logEvents[] = 'some_name';
33 33
 
34
-        $this->assertFileNotExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
34
+        $this->assertFileNotExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
35 35
         $instance->makeLogEvent('some_name', 'some_listener', EventDispatcher::EVENT_STATUS_OK);
36
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
36
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
37 37
     }
38 38
 
39 39
 
@@ -55,15 +55,15 @@  discard block
 block discarded – undo
55 55
         $instance->logEvents[] = 'some_name';
56 56
         $instance->logEvents[] = 'some_name_2';
57 57
 
58
-        $this->assertFileNotExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
58
+        $this->assertFileNotExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
59 59
         $instance->makeLogEvent('some_name', 'some_listener', EventDispatcher::EVENT_STATUS_OK);
60 60
         $instance->makeLogEvent(
61 61
             'some_name_2',
62
-            function () {
62
+            function() {
63 63
             },
64 64
             EventDispatcher::EVENT_STATUS_OK
65 65
         );
66
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
66
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
67 67
     }
68 68
 
69 69
     public function testEventLogWithGivenLogObject()
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
         $instance->logEvents[] = 'some_name';
83 83
 
84
-        $this->assertFileNotExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
84
+        $this->assertFileNotExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
85 85
         $instance->makeLogEvent('some_name', ['class', 'method'], EventDispatcher::EVENT_STATUS_OK);
86
-        $this->assertFileExists($this->logPath . EventDispatcherTest::EVENT_LOG_NAME);
86
+        $this->assertFileExists($this->logPath.EventDispatcherTest::EVENT_LOG_NAME);
87 87
     }
88 88
 
89 89
     /**
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function setUp()
93 93
     {
94
-        $this->logPath = __DIR__ . '/log';
94
+        $this->logPath = __DIR__.'/log';
95 95
 
96 96
         $this->clearLog();
97 97
     }
98 98
 
99 99
     protected function clearLog()
100 100
     {
101
-        $logFile = $this->logPath . EventDispatcherTest::EVENT_LOG_NAME;
101
+        $logFile = $this->logPath.EventDispatcherTest::EVENT_LOG_NAME;
102 102
 
103 103
         if (file_exists($logFile)) {
104 104
             unlink($logFile);
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.
src/Event/Base/EventLog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
                 return 'Closure';
84 84
 
85 85
             case is_array($eventListener):
86
-                return $eventListener[0] . '::' . $eventListener[1];
86
+                return $eventListener[0].'::'.$eventListener[1];
87 87
 
88 88
             default:
89 89
                 return $eventListener;
Please login to merge, or discard this patch.