Passed
Pull Request — master (#12)
by Ivo
03:00
created
src/JSONScalar/JSONScalarTypeMapper.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
     private function matchReturnType(DocBlock $docBlockObj): bool
66 66
     {
67 67
         $paramText = $docBlockObj->hasTag('return') ?
68
-            $docBlockObj->getTagsByName('return')[0]->__toString() :
69
-            null;
68
+            $docBlockObj->getTagsByName('return')[ 0 ]->__toString() : null;
70 69
         return strpos($paramText, JSONScalarType::NAME) > 0;
71 70
     }
72 71
 
@@ -80,10 +79,10 @@  discard block
 block discarded – undo
80 79
     {
81 80
         $params = $docBlockObj->getTagsByName('param');
82 81
         for ($i = 0; $i < count($params); $i++) {
83
-            $paramText = $params[$i]->__toString();
82
+            $paramText = $params[ $i ]->__toString();
84 83
             if ($reflector instanceof ReflectionMethod) {
85 84
                 $refParams = $reflector->getParameters();
86
-                if (strpos($paramText, JSONScalarType::NAME) > 0 && $refParams[$i]->getName() === $argumentName) {
85
+                if (strpos($paramText, JSONScalarType::NAME) > 0 && $refParams[ $i ]->getName() === $argumentName) {
87 86
                     return true;
88 87
                 }
89 88
             }
Please login to merge, or discard this patch.
src/JSONScalar/JSONScalarType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         if (!property_exists($valueNode, 'value')) {
63 63
             throw new Error(
64
-                'Can only parse literals that contain a value, got '.GraphQLUtils::printSafeJson($valueNode)
64
+                'Can only parse literals that contain a value, got ' . GraphQLUtils::printSafeJson($valueNode)
65 65
             );
66 66
         }
67 67
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $decoded = is_string($value) ? json_decode($value, true) : $value;
80 80
         if ($decoded === null) {
81 81
             throw new Error(
82
-                'Error decoding JSON '. GraphQLUtils::printSafeJson($value)
82
+                'Error decoding JSON ' . GraphQLUtils::printSafeJson($value)
83 83
             );
84 84
         }
85 85
 
Please login to merge, or discard this patch.