Passed
Pull Request — master (#439)
by Kirill
06:35
created
src/Framework/Domain/GuardPermissionsProvider.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function getPermission(string $controller, string $action): Permission
48 48
     {
49 49
         $key = sprintf('%s:%s', $controller, $action);
50
-        if (!array_key_exists($key, $this->cache)) {
50
+        if (!array_key_exists($key, $this->cache)){
51 51
             $this->cache[$key] = $this->generatePermission($controller, $action);
52 52
         }
53 53
 
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
 
57 57
     private function generatePermission(string $controller, string $action): Permission
58 58
     {
59
-        try {
59
+        try{
60 60
             $method = new \ReflectionMethod($controller, $action);
61
-        } catch (\ReflectionException $e) {
61
+        }catch (\ReflectionException $e){
62 62
             return Permission::failed();
63 63
         }
64 64
 
65 65
         $guarded = $this->reader->firstFunctionMetadata($method, Guarded::class);
66
-        if (!$guarded instanceof Guarded) {
66
+        if (!$guarded instanceof Guarded){
67 67
             return Permission::failed();
68 68
         }
69 69
 
70 70
         $namespace = $this->reader->firstClassMetadata($method->getDeclaringClass(), GuardNamespace::class);
71 71
 
72
-        if ($guarded->permission || ($namespace instanceof GuardNamespace && $namespace->namespace)) {
72
+        if ($guarded->permission || ($namespace instanceof GuardNamespace && $namespace->namespace)){
73 73
             return Permission::ok(
74 74
                 $this->makePermission($guarded, $method, $namespace),
75 75
                 $this->mapFailureException($guarded),
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
     private function makePermission(Guarded $guarded, \ReflectionMethod $method, ?GuardNamespace $ns): string
93 93
     {
94 94
         $permission = [];
95
-        if ($this->namespace) {
95
+        if ($this->namespace){
96 96
             $permission[] = $this->namespace;
97 97
         }
98 98
 
99
-        if ($ns !== null && $ns->namespace) {
99
+        if ($ns !== null && $ns->namespace){
100 100
             $permission[] = $ns->namespace;
101 101
         }
102 102
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@  discard block
 block discarded – undo
47 47
     public function getPermission(string $controller, string $action): Permission
48 48
     {
49 49
         $key = sprintf('%s:%s', $controller, $action);
50
-        if (!array_key_exists($key, $this->cache)) {
50
+        if (!array_key_exists($key, $this->cache))
51
+        {
51 52
             $this->cache[$key] = $this->generatePermission($controller, $action);
52 53
         }
53 54
 
@@ -56,20 +57,25 @@  discard block
 block discarded – undo
56 57
 
57 58
     private function generatePermission(string $controller, string $action): Permission
58 59
     {
59
-        try {
60
+        try
61
+        {
60 62
             $method = new \ReflectionMethod($controller, $action);
61
-        } catch (\ReflectionException $e) {
63
+        }
64
+        catch (\ReflectionException $e)
65
+        {
62 66
             return Permission::failed();
63 67
         }
64 68
 
65 69
         $guarded = $this->reader->firstFunctionMetadata($method, Guarded::class);
66
-        if (!$guarded instanceof Guarded) {
70
+        if (!$guarded instanceof Guarded)
71
+        {
67 72
             return Permission::failed();
68 73
         }
69 74
 
70 75
         $namespace = $this->reader->firstClassMetadata($method->getDeclaringClass(), GuardNamespace::class);
71 76
 
72
-        if ($guarded->permission || ($namespace instanceof GuardNamespace && $namespace->namespace)) {
77
+        if ($guarded->permission || ($namespace instanceof GuardNamespace && $namespace->namespace))
78
+        {
73 79
             return Permission::ok(
74 80
                 $this->makePermission($guarded, $method, $namespace),
75 81
                 $this->mapFailureException($guarded),
@@ -92,11 +98,13 @@  discard block
 block discarded – undo
92 98
     private function makePermission(Guarded $guarded, \ReflectionMethod $method, ?GuardNamespace $ns): string
93 99
     {
94 100
         $permission = [];
95
-        if ($this->namespace) {
101
+        if ($this->namespace)
102
+        {
96 103
             $permission[] = $this->namespace;
97 104
         }
98 105
 
99
-        if ($ns !== null && $ns->namespace) {
106
+        if ($ns !== null && $ns->namespace)
107
+        {
100 108
             $permission[] = $ns->namespace;
101 109
         }
102 110
 
Please login to merge, or discard this patch.
src/Framework/Domain/Annotation/Guarded.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         ?string $permission = null,
49 49
         string $else = 'forbidden',
50 50
         ?string $errorMessage = null
51
-    ) {
51
+    ){
52 52
         $this->permission = $permission;
53 53
         $this->else = $else;
54 54
         $this->errorMessage = $errorMessage;
Please login to merge, or discard this patch.
src/AnnotatedRoutes/src/Annotation/Route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         string $group = self::DEFAULT_GROUP,
86 86
         array $middleware = [],
87 87
         int $priority = 0
88
-    ) {
88
+    ){
89 89
         $this->route = $route;
90 90
         $this->name = $name;
91 91
         $this->methods = $methods;
Please login to merge, or discard this patch.
src/Bridge/DataGrid/src/Interceptor/GridInterceptor.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         ContainerInterface $container,
54 54
         GridFactory $gridFactory,
55 55
         ReaderInterface $reader = null
56
-    ) {
56
+    ){
57 57
         $this->response = $response;
58 58
         $this->container = $container;
59 59
         $this->gridFactory = $gridFactory;
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $result = $core->callAction($controller, $action, $parameters);
74 74
 
75
-        if (is_iterable($result)) {
75
+        if (is_iterable($result)){
76 76
             $schema = $this->getSchema($controller, $action);
77
-            if ($schema !== null) {
77
+            if ($schema !== null){
78 78
                 $grid = $this->makeFactory($schema)
79 79
                     ->withDefaults($schema['defaults'])
80 80
                     ->create($result, $schema['grid']);
81 81
 
82
-                if ($schema['view'] !== null) {
82
+                if ($schema['view'] !== null){
83 83
                     $grid = $grid->withView($schema['view']);
84 84
                 }
85 85
 
@@ -99,20 +99,20 @@  discard block
 block discarded – undo
99 99
     private function getSchema(string $controller, string $action): ?array
100 100
     {
101 101
         $key = sprintf('%s:%s', $controller, $action);
102
-        if (array_key_exists($key, $this->cache)) {
102
+        if (array_key_exists($key, $this->cache)){
103 103
             return $this->cache[$key];
104 104
         }
105 105
 
106 106
         $this->cache[$key] = null;
107
-        try {
107
+        try{
108 108
             $method = new \ReflectionMethod($controller, $action);
109
-        } catch (\ReflectionException $e) {
109
+        }catch (\ReflectionException $e){
110 110
             return null;
111 111
         }
112 112
 
113 113
         /** @var null|DataGrid $dataGrid */
114 114
         $dataGrid = $this->reader->firstFunctionMetadata($method, DataGrid::class);
115
-        if ($dataGrid === null) {
115
+        if ($dataGrid === null){
116 116
             return null;
117 117
         }
118 118
 
@@ -133,19 +133,19 @@  discard block
 block discarded – undo
133 133
             'factory'  => $dataGrid->factory,
134 134
         ];
135 135
 
136
-        if (is_string($schema['view'])) {
136
+        if (is_string($schema['view'])){
137 137
             $schema['view'] = $this->container->get($schema['view']);
138 138
         }
139 139
 
140
-        if ($schema['defaults'] === [] && method_exists($schema['grid'], 'getDefaults')) {
140
+        if ($schema['defaults'] === [] && method_exists($schema['grid'], 'getDefaults')){
141 141
             $schema['defaults'] = $schema['grid']->getDefaults();
142 142
         }
143 143
 
144
-        if ($schema['options'] === [] && method_exists($schema['grid'], 'getOptions')) {
144
+        if ($schema['options'] === [] && method_exists($schema['grid'], 'getOptions')){
145 145
             $schema['options'] = $schema['grid']->getOptions();
146 146
         }
147 147
 
148
-        if ($schema['view'] === null && is_callable($schema['grid'])) {
148
+        if ($schema['view'] === null && is_callable($schema['grid'])){
149 149
             $schema['view'] = $schema['grid'];
150 150
         }
151 151
 
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 
155 155
     private function makeFactory(array $schema): GridFactoryInterface
156 156
     {
157
-        if (!empty($schema['factory']) && $this->container->has($schema['factory'])) {
157
+        if (!empty($schema['factory']) && $this->container->has($schema['factory'])){
158 158
             $factory = $this->container->get($schema['factory']);
159
-            if ($factory instanceof GridFactoryInterface) {
159
+            if ($factory instanceof GridFactoryInterface){
160 160
                 return $factory;
161 161
             }
162 162
         }
Please login to merge, or discard this patch.
Braces   +27 added lines, -13 removed lines patch added patch discarded remove patch
@@ -72,14 +72,17 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $result = $core->callAction($controller, $action, $parameters);
74 74
 
75
-        if (is_iterable($result)) {
75
+        if (is_iterable($result))
76
+        {
76 77
             $schema = $this->getSchema($controller, $action);
77
-            if ($schema !== null) {
78
+            if ($schema !== null)
79
+            {
78 80
                 $grid = $this->makeFactory($schema)
79 81
                     ->withDefaults($schema['defaults'])
80 82
                     ->create($result, $schema['grid']);
81 83
 
82
-                if ($schema['view'] !== null) {
84
+                if ($schema['view'] !== null)
85
+                {
83 86
                     $grid = $grid->withView($schema['view']);
84 87
                 }
85 88
 
@@ -99,20 +102,25 @@  discard block
 block discarded – undo
99 102
     private function getSchema(string $controller, string $action): ?array
100 103
     {
101 104
         $key = sprintf('%s:%s', $controller, $action);
102
-        if (array_key_exists($key, $this->cache)) {
105
+        if (array_key_exists($key, $this->cache))
106
+        {
103 107
             return $this->cache[$key];
104 108
         }
105 109
 
106 110
         $this->cache[$key] = null;
107
-        try {
111
+        try
112
+        {
108 113
             $method = new \ReflectionMethod($controller, $action);
109
-        } catch (\ReflectionException $e) {
114
+        }
115
+        catch (\ReflectionException $e)
116
+        {
110 117
             return null;
111 118
         }
112 119
 
113 120
         /** @var null|DataGrid $dataGrid */
114 121
         $dataGrid = $this->reader->firstFunctionMetadata($method, DataGrid::class);
115
-        if ($dataGrid === null) {
122
+        if ($dataGrid === null)
123
+        {
116 124
             return null;
117 125
         }
118 126
 
@@ -133,19 +141,23 @@  discard block
 block discarded – undo
133 141
             'factory'  => $dataGrid->factory,
134 142
         ];
135 143
 
136
-        if (is_string($schema['view'])) {
144
+        if (is_string($schema['view']))
145
+        {
137 146
             $schema['view'] = $this->container->get($schema['view']);
138 147
         }
139 148
 
140
-        if ($schema['defaults'] === [] && method_exists($schema['grid'], 'getDefaults')) {
149
+        if ($schema['defaults'] === [] && method_exists($schema['grid'], 'getDefaults'))
150
+        {
141 151
             $schema['defaults'] = $schema['grid']->getDefaults();
142 152
         }
143 153
 
144
-        if ($schema['options'] === [] && method_exists($schema['grid'], 'getOptions')) {
154
+        if ($schema['options'] === [] && method_exists($schema['grid'], 'getOptions'))
155
+        {
145 156
             $schema['options'] = $schema['grid']->getOptions();
146 157
         }
147 158
 
148
-        if ($schema['view'] === null && is_callable($schema['grid'])) {
159
+        if ($schema['view'] === null && is_callable($schema['grid']))
160
+        {
149 161
             $schema['view'] = $schema['grid'];
150 162
         }
151 163
 
@@ -154,9 +166,11 @@  discard block
 block discarded – undo
154 166
 
155 167
     private function makeFactory(array $schema): GridFactoryInterface
156 168
     {
157
-        if (!empty($schema['factory']) && $this->container->has($schema['factory'])) {
169
+        if (!empty($schema['factory']) && $this->container->has($schema['factory']))
170
+        {
158 171
             $factory = $this->container->get($schema['factory']);
159
-            if ($factory instanceof GridFactoryInterface) {
172
+            if ($factory instanceof GridFactoryInterface)
173
+            {
160 174
                 return $factory;
161 175
             }
162 176
         }
Please login to merge, or discard this patch.
src/Bridge/DataGrid/src/Annotation/DataGrid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         array $defaults = [],
71 71
         array $options = [],
72 72
         ?string $factory = null
73
-    ) {
73
+    ){
74 74
         $this->grid = $grid;
75 75
         $this->view = $view;
76 76
         $this->defaults = $defaults;
Please login to merge, or discard this patch.
src/Annotations/src/AnnotationLocator.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function findClasses(string $annotation): iterable
69 69
     {
70
-        foreach ($this->getTargets() as $target) {
70
+        foreach ($this->getTargets() as $target){
71 71
             $found = $this->reader->firstClassMetadata($target, $annotation);
72
-            if ($found !== null) {
72
+            if ($found !== null){
73 73
                 yield new AnnotatedClass($target, $found);
74 74
             }
75 75
         }
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function findMethods(string $annotation): iterable
85 85
     {
86
-        foreach ($this->getTargets() as $target) {
87
-            foreach ($target->getMethods() as $method) {
86
+        foreach ($this->getTargets() as $target){
87
+            foreach ($target->getMethods() as $method){
88 88
                 $found = $this->reader->firstFunctionMetadata($method, $annotation);
89
-                if ($found !== null) {
89
+                if ($found !== null){
90 90
                     yield new AnnotatedMethod($method, $found);
91 91
                 }
92 92
             }
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function findProperties(string $annotation): iterable
103 103
     {
104
-        foreach ($this->getTargets() as $target) {
105
-            foreach ($target->getProperties() as $property) {
104
+        foreach ($this->getTargets() as $target){
105
+            foreach ($target->getProperties() as $property){
106 106
                 $found = $this->reader->firstPropertyMetadata($property, $annotation);
107
-                if ($found !== null) {
107
+                if ($found !== null){
108 108
                     yield new AnnotatedProperty($property, $found);
109 109
                 }
110 110
             }
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
      */
117 117
     private function getTargets(): iterable
118 118
     {
119
-        if ($this->targets === []) {
119
+        if ($this->targets === []){
120 120
             yield from $this->classLocator->getClasses();
121 121
             return;
122 122
         }
123 123
 
124
-        foreach ($this->targets as $target) {
124
+        foreach ($this->targets as $target){
125 125
             yield from $this->classLocator->getClasses($target);
126 126
         }
127 127
     }
Please login to merge, or discard this patch.
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -67,9 +67,11 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function findClasses(string $annotation): iterable
69 69
     {
70
-        foreach ($this->getTargets() as $target) {
70
+        foreach ($this->getTargets() as $target)
71
+        {
71 72
             $found = $this->reader->firstClassMetadata($target, $annotation);
72
-            if ($found !== null) {
73
+            if ($found !== null)
74
+            {
73 75
                 yield new AnnotatedClass($target, $found);
74 76
             }
75 77
         }
@@ -83,10 +85,13 @@  discard block
 block discarded – undo
83 85
      */
84 86
     public function findMethods(string $annotation): iterable
85 87
     {
86
-        foreach ($this->getTargets() as $target) {
87
-            foreach ($target->getMethods() as $method) {
88
+        foreach ($this->getTargets() as $target)
89
+        {
90
+            foreach ($target->getMethods() as $method)
91
+            {
88 92
                 $found = $this->reader->firstFunctionMetadata($method, $annotation);
89
-                if ($found !== null) {
93
+                if ($found !== null)
94
+                {
90 95
                     yield new AnnotatedMethod($method, $found);
91 96
                 }
92 97
             }
@@ -101,10 +106,13 @@  discard block
 block discarded – undo
101 106
      */
102 107
     public function findProperties(string $annotation): iterable
103 108
     {
104
-        foreach ($this->getTargets() as $target) {
105
-            foreach ($target->getProperties() as $property) {
109
+        foreach ($this->getTargets() as $target)
110
+        {
111
+            foreach ($target->getProperties() as $property)
112
+            {
106 113
                 $found = $this->reader->firstPropertyMetadata($property, $annotation);
107
-                if ($found !== null) {
114
+                if ($found !== null)
115
+                {
108 116
                     yield new AnnotatedProperty($property, $found);
109 117
                 }
110 118
             }
@@ -116,12 +124,14 @@  discard block
 block discarded – undo
116 124
      */
117 125
     private function getTargets(): iterable
118 126
     {
119
-        if ($this->targets === []) {
127
+        if ($this->targets === [])
128
+        {
120 129
             yield from $this->classLocator->getClasses();
121 130
             return;
122 131
         }
123 132
 
124
-        foreach ($this->targets as $target) {
133
+        foreach ($this->targets as $target)
134
+        {
125 135
             yield from $this->classLocator->getClasses($target);
126 136
         }
127 137
     }
Please login to merge, or discard this patch.
src/Annotations/tests/LocatorTest.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
     public function testLocateClasses()
30 30
     {
31 31
         // Annotations.
32
-        $classes = $this->getAnnotationsLocator(__DIR__ . '/Fixtures')->findClasses(ClassAnnotation::class);
32
+        $classes = $this->getAnnotationsLocator(__DIR__.'/Fixtures')->findClasses(ClassAnnotation::class);
33 33
         $classes = iterator_to_array($classes);
34 34
 
35 35
         $this->assertCount(1, $classes);
36 36
 
37
-        foreach ($classes as $class) {
37
+        foreach ($classes as $class){
38 38
             $this->assertSame(TestClass::class, $class->getClass()->getName());
39 39
             $this->assertSame('abc', $class->getAnnotation()->value);
40 40
         }
41 41
 
42 42
         // Attributes.
43
-        $classes = $this->getAttributesLocator(__DIR__ . '/Fixtures')->findClasses(ClassAnnotation::class);
43
+        $classes = $this->getAttributesLocator(__DIR__.'/Fixtures')->findClasses(ClassAnnotation::class);
44 44
         $classes = iterator_to_array($classes);
45 45
 
46 46
         $this->assertCount(1, $classes);
47 47
 
48
-        foreach ($classes as $class) {
48
+        foreach ($classes as $class){
49 49
             $this->assertSame(AttributeTestClass::class, $class->getClass()->getName());
50 50
             $this->assertSame('abc', $class->getAnnotation()->value);
51 51
         }
@@ -54,24 +54,24 @@  discard block
 block discarded – undo
54 54
     public function testLocateProperties()
55 55
     {
56 56
         // Annotations.
57
-        $props = $this->getAnnotationsLocator(__DIR__ . '/Fixtures')->findProperties(PropertyAnnotation::class);
57
+        $props = $this->getAnnotationsLocator(__DIR__.'/Fixtures')->findProperties(PropertyAnnotation::class);
58 58
         $props = iterator_to_array($props);
59 59
 
60 60
         $this->assertCount(1, $props);
61 61
 
62
-        foreach ($props as $prop) {
62
+        foreach ($props as $prop){
63 63
             $this->assertSame(TestClass::class, $prop->getClass()->getName());
64 64
             $this->assertSame('name', $prop->getProperty()->getName());
65 65
             $this->assertSame('123', $prop->getAnnotation()->id);
66 66
         }
67 67
 
68 68
         // Attributes.
69
-        $props = $this->getAttributesLocator(__DIR__ . '/Fixtures')->findProperties(PropertyAnnotation::class);
69
+        $props = $this->getAttributesLocator(__DIR__.'/Fixtures')->findProperties(PropertyAnnotation::class);
70 70
         $props = iterator_to_array($props);
71 71
 
72 72
         $this->assertCount(1, $props);
73 73
 
74
-        foreach ($props as $prop) {
74
+        foreach ($props as $prop){
75 75
             $this->assertSame(AttributeTestClass::class, $prop->getClass()->getName());
76 76
             $this->assertSame('name', $prop->getProperty()->getName());
77 77
             $this->assertSame('123', $prop->getAnnotation()->id);
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
     public function testLocateMethods()
82 82
     {
83 83
         // Annotations.
84
-        $methods = $this->getAnnotationsLocator(__DIR__ . '/Fixtures')->findMethods(MethodAnnotation::class);
84
+        $methods = $this->getAnnotationsLocator(__DIR__.'/Fixtures')->findMethods(MethodAnnotation::class);
85 85
         $methods = iterator_to_array($methods);
86 86
 
87 87
         $this->assertCount(1, $methods);
88 88
 
89
-        foreach ($methods as $m) {
89
+        foreach ($methods as $m){
90 90
             $this->assertSame(TestClass::class, $m->getClass()->getName());
91 91
             $this->assertSame('testMethod', $m->getMethod()->getName());
92 92
             $this->assertSame('/', $m->getAnnotation()->path);
93 93
         }
94 94
 
95 95
         // Attributes.
96
-        $methods = $this->getAttributesLocator(__DIR__ . '/Fixtures')->findMethods(MethodAnnotation::class);
96
+        $methods = $this->getAttributesLocator(__DIR__.'/Fixtures')->findMethods(MethodAnnotation::class);
97 97
         $methods = iterator_to_array($methods);
98 98
 
99 99
         $this->assertCount(1, $methods);
100 100
 
101
-        foreach ($methods as $m) {
101
+        foreach ($methods as $m){
102 102
             $this->assertSame(AttributeTestClass::class, $m->getClass()->getName());
103 103
             $this->assertSame('testMethod', $m->getMethod()->getName());
104 104
             $this->assertSame('/', $m->getAnnotation()->path);
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->assertCount(1, $classes);
36 36
 
37
-        foreach ($classes as $class) {
37
+        foreach ($classes as $class)
38
+        {
38 39
             $this->assertSame(TestClass::class, $class->getClass()->getName());
39 40
             $this->assertSame('abc', $class->getAnnotation()->value);
40 41
         }
@@ -45,7 +46,8 @@  discard block
 block discarded – undo
45 46
 
46 47
         $this->assertCount(1, $classes);
47 48
 
48
-        foreach ($classes as $class) {
49
+        foreach ($classes as $class)
50
+        {
49 51
             $this->assertSame(AttributeTestClass::class, $class->getClass()->getName());
50 52
             $this->assertSame('abc', $class->getAnnotation()->value);
51 53
         }
@@ -59,7 +61,8 @@  discard block
 block discarded – undo
59 61
 
60 62
         $this->assertCount(1, $props);
61 63
 
62
-        foreach ($props as $prop) {
64
+        foreach ($props as $prop)
65
+        {
63 66
             $this->assertSame(TestClass::class, $prop->getClass()->getName());
64 67
             $this->assertSame('name', $prop->getProperty()->getName());
65 68
             $this->assertSame('123', $prop->getAnnotation()->id);
@@ -71,7 +74,8 @@  discard block
 block discarded – undo
71 74
 
72 75
         $this->assertCount(1, $props);
73 76
 
74
-        foreach ($props as $prop) {
77
+        foreach ($props as $prop)
78
+        {
75 79
             $this->assertSame(AttributeTestClass::class, $prop->getClass()->getName());
76 80
             $this->assertSame('name', $prop->getProperty()->getName());
77 81
             $this->assertSame('123', $prop->getAnnotation()->id);
@@ -86,7 +90,8 @@  discard block
 block discarded – undo
86 90
 
87 91
         $this->assertCount(1, $methods);
88 92
 
89
-        foreach ($methods as $m) {
93
+        foreach ($methods as $m)
94
+        {
90 95
             $this->assertSame(TestClass::class, $m->getClass()->getName());
91 96
             $this->assertSame('testMethod', $m->getMethod()->getName());
92 97
             $this->assertSame('/', $m->getAnnotation()->path);
@@ -98,7 +103,8 @@  discard block
 block discarded – undo
98 103
 
99 104
         $this->assertCount(1, $methods);
100 105
 
101
-        foreach ($methods as $m) {
106
+        foreach ($methods as $m)
107
+        {
102 108
             $this->assertSame(AttributeTestClass::class, $m->getClass()->getName());
103 109
             $this->assertSame('testMethod', $m->getMethod()->getName());
104 110
             $this->assertSame('/', $m->getAnnotation()->path);
Please login to merge, or discard this patch.
tests/app/src/Controller/DemoController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,10 +49,12 @@
 block discarded – undo
49 49
      * @Guarded("do")
50 50
      * @return string
51 51
      */
52
-    public function do()
52
+    public function do{
53
+        ()
53 54
     {
54 55
         return 'ok';
55 56
     }
57
+    }
56 58
 
57 59
     /**
58 60
      * @return string
Please login to merge, or discard this patch.