Test Failed
Pull Request — master (#1137)
by f
05:31
created
src/Security/tests/Traits/GuardedTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
         $this->assertEquals(static::OPERATION, $guarded->resolvePermission(static::OPERATION));
101 101
 
102 102
         $guarded = new GuardedWithNamespace();
103
-        $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE . '.' . static::OPERATION;
103
+        $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE.'.'.static::OPERATION;
104 104
         $this->assertEquals($resolvedPermission, $guarded->resolvePermission(static::OPERATION));
105 105
     }
106 106
 }
Please login to merge, or discard this patch.
src/Security/src/Guard.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,8 +48,10 @@  discard block
 block discarded – undo
48 48
     public function allows(string $permission, array $context = []): bool
49 49
     {
50 50
         $allows = false;
51
-        foreach ($this->getRoles() as $role) {
52
-            if (!$this->permissions->hasRole($role)) {
51
+        foreach ($this->getRoles() as $role)
52
+        {
53
+            if (!$this->permissions->hasRole($role))
54
+            {
53 55
                 continue;
54 56
             }
55 57
 
@@ -95,7 +97,8 @@  discard block
 block discarded – undo
95 97
      */
96 98
     public function getActor(): ActorInterface
97 99
     {
98
-        if (empty($this->actor)) {
100
+        if (empty($this->actor))
101
+        {
99 102
             throw new GuardException('Unable to get Guard Actor, no value set');
100 103
         }
101 104
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
         private readonly PermissionsInterface $permissions,
19 19
         private ?ActorInterface $actor = null,
20 20
         private array $roles = []
21
-    ) {
21
+    ){
22 22
     }
23 23
 
24 24
     public function allows(string $permission, array $context = []): bool
25 25
     {
26 26
         $allows = false;
27
-        foreach ($this->getRoles() as $role) {
28
-            if (!$this->permissions->hasRole($role)) {
27
+        foreach ($this->getRoles() as $role){
28
+            if (!$this->permissions->hasRole($role)){
29 29
                 continue;
30 30
             }
31 31
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function getActor(): ActorInterface
66 66
     {
67
-        if (empty($this->actor)) {
67
+        if (empty($this->actor)){
68 68
             throw new GuardException('Unable to get Guard Actor, no value set');
69 69
         }
70 70
 
Please login to merge, or discard this patch.
src/Scaffolder/tests/App/TestApp.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,11 +61,13 @@
 block discarded – undo
61 61
      */
62 62
     protected function mapDirectories(array $directories): array
63 63
     {
64
-        if (!isset($directories['root'])) {
64
+        if (!isset($directories['root']))
65
+        {
65 66
             throw new Boot\Exception\BootException('Missing required directory `root`.');
66 67
         }
67 68
 
68
-        if (!isset($directories['app'])) {
69
+        if (!isset($directories['app']))
70
+        {
69 71
             $directories['app'] = $directories['root'] . '/';
70 72
         }
71 73
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,19 +52,19 @@
 block discarded – undo
52 52
      */
53 53
     protected function mapDirectories(array $directories): array
54 54
     {
55
-        if (!isset($directories['root'])) {
55
+        if (!isset($directories['root'])){
56 56
             throw new Boot\Exception\BootException('Missing required directory `root`.');
57 57
         }
58 58
 
59
-        if (!isset($directories['app'])) {
60
-            $directories['app'] = $directories['root'] . '/';
59
+        if (!isset($directories['app'])){
60
+            $directories['app'] = $directories['root'].'/';
61 61
         }
62 62
 
63 63
         return array_merge([
64
-            'vendor'  => $directories['root'] . '/vendor/',
65
-            'runtime' => $directories['root'] . '/runtime/',
66
-            'config'  => $directories['app'] . '/config/',
67
-            'resources' => $directories['root'] . '/resources/',
64
+            'vendor'  => $directories['root'].'/vendor/',
65
+            'runtime' => $directories['root'].'/runtime/',
66
+            'config'  => $directories['app'].'/config/',
67
+            'resources' => $directories['root'].'/resources/',
68 68
         ], $directories);
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
src/Prototype/src/ClassNode/ConflictResolver/AbstractEntity.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function fullName(): string
33 33
     {
34 34
         $name = $this->name;
35
-        if ($this->sequence > 0) {
35
+        if ($this->sequence > 0){
36 36
             $name .= $this->sequence;
37 37
         }
38 38
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
     public function fullName(): string
33 33
     {
34 34
         $name = $this->name;
35
-        if ($this->sequence > 0) {
35
+        if ($this->sequence > 0)
36
+        {
36 37
             $name .= $this->sequence;
37 38
         }
38 39
 
Please login to merge, or discard this patch.
src/Prototype/tests/Traverse/Extractor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     private function traverse(string $code, NodeVisitor ...$visitors): void
58 58
     {
59 59
         $tr = new NodeTraverser();
60
-        foreach ($visitors as $visitor) {
60
+        foreach ($visitors as $visitor){
61 61
             $tr->addVisitor($visitor);
62 62
         }
63 63
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,8 @@
 block discarded – undo
57 57
     private function traverse(string $code, NodeVisitor ...$visitors): void
58 58
     {
59 59
         $tr = new NodeTraverser();
60
-        foreach ($visitors as $visitor) {
60
+        foreach ($visitors as $visitor)
61
+        {
61 62
             $tr->addVisitor($visitor);
62 63
         }
63 64
 
Please login to merge, or discard this patch.
src/Prototype/tests/ExtractorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $e = new PropertyExtractor();
22 22
 
23 23
         $expected = ['test', 'test2', 'test3', 'testClass'];
24
-        $prototypes = $e->getPrototypeProperties(file_get_contents(__DIR__ . '/Fixtures/TestClass.php'));
24
+        $prototypes = $e->getPrototypeProperties(file_get_contents(__DIR__.'/Fixtures/TestClass.php'));
25 25
         sort($prototypes);
26 26
         $this->assertSame($expected, $prototypes);
27 27
     }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $e = new PropertyExtractor();
32 32
         $this->assertSame(
33 33
             [],
34
-            $e->getPrototypeProperties(file_get_contents(__DIR__ . '/Fixtures/HydratedClass.php'))
34
+            $e->getPrototypeProperties(file_get_contents(__DIR__.'/Fixtures/HydratedClass.php'))
35 35
         );
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/Prototype/tests/ClassNode/ExtractorTest.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
     public function testNoClass(): void
19 19
     {
20 20
         $this->expectException(ClassNotDeclaredException::class);
21
-        $this->getExtractor()->extract(dirname(__DIR__) . '/Fixtures/noClass.php', []);
21
+        $this->getExtractor()->extract(dirname(__DIR__).'/Fixtures/noClass.php', []);
22 22
     }
23 23
 
24 24
     private function getExtractor(): NodeExtractor
Please login to merge, or discard this patch.
tests/ClassNode/ConflictResolver/Fixtures/WithComplexConstructor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         ?int $int = 123,
21 21
         \StdClass $nullableClass2 = null,
22 22
         string ...$variadicVar
23
-    ) {
23
+    ){
24 24
         $var2 = new ATest3();
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
src/Prototype/tests/ClassNode/ConflictResolver/Fixtures/Params.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
      */
14 14
     public static function getParams(string $method): array
15 15
     {
16
-        try {
16
+        try{
17 17
             $rc = new \ReflectionClass(self::class);
18 18
             $method = $rc->getMethod($method);
19 19
 
20 20
             return $method->getParameters();
21
-        } catch (\ReflectionException $e) {
21
+        }catch (\ReflectionException $e){
22 22
             return [];
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,15 @@
 block discarded – undo
13 13
      */
14 14
     public static function getParams(string $method): array
15 15
     {
16
-        try {
16
+        try
17
+        {
17 18
             $rc = new \ReflectionClass(self::class);
18 19
             $method = $rc->getMethod($method);
19 20
 
20 21
             return $method->getParameters();
21
-        } catch (\ReflectionException $e) {
22
+        }
23
+        catch (\ReflectionException $e)
24
+        {
22 25
             return [];
23 26
         }
24 27
     }
Please login to merge, or discard this patch.