Completed
Pull Request — master (#3)
by
unknown
02:55
created
src/DefaultFieldResolver.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param string $fieldName
38 38
      * @return mixed
39 39
      */
40
-    private function resolveObject($source, ?array $args, string $fieldName)
40
+    private function resolveObject($source, ? array $args, string $fieldName)
41 41
     {
42 42
         $getter = $this->getGetter($source, $fieldName);
43 43
         if ($getter) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $class = new ReflectionClass($source);
74 74
 
75
-        if (!preg_match('~^(is|has)[A-Z]~', $name) ||  !$class->hasMethod($name))
75
+        if (!preg_match('~^(is|has)[A-Z]~', $name) || !$class->hasMethod($name))
76 76
             $name = 'get' . ucfirst($name);
77 77
 
78 78
         if ($class->hasMethod($name)) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * @param array $args
92 92
      * @return array
93 93
      */
94
-    private function orderArguments(ReflectionMethod $method, ?array $args): array
94
+    private function orderArguments(ReflectionMethod $method, ? array $args) : array
95 95
     {
96 96
         $result = [];
97 97
         foreach ($method->getParameters() as $param) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@
 block discarded – undo
72 72
     {
73 73
         $class = new ReflectionClass($source);
74 74
 
75
-        if (!preg_match('~^(is|has)[A-Z]~', $name) ||  !$class->hasMethod($name))
76
-            $name = 'get' . ucfirst($name);
75
+        if (!preg_match('~^(is|has)[A-Z]~', $name) ||  !$class->hasMethod($name)) {
76
+                    $name = 'get' . ucfirst($name);
77
+        }
77 78
 
78 79
         if ($class->hasMethod($name)) {
79 80
             $method = $class->getMethod($name);
Please login to merge, or discard this patch.