Passed
Pull Request — master (#277)
by Kirill
03:00
created
tests/Framework/Jobs/DispatcherTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->assertNull($this->app->getEnvironment()->get('FIRED'));
44 44
 
45 45
         $w->shouldReceive('receive')->once()->with(
46
-            \Mockery::on(function (&$context) {
46
+            \Mockery::on(function (&$context){
47 47
                 $context = $this->arrayToContextString(TestJob::class);
48 48
 
49 49
                 return true;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $this->app->getContainer()->bind(Worker::class, $w);
69 69
 
70 70
         $w->shouldReceive('receive')->once()->with(
71
-            \Mockery::on(function (&$context) {
71
+            \Mockery::on(function (&$context){
72 72
                 $context = $this->arrayToContextString(ErrorJob::class);
73 73
 
74 74
                 return true;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $w->shouldReceive('receive')->once()->andReturn(null);
82 82
 
83 83
         $files = $this->app->get(FilesInterface::class)->getFiles(
84
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
84
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
85 85
         );
86 86
 
87 87
         $this->assertCount(0, $files);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $this->app->get(JobDispatcher::class)->serve();
90 90
 
91 91
         $files = $this->app->get(FilesInterface::class)->getFiles(
92
-            $this->app->get(DirectoriesInterface::class)->get('runtime') . '/snapshots/'
92
+            $this->app->get(DirectoriesInterface::class)->get('runtime').'/snapshots/'
93 93
         );
94 94
 
95 95
         $this->assertCount(1, $files);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         return \json_encode([
109 109
             'id'  => (string)$id,
110
-            'job' => \strtolower(\implode('.', $signature)) . '.' . $class
110
+            'job' => \strtolower(\implode('.', $signature)).'.'.$class
111 111
         ]);
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
tests/Framework/I18n/ExportTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
     {
20 20
         parent::tearDown();
21 21
 
22
-        if (file_exists(sys_get_temp_dir() . '/messages.ru.php')) {
23
-            unlink(sys_get_temp_dir() . '/messages.ru.php');
22
+        if (file_exists(sys_get_temp_dir().'/messages.ru.php')){
23
+            unlink(sys_get_temp_dir().'/messages.ru.php');
24 24
         }
25 25
     }
26 26
 
27 27
     public function testReset(): void
28 28
     {
29
-        $this->assertFileDoesNotExist(sys_get_temp_dir() . '/messages.ru.php');
29
+        $this->assertFileDoesNotExist(sys_get_temp_dir().'/messages.ru.php');
30 30
 
31 31
         $this->runCommandDebug('i18n:index');
32 32
         $this->runCommandDebug('configure');
Please login to merge, or discard this patch.
src/Core/tests/Fixtures/TypedClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,6 @@
 block discarded – undo
20 20
         bool $bool,
21 21
         array $array = [],
22 22
         string $pong = null
23
-    ) {
23
+    ){
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
src/Core/tests/FactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $container = new Container();
42 42
         $this->assertInstanceOf(FactoryInterface::class, $container);
43 43
 
44
-        $container->bind(Bucket::class, function ($data) {
44
+        $container->bind(Bucket::class, function ($data){
45 45
             return new Bucket('via-closure', $data);
46 46
         });
47 47
 
Please login to merge, or discard this patch.
src/Core/tests/ScopesTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
 
41 41
         $this->assertNull(ContainerScope::getContainer());
42 42
 
43
-        try {
43
+        try{
44 44
             $this->assertTrue(ContainerScope::runScope($container, function () use ($container): void {
45 45
                 throw new RuntimeException('exception');
46 46
             }));
47
-        } catch (\Throwable $e) {
47
+        }catch (\Throwable $e){
48 48
         }
49 49
 
50 50
         $this->assertInstanceOf(RuntimeException::class, $e);
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
             return $c->get('bucket')->getName() == 'b' && $c->has('other');
92 92
         }));
93 93
 
94
-        try {
94
+        try{
95 95
             $this->assertTrue($c->runScope([
96 96
                 'bucket' => new Bucket('b'),
97 97
                 'other'  => new SampleClass()
98 98
             ], function () use ($c): void {
99 99
                 throw new RuntimeException('exception');
100 100
             }));
101
-        } catch (\Throwable $e) {
101
+        }catch (\Throwable $e){
102 102
         }
103 103
 
104 104
         $this->assertSame('a', $c->get('bucket')->getName());
Please login to merge, or discard this patch.
src/Core/tests/SingletonsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $container = new Container();
73 73
 
74
-        $container->bindSingleton('sampleClass', function () {
74
+        $container->bindSingleton('sampleClass', function (){
75 75
             return new SampleClass();
76 76
         });
77 77
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $container = new Container();
99 99
         $container->bindSingleton('singleton', 'sampleClass');
100 100
 
101
-        $container->bind('sampleClass', function () {
101
+        $container->bind('sampleClass', function (){
102 102
             return new SampleClass();
103 103
         });
104 104
 
Please login to merge, or discard this patch.
src/Core/tests/InjectableTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function testInvalidInjector(): void
38 38
     {
39
-        $excepted = "Class 'Spiral\Tests\Core\Fixtures\InvalidInjector' must be an " .
39
+        $excepted = "Class 'Spiral\Tests\Core\Fixtures\InvalidInjector' must be an ".
40 40
                     "instance of InjectorInterface for 'Spiral\Tests\Core\Fixtures\TestConfig'";
41 41
         $this->expectException(InjectionException::class);
42 42
         $this->expectExceptionMessage($excepted);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function testInvalidRuntimeInjector(): void
62 62
     {
63
-        $excepted = "Class 'Spiral\Tests\Core\Fixtures\InvalidInjector' must be an " .
63
+        $excepted = "Class 'Spiral\Tests\Core\Fixtures\InvalidInjector' must be an ".
64 64
             "instance of InjectorInterface for 'Spiral\Tests\Core\Fixtures\TestConfig'";
65 65
         $this->expectException(InjectionException::class);
66 66
         $this->expectExceptionMessage($excepted);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $container->bind(ConfigsInterface::class, $configurator);
126 126
 
127 127
         $configurator->shouldReceive('createInjection')
128
-            ->with(m::on(static function (ReflectionClass $r) {
128
+            ->with(m::on(static function (ReflectionClass $r){
129 129
                 return $r->getName() === TestConfig::class;
130 130
             }), null)
131 131
             ->andReturn($expected)
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $container->bind(ConfigsInterface::class, $configurator);
144 144
 
145 145
         $configurator->shouldReceive('createInjection')
146
-            ->with(m::on(static function (ReflectionClass $r) {
146
+            ->with(m::on(static function (ReflectionClass $r){
147 147
                 return $r->getName() === TestConfig::class;
148 148
             }), 'context')
149 149
             ->andReturn($expected)
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $container->bind(ConfigsInterface::class, $configurator);
162 162
 
163 163
         $configurator->shouldReceive('createInjection')
164
-            ->with(m::on(static function (ReflectionClass $r) {
164
+            ->with(m::on(static function (ReflectionClass $r){
165 165
                 return $r->getName() === TestConfig::class;
166 166
             }), 'contextArgument')
167 167
             ->andReturn($expected)
Please login to merge, or discard this patch.
src/Core/tests/BindingsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         $this->assertFalse($container->has('abc'));
27 27
 
28
-        $container->bind('abc', function () {
28
+        $container->bind('abc', function (){
29 29
             return 'hello';
30 30
         });
31 31
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $container = new Container();
39 39
 
40 40
         $this->assertFalse($container->has('abc'));
41
-        $container->bind('abc', function () {
41
+        $container->bind('abc', function (){
42 42
             return 'hello';
43 43
         });
44 44
 
Please login to merge, or discard this patch.
src/Core/src/ContainerScope.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
     {
47 47
         [$previous, self::$container] = [self::$container, $container];
48 48
 
49
-        try {
49
+        try{
50 50
             return $scope();
51
-        } catch (Throwable $e) {
51
+        }catch (Throwable $e){
52 52
             throw $e;
53
-        } finally {
53
+        }finally{
54 54
             self::$container = $previous;
55 55
         }
56 56
     }
Please login to merge, or discard this patch.