Completed
Push — master ( cbc061...c7f3c1 )
by Alexandr
03:31
created
src/Type/Config/Traits/FieldsAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         if (is_string($type)) {
64 64
             if (!TypeMap::isScalarType($type)) {
65
-                throw new ConfigurationException('You can\'t pass ' . $type . ' as a string type.');
65
+                throw new ConfigurationException('You can\'t pass '.$type.' as a string type.');
66 66
             }
67 67
 
68 68
             $type = TypeMap::getScalarTypeObject($type);
Please login to merge, or discard this patch.
src/Type/Config/Traits/ConfigCallTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             return $this->config->get($propertyName);
55 55
         }
56 56
 
57
-        throw new \Exception('Call to undefined method ' . $method);
57
+        throw new \Exception('Call to undefined method '.$method);
58 58
     }
59 59
 
60 60
 }
Please login to merge, or discard this patch.
src/Introspection/Traits/TypeCollectorTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     {
111 111
         foreach ($type->getConfig()->getFields() as $field) {
112 112
             if ($field->getConfig()->getType() instanceof AbstractObjectType) {
113
-                foreach($field->getConfig()->getArguments() as $argument) {
113
+                foreach ($field->getConfig()->getArguments() as $argument) {
114 114
                     $this->collectTypes($argument->getType());
115 115
                 }
116 116
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@
 block discarded – undo
27 27
         if (!$type) {
28 28
             return;
29 29
         }
30
-        if (is_object($type) && array_key_exists($type->getName(), $this->types)) return;
30
+        if (is_object($type) && array_key_exists($type->getName(), $this->types)) {
31
+            return;
32
+        }
31 33
 
32 34
         switch ($type->getKind()) {
33 35
             case TypeMap::KIND_INTERFACE:
Please login to merge, or discard this patch.
src/Introspection/FieldType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             ->addField('isDeprecated', TypeMap::TYPE_BOOLEAN)
24 24
             ->addField('deprecationReason', TypeMap::TYPE_STRING)
25 25
             ->addField('type', new QueryType(), [
26
-                'resolve' => function (Field $value) {
26
+                'resolve' => function(Field $value) {
27 27
                     return $value->getType();
28 28
                 }
29 29
             ])
Please login to merge, or discard this patch.
src/Introspection/SchemaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             ->addField('subscriptionType', new ObjectType([
57 57
                 'name'    => '__Subscription',
58 58
                 'fields'  => ['name' => ['type' => TypeMap::TYPE_STRING]],
59
-                'resolve' => function () { return null; }
59
+                'resolve' => function() { return null; }
60 60
             ]))
61 61
             ->addField('types', new QueryListType())
62 62
             ->addField('directives', new DirectiveListType());
Please login to merge, or discard this patch.
src/Validator/ResolveValidator/ResolveValidator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
     {
53 53
         if (!count($field->getConfig()->getArguments())) return true;
54 54
 
55
-        $requiredArguments = array_filter($field->getConfig()->getArguments(), function (InputField $argument) {
55
+        $requiredArguments = array_filter($field->getConfig()->getArguments(), function(InputField $argument) {
56 56
             return $argument->getConfig()->getType()->getKind() == TypeMap::KIND_NON_NULL;
57 57
         });
58 58
 
59
-        $withDefaultArguments = array_filter($field->getConfig()->getArguments(), function (InputField $argument) {
59
+        $withDefaultArguments = array_filter($field->getConfig()->getArguments(), function(InputField $argument) {
60 60
             return $argument->getConfig()->get('default') !== null;
61 61
         });
62 62
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function assertTypeImplementsInterface(AbstractObjectType $type, AbstractInterfaceType $interface)
121 121
     {
122 122
         if (!$interface->isValidValue($type)) {
123
-            throw new ResolveException('Type ' . $type->getName() . ' does not implement ' . $interface->getName());
123
+            throw new ResolveException('Type '.$type->getName().' does not implement '.$interface->getName());
124 124
         };
125 125
 
126 126
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
      */
51 51
     public function validateArguments($field, $query, $request)
52 52
     {
53
-        if (!count($field->getConfig()->getArguments())) return true;
53
+        if (!count($field->getConfig()->getArguments())) {
54
+            return true;
55
+        }
54 56
 
55 57
         $requiredArguments = array_filter($field->getConfig()->getArguments(), function (InputField $argument) {
56 58
             return $argument->getConfig()->getType()->getKind() == TypeMap::KIND_NON_NULL;
Please login to merge, or discard this patch.
src/Parser/Tokenizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
 
271 271
     protected function createError($message)
272 272
     {
273
-        return new SyntaxErrorException($message . " ({$this->line}:{$this->getColumn()})");
273
+        return new SyntaxErrorException($message." ({$this->line}:{$this->getColumn()})");
274 274
     }
275 275
 
276 276
     protected function getColumn()
Please login to merge, or discard this patch.
Tests/Type/Union/Schema/QueryType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
     {
25 25
         $config
26 26
             ->addField('unionList', new ListType(new TestUnionType()), [
27
-                'resolve' => function () {
27
+                'resolve' => function() {
28 28
                     return UnionTestData::getList();
29 29
                 }
30 30
             ])
31 31
             ->addField('oneUnion', new TestUnionType(), [
32
-                'resolve' => function () {
32
+                'resolve' => function() {
33 33
                     return UnionTestData::getOne();
34 34
                 }
35 35
             ]);
Please login to merge, or discard this patch.
Tests/ProcessorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                         'id'   => ['type' => TypeMap::TYPE_INT],
131 131
                         'name' => ['type' => TypeMap::TYPE_STRING]
132 132
                     ],
133
-                    'resolve' => function () {
133
+                    'resolve' => function() {
134 134
                         return [
135 135
                             'id'   => 1,
136 136
                             'name' => 'Alex'
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                                 ['name' => 'String', 'fields' => null],
193 193
                                 ['name' => '__Schema', 'fields' => [['name' => 'queryType'], ['name' => 'mutationType'], ['name' => 'subscriptionType'], ['name' => 'types'], ['name' => 'directives']]],
194 194
                                 ['name' => '__Type', 'fields' => [['name' => 'name'], ['name' => 'kind'], ['name' => 'description'], ['name' => 'ofType'], ['name' => 'inputFields'], ['name' => 'enumValues'], ['name' => 'fields'], ['name' => 'interfaces'], ['name' => 'possibleTypes']]],
195
-                                ['name' => '__InputValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'type'], ['name' => 'defaultValue'],]],
196
-                                ['name' => '__EnumValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'deprecationReason'], ['name' => 'isDeprecated'],]],
195
+                                ['name' => '__InputValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'type'], ['name' => 'defaultValue'], ]],
196
+                                ['name' => '__EnumValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'deprecationReason'], ['name' => 'isDeprecated'], ]],
197 197
                                 ['name' => 'Boolean', 'fields' => null],
198 198
                                 ['name' => '__Field', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'isDeprecated'], ['name' => 'deprecationReason'], ['name' => 'type'], ['name' => 'args']]],
199 199
                                 ['name' => '__Subscription', 'fields' => [['name' => 'name']]],
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                         'id'   => ['type' => TypeMap::TYPE_INT],
288 288
                         'name' => ['type' => TypeMap::TYPE_STRING]
289 289
                     ],
290
-                    'resolve' => function () {
290
+                    'resolve' => function() {
291 291
                         return [
292 292
                             'id'   => 1,
293 293
                             'name' => 'Alex'
Please login to merge, or discard this patch.