Passed
Push — master ( d7a1a9...9c9d70 )
by butschster
04:50 queued 18s
created
src/Core/tests/SingletonsTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         $container = new Container();
72 72
 
73
-        $container->bindSingleton('sampleClass', function () {
73
+        $container->bindSingleton('sampleClass', function (){
74 74
             return new SampleClass();
75 75
         });
76 76
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $container = new Container();
145 145
         $container->bindSingleton('singleton', 'sampleClass');
146 146
 
147
-        $container->bind('sampleClass', function () {
147
+        $container->bind('sampleClass', function (){
148 148
             return new SampleClass();
149 149
         });
150 150
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     public function testHasShouldReturnTrueWhenSingletonIsAlreadyConstructed(): void
189 189
     {
190 190
         $container = new Container();
191
-        $class = new class implements SingletonInterface {};
191
+        $class = new class implements SingletonInterface{};
192 192
 
193 193
         $this->assertFalse($container->has($class::class));
194 194
 
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
         $instance = new SampleClass();
61 61
 
62
-        $container->bindSingleton('sampleClass', function () use ($instance) {
62
+        $container->bindSingleton('sampleClass', function () use ($instance)
63
+        {
63 64
             return $instance;
64 65
         });
65 66
 
@@ -70,7 +71,8 @@  discard block
 block discarded – undo
70 71
     {
71 72
         $container = new Container();
72 73
 
73
-        $container->bindSingleton('sampleClass', function () {
74
+        $container->bindSingleton('sampleClass', function ()
75
+        {
74 76
             return new SampleClass();
75 77
         });
76 78
 
@@ -144,7 +146,8 @@  discard block
 block discarded – undo
144 146
         $container = new Container();
145 147
         $container->bindSingleton('singleton', 'sampleClass');
146 148
 
147
-        $container->bind('sampleClass', function () {
149
+        $container->bind('sampleClass', function ()
150
+        {
148 151
             return new SampleClass();
149 152
         });
150 153
 
@@ -188,7 +191,9 @@  discard block
 block discarded – undo
188 191
     public function testHasShouldReturnTrueWhenSingletonIsAlreadyConstructed(): void
189 192
     {
190 193
         $container = new Container();
191
-        $class = new class implements SingletonInterface {};
194
+        $class = new class implements SingletonInterface
195
+        {
196
+};
192 197
 
193 198
         $this->assertFalse($container->has($class::class));
194 199
 
@@ -201,7 +206,8 @@  discard block
 block discarded – undo
201 206
     {
202 207
         return new
203 208
         #[Singleton]
204
-        class {
209
+        class
210
+        {
205 211
             public string $baz = 'baz';
206 212
         };
207 213
     }
Please login to merge, or discard this patch.