Completed
Pull Request — master (#204)
by Ryan
11:34
created
src/Parser/Ast/Fragment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     }
85 85
 
86 86
     /**
87
-     * @return Field[]|Query[]
87
+     * @return Query[]
88 88
      */
89 89
     public function getFields()
90 90
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /**
14 14
  * Date: 23.11.15.
15 15
  */
Please login to merge, or discard this patch.
src/Parser/Ast/TypedFragmentReference.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-     * @return Field[]|Query[]
31
+     * @return Field[]
32 32
      */
33 33
     public function getFields()
34 34
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /**
14 14
  * Date: 23.11.15.
15 15
  */
Please login to merge, or discard this patch.
examples/02_blog/Schema/PostType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
                 'args'              => [
26 26
                     'truncated' => new BooleanType()
27 27
                 ],
28
-                'resolve'           => function ($value, $args) {
29
-                    return (!empty($args['truncated'])) ? explode(' ', $value)[0] . '...' : $value;
28
+                'resolve'           => function($value, $args) {
29
+                    return (!empty($args['truncated'])) ? explode(' ', $value)[0].'...' : $value;
30 30
                 }
31 31
             ])
32 32
             ->addField('title', new NonNullType(new StringType()))
Please login to merge, or discard this patch.
examples/02_blog/Schema/DataProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
     public static function getPost($id)
11 11
     {
12 12
         return [
13
-            "id"        => "post-" . $id,
14
-            "title"     => "Post " . $id . " title",
13
+            "id"        => "post-".$id,
14
+            "title"     => "Post ".$id." title",
15 15
             "summary"   => "This new GraphQL library for PHP works really well",
16 16
             "status"    => 1,
17 17
             "likeCount" => 2
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
     public static function getBanner($id)
22 22
     {
23 23
         return [
24
-            'id'        => "banner-" . $id,
25
-            'title'     => "Banner " . $id,
26
-            'imageLink' => "banner" . $id . ".jpg"
24
+            'id'        => "banner-".$id,
25
+            'title'     => "Banner ".$id,
26
+            'imageLink' => "banner".$id.".jpg"
27 27
         ];
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Type/Scalar/StringType.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
     public function getDescription()
43 43
     {
44 44
         return 'The `String` scalar type represents textual data, represented as UTF-8 ' .
45
-               'character sequences. The String type is most often used by GraphQL to ' .
46
-               'represent free-form human-readable text.';
45
+                'character sequences. The String type is most often used by GraphQL to ' .
46
+                'represent free-form human-readable text.';
47 47
     }
48 48
 
49 49
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of graphql-youshido project.
15 15
  *
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return '';
45 45
         }
46 46
 
47
-        return (string) $value;
47
+        return (string)$value;
48 48
     }
49 49
 
50 50
     public function isValidValue($value)
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function getDescription()
56 56
     {
57
-        return 'The `String` scalar type represents textual data, represented as UTF-8 ' .
58
-               'character sequences. The String type is most often used by GraphQL to ' .
57
+        return 'The `String` scalar type represents textual data, represented as UTF-8 '.
58
+               'character sequences. The String type is most often used by GraphQL to '.
59 59
                'represent free-form human-readable text.';
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
src/Type/Scalar/FloatType.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
     public function getDescription()
30 30
     {
31 31
         return 'The `Float` scalar type represents signed double-precision fractional ' .
32
-               'values as specified by ' .
33
-               '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
32
+                'values as specified by ' .
33
+                '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
34 34
     }
35 35
 
36 36
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of graphql-youshido project.
15 15
  *
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             return;
33 33
         }
34 34
 
35
-        return (float) $value;
35
+        return (float)$value;
36 36
     }
37 37
 
38 38
     public function isValidValue($value)
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function getDescription()
44 44
     {
45
-        return 'The `Float` scalar type represents signed double-precision fractional ' .
46
-               'values as specified by ' .
45
+        return 'The `Float` scalar type represents signed double-precision fractional '.
46
+               'values as specified by '.
47 47
                '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/Type/Scalar/IntType.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
     public function getDescription()
41 41
     {
42 42
         return 'The `Int` scalar type represents non-fractional signed whole numeric ' .
43
-               'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' .
44
-               'represented in JSON as double-precision floating point numbers specified' .
45
-               'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
43
+                'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' .
44
+                'represented in JSON as double-precision floating point numbers specified' .
45
+                'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
46 46
     }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of graphql-youshido project.
15 15
  *
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         if (\is_int($value)) {
36 36
             return $value;
37 37
         }
38
-        $value = (int) $value;
38
+        $value = (int)$value;
39 39
 
40 40
         return 0 !== $value ? $value : null;
41 41
     }
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function getDescription()
49 49
     {
50
-        return 'The `Int` scalar type represents non-fractional signed whole numeric ' .
51
-               'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' .
52
-               'represented in JSON as double-precision floating point numbers specified' .
50
+        return 'The `Int` scalar type represents non-fractional signed whole numeric '.
51
+               'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since '.
52
+               'represented in JSON as double-precision floating point numbers specified'.
53 53
                'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Type/Scalar/IdType.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
     public function getDescription()
31 31
     {
32 32
         return 'The `ID` scalar type represents a unique identifier, often used to ' .
33
-               'refetch an object or as key for a cache. The ID type appears in a JSON ' .
34
-               'response as a String; however, it is not intended to be human-readable. ' .
35
-               'When expected as an input type, any string (such as `"4"`) or integer ' .
36
-               '(such as `4`) input value will be accepted as an ID.';
33
+                'refetch an object or as key for a cache. The ID type appears in a JSON ' .
34
+                'response as a String; however, it is not intended to be human-readable. ' .
35
+                'When expected as an input type, any string (such as `"4"`) or integer ' .
36
+                '(such as `4`) input value will be accepted as an ID.';
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of GraphQL project.
15 15
  *
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
             return;
33 33
         }
34 34
 
35
-        return (string) $value;
35
+        return (string)$value;
36 36
     }
37 37
 
38 38
     public function getDescription()
39 39
     {
40
-        return 'The `ID` scalar type represents a unique identifier, often used to ' .
41
-               'refetch an object or as key for a cache. The ID type appears in a JSON ' .
42
-               'response as a String; however, it is not intended to be human-readable. ' .
43
-               'When expected as an input type, any string (such as `"4"`) or integer ' .
40
+        return 'The `ID` scalar type represents a unique identifier, often used to '.
41
+               'refetch an object or as key for a cache. The ID type appears in a JSON '.
42
+               'response as a String; however, it is not intended to be human-readable. '.
43
+               'When expected as an input type, any string (such as `"4"`) or integer '.
44 44
                '(such as `4`) input value will be accepted as an ID.';
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
examples/02_blog_inline/inline-schema.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
                 'fields' => [
18 18
                     // here you have a complex field with a lot of options
19 19
                     'title'     => [
20
-                        'type'              => new StringType(),                    // string type
21
-                        'description'       => 'This field contains a post title',  // description
22
-                        'isDeprecated'      => true,                                // marked as deprecated
23
-                        'deprecationReason' => 'field title is now deprecated',     // explain the reason
20
+                        'type'              => new StringType(), // string type
21
+                        'description'       => 'This field contains a post title', // description
22
+                        'isDeprecated'      => true, // marked as deprecated
23
+                        'deprecationReason' => 'field title is now deprecated', // explain the reason
24 24
                         'args'              => [
25 25
                             'truncated' => new BooleanType()                        // add an optional argument
26 26
                         ],
27
-                        'resolve'           => function ($value, $args) {
27
+                        'resolve'           => function($value, $args) {
28 28
                             // used argument to modify a field value
29
-                            return (!empty($args['truncated'])) ? explode(' ', $value)[0] . '...' : $value;
29
+                            return (!empty($args['truncated'])) ? explode(' ', $value)[0].'...' : $value;
30 30
                         }
31 31
                     ],
32 32
                     // if field just has a type, you can use a short declaration syntax like this
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 'id' => new IntType()
40 40
             ],
41 41
             // resolve function for the query
42
-            'resolve' => function () {
42
+            'resolve' => function() {
43 43
                 return [
44 44
                     'title'   => 'Title for the latest Post',
45 45
                     'summary' => 'Post summary',
Please login to merge, or discard this patch.