Passed
Push — master ( 813f0f...a309d2 )
by butschster
09:30 queued 12s
created
src/Tokenizer/tests/ReflectionFileTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
         $this->assertContains(TestTrait::class, $reflection->getTraits());
17 17
         $this->assertContains(TestInterface::class, $reflection->getInterfaces());
18 18
 
19
-        $this->assertSame([__NAMESPACE__ . '\hello'], $reflection->getFunctions());
19
+        $this->assertSame([__NAMESPACE__.'\hello'], $reflection->getFunctions());
20 20
 
21 21
         $functionA = null;
22 22
         $functionB = null;
23 23
 
24
-        foreach ($reflection->getInvocations() as $invocation) {
25
-            if ($invocation->getName() == 'test_function_a') {
24
+        foreach ($reflection->getInvocations() as $invocation){
25
+            if ($invocation->getName() == 'test_function_a'){
26 26
                 $functionA = $invocation;
27 27
             }
28 28
 
29
-            if ($invocation->getName() == 'test_function_b') {
29
+            if ($invocation->getName() == 'test_function_b'){
30 30
                 $functionB = $invocation;
31 31
             }
32 32
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function testReflectionFileWithNamedParameters(): void
55 55
     {
56
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithNamedParameter.php');
56
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithNamedParameter.php');
57 57
 
58 58
         $this->assertSame([
59 59
             'Spiral\Tests\Tokenizer\Classes\ClassWithNamedParameter',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function testReflectionFileAnonymousClass(): void
64 64
     {
65
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithAnonymousClass.php');
65
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithAnonymousClass.php');
66 66
 
67 67
         $this->assertSame([
68 68
             'Spiral\Tests\Tokenizer\Classes\ClassWithAnonymousClass',
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function testReflectionFileWithHeredoc(): void
73 73
     {
74
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithHeredoc.php');
74
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithHeredoc.php');
75 75
 
76 76
         $this->assertSame([
77 77
             'Spiral\Tests\Tokenizer\Classes\ClassWithHeredoc',
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function testReflectionEnum(): void
82 82
     {
83
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassD.php');
83
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassD.php');
84 84
 
85 85
         $this->assertSame([
86 86
             'Spiral\Tests\Tokenizer\Classes\ClassD',
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function testReflectionTypedEnum(): void
91 91
     {
92
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassE.php');
92
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassE.php');
93 93
 
94 94
         $this->assertSame([
95 95
             'Spiral\Tests\Tokenizer\Classes\ClassE',
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     public function testReflectionInterface(): void
100 100
     {
101
-        $reflection = new ReflectionFile(__DIR__ . '/Interfaces/InterfaceA.php');
101
+        $reflection = new ReflectionFile(__DIR__.'/Interfaces/InterfaceA.php');
102 102
 
103 103
         $this->assertSame([
104 104
             'Spiral\Tests\Tokenizer\Interfaces\InterfaceA',
Please login to merge, or discard this patch.
src/Tokenizer/tests/Listener/EnumLocatorByTargetTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
     use MockeryPHPUnitIntegration;
23 23
 
24 24
     private EnumLocatorByTarget $locator;
25
-    private EnumsInterface|m\LegacyMockInterface|m\MockInterface $classes;
26
-    private ScopedEnumsInterface|m\LegacyMockInterface|m\MockInterface $scopedClasses;
25
+    private EnumsInterface | m\LegacyMockInterface | m\MockInterface $classes;
26
+    private ScopedEnumsInterface | m\LegacyMockInterface | m\MockInterface $scopedClasses;
27 27
 
28 28
     protected function setUp(): void
29 29
     {
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
         $attr = $attr->getAttributes()[0];
80 80
         $attribute = $attr->newInstance();
81 81
 
82
-        if ($attribute->getScope() === null) {
82
+        if ($attribute->getScope() === null){
83 83
             $this->classes
84 84
                 ->shouldReceive('getEnums')
85 85
                 ->andReturn($enums);
86
-        } else {
86
+        }else{
87 87
             $this->scopedClasses
88 88
                 ->shouldReceive('getScopedEnums')
89 89
                 ->with($attribute->getScope())
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,11 +79,14 @@
 block discarded – undo
79 79
         $attr = $attr->getAttributes()[0];
80 80
         $attribute = $attr->newInstance();
81 81
 
82
-        if ($attribute->getScope() === null) {
82
+        if ($attribute->getScope() === null)
83
+        {
83 84
             $this->classes
84 85
                 ->shouldReceive('getEnums')
85 86
                 ->andReturn($enums);
86
-        } else {
87
+        }
88
+        else
89
+        {
87 90
             $this->scopedClasses
88 91
                 ->shouldReceive('getScopedEnums')
89 92
                 ->with($attribute->getScope())
Please login to merge, or discard this patch.
src/Tokenizer/tests/Listener/InterfaceLocatorByTargetTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
     use MockeryPHPUnitIntegration;
26 26
 
27 27
     private InterfaceLocatorByTarget $locator;
28
-    private InterfacesInterface|m\LegacyMockInterface|m\MockInterface $interfaces;
29
-    private ScopedInterfacesInterface|m\LegacyMockInterface|m\MockInterface $scopedInterfaces;
28
+    private InterfacesInterface | m\LegacyMockInterface | m\MockInterface $interfaces;
29
+    private ScopedInterfacesInterface | m\LegacyMockInterface | m\MockInterface $scopedInterfaces;
30 30
 
31 31
     protected function setUp(): void
32 32
     {
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
         $attr = $attr->getAttributes()[0];
106 106
         $attribute = $attr->newInstance();
107 107
 
108
-        if ($attribute->getScope() === null) {
108
+        if ($attribute->getScope() === null){
109 109
             $this->interfaces
110 110
                 ->shouldReceive('getInterfaces')
111 111
                 ->andReturn($interfaces);
112
-        } else {
112
+        }else{
113 113
             $this->scopedInterfaces
114 114
                 ->shouldReceive('getScopedInterfaces')
115 115
                 ->with($attribute->getScope())
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,11 +105,14 @@
 block discarded – undo
105 105
         $attr = $attr->getAttributes()[0];
106 106
         $attribute = $attr->newInstance();
107 107
 
108
-        if ($attribute->getScope() === null) {
108
+        if ($attribute->getScope() === null)
109
+        {
109 110
             $this->interfaces
110 111
                 ->shouldReceive('getInterfaces')
111 112
                 ->andReturn($interfaces);
112
-        } else {
113
+        }
114
+        else
115
+        {
113 116
             $this->scopedInterfaces
114 117
                 ->shouldReceive('getScopedInterfaces')
115 118
                 ->with($attribute->getScope())
Please login to merge, or discard this patch.