Completed
Push — master ( 200493...fdd355 )
by Alexandr
08:14 queued 04:55
created
src/Type/Object/AbstractInputObjectType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             return false;
38 38
         }
39 39
 
40
-        $requiredFields = array_filter($this->getConfig()->getFields(), function (Field $field) {
40
+        $requiredFields = array_filter($this->getConfig()->getFields(), function(Field $field) {
41 41
             return $field->getConfig()->isRequired();
42 42
         });
43 43
 
Please login to merge, or discard this patch.
Tests/StarWars/Schema/HumanType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             ->addField('friends', new ListType([
32 32
                 'item' => new CharacterInterface()
33 33
             ]), [
34
-                'resolve' => function ($droid) {
34
+                'resolve' => function($droid) {
35 35
                     return StarWarsData::getFriends($droid);
36 36
                 },
37 37
             ])
Please login to merge, or discard this patch.
Tests/StarWars/Schema/QueryType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 'args'    => [
34 34
                     'episode' => ['type' => new EpisodeEnum()]
35 35
                 ],
36
-                'resolve' => function ($root, $args) {
36
+                'resolve' => function($root, $args) {
37 37
                     return StarWarsData::getHero(isset($args['episode']) ? $args['episode'] : null);
38 38
                 },
39 39
             ])
Please login to merge, or discard this patch.
Tests/StarWars/StarWarsTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,21 +98,21 @@  discard block
 block discarded – undo
98 98
                             'friends' => [
99 99
                                 [
100 100
                                     'name'      => 'Luke Skywalker',
101
-                                    'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI',],
101
+                                    'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI', ],
102 102
                                     'friends'   => [
103
-                                        ['name' => 'Han Solo',],
104
-                                        ['name' => 'Leia Organa',],
105
-                                        ['name' => 'C-3PO',],
106
-                                        ['name' => 'R2-D2',],
103
+                                        ['name' => 'Han Solo', ],
104
+                                        ['name' => 'Leia Organa', ],
105
+                                        ['name' => 'C-3PO', ],
106
+                                        ['name' => 'R2-D2', ],
107 107
                                     ],
108 108
                                 ],
109 109
                                 [
110 110
                                     'name'      => 'Han Solo',
111 111
                                     'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI'],
112 112
                                     'friends'   => [
113
-                                        ['name' => 'Luke Skywalker',],
113
+                                        ['name' => 'Luke Skywalker', ],
114 114
                                         ['name' => 'Leia Organa'],
115
-                                        ['name' => 'R2-D2',],
115
+                                        ['name' => 'R2-D2', ],
116 116
                                     ]
117 117
                                 ],
118 118
                                 [
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                                     'appearsIn' => ['NEWHOPE', 'EMPIRE', 'JEDI'],
121 121
                                     'friends'   =>
122 122
                                         [
123
-                                            ['name' => 'Luke Skywalker',],
124
-                                            ['name' => 'Han Solo',],
125
-                                            ['name' => 'C-3PO',],
126
-                                            ['name' => 'R2-D2',],
123
+                                            ['name' => 'Luke Skywalker', ],
124
+                                            ['name' => 'Han Solo', ],
125
+                                            ['name' => 'C-3PO', ],
126
+                                            ['name' => 'R2-D2', ],
127 127
                                         ],
128 128
                                 ],
129 129
                             ],
Please login to merge, or discard this patch.
src/Type/Object/AbstractEnumType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function isValidValue($value)
46 46
     {
47
-        return in_array($value, array_map(function ($item) { return $item['value']; }, $this->getConfig()->get('values')));
47
+        return in_array($value, array_map(function($item) { return $item['value']; }, $this->getConfig()->get('values')));
48 48
     }
49 49
 
50 50
     abstract public function getValues();
Please login to merge, or discard this patch.
src/Introspection/QueryType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             ->addField('kind', TypeMap::TYPE_STRING)
46 46
             ->addField('description', TypeMap::TYPE_STRING)
47 47
             ->addField('ofType', new QueryType(), [
48
-                'resolve' => function ($value) {
48
+                'resolve' => function($value) {
49 49
                     if ($value->getKind() == TypeMap::KIND_LIST) {
50 50
                         return $value->getConfig()->getItem();
51 51
                     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             ->addField('fields', new FieldListType())
59 59
             ->addField('interfaces', new InterfaceListType())
60 60
             ->addField('possibleTypes', new ListType(new QueryType()), [
61
-                'resolve' => function ($value) {
61
+                'resolve' => function($value) {
62 62
                     if ($value) {
63 63
                         if ($value->getKind() == TypeMap::KIND_INTERFACE) {
64 64
                             $this->collectTypes(SchemaType::$schema->getQueryType());
Please login to merge, or discard this patch.
Tests/Type/ScalarTypeTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
20 20
         foreach (TypeMap::getScalarTypes() as $typeName) {
21 21
             $typeName = ucfirst($typeName);
22 22
             if ($typeName == 'Datetime') {
23
-                $className = 'Youshido\GraphQL\Type\Scalar\DateTimeType';//  : ;
23
+                $className = 'Youshido\GraphQL\Type\Scalar\DateTimeType'; //  : ;
24 24
             } elseif ($typeName == 'Datetimetz') {
25 25
                 $className = 'Youshido\GraphQL\Type\Scalar\DateTimeTzType';
26 26
             } else {
27
-                $className = 'Youshido\GraphQL\Type\Scalar\\' . ucfirst($typeName) . 'Type';
27
+                $className = 'Youshido\GraphQL\Type\Scalar\\'.ucfirst($typeName).'Type';
28 28
             }
29 29
 
30 30
             /** @var TypeInterface $object */
31 31
             $object         = new $className();
32
-            $testDataMethod = 'get' . $typeName . 'TestData';
32
+            $testDataMethod = 'get'.$typeName.'TestData';
33 33
             $this->checkDescription($object);
34 34
 
35 35
             foreach (call_user_func(['Youshido\Tests\DataProvider\TestScalarDataProvider', $testDataMethod]) as list($data, $serialized, $isValid)) {
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
                 $this->checkSerialization($object, $data, $serialized);
38 38
 
39 39
                 if ($isValid) {
40
-                    $this->assertTrue($object->isValidValue($data), $typeName . ' validation for :' . serialize($data));
40
+                    $this->assertTrue($object->isValidValue($data), $typeName.' validation for :'.serialize($data));
41 41
                 } else {
42
-                    $this->assertFalse($object->isValidValue($data), $typeName . ' validation for :' . serialize($data));
42
+                    $this->assertFalse($object->isValidValue($data), $typeName.' validation for :'.serialize($data));
43 43
                 }
44 44
             }
45 45
         }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     private function checkSerialization(TypeInterface $object, $input, $expected)
54 54
     {
55
-        $this->assertEquals($expected, $object->serialize($input), $object->getName() . ' serialize for: ' . serialize($input));
55
+        $this->assertEquals($expected, $object->serialize($input), $object->getName().' serialize for: '.serialize($input));
56 56
     }
57 57
 
58 58
 }
Please login to merge, or discard this patch.
src/Type/Scalar/StringType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
 
37 37
     public function getDescription()
38 38
     {
39
-        return 'The `String` scalar type represents textual data, represented as UTF-8 ' .
40
-               'character sequences. The String type is most often used by GraphQL to ' .
39
+        return 'The `String` scalar type represents textual data, represented as UTF-8 '.
40
+               'character sequences. The String type is most often used by GraphQL to '.
41 41
                'represent free-form human-readable text.';
42 42
     }
43 43
 
Please login to merge, or discard this patch.
src/Type/Scalar/IdType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 
24 24
     public function getDescription()
25 25
     {
26
-        return 'The `ID` scalar type represents a unique identifier, often used to ' .
27
-               'refetch an object or as key for a cache. The ID type appears in a JSON ' .
28
-               'response as a String; however, it is not intended to be human-readable. ' .
29
-               'When expected as an input type, any string (such as `"4"`) or integer ' .
26
+        return 'The `ID` scalar type represents a unique identifier, often used to '.
27
+               'refetch an object or as key for a cache. The ID type appears in a JSON '.
28
+               'response as a String; however, it is not intended to be human-readable. '.
29
+               'When expected as an input type, any string (such as `"4"`) or integer '.
30 30
                '(such as `4`) input value will be accepted as an ID.';
31 31
     }
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.