@@ -98,21 +98,21 @@ discard block |
||
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 |
||
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 | ], |
@@ -29,9 +29,9 @@ |
||
29 | 29 | |
30 | 30 | public function getDescription() |
31 | 31 | { |
32 | - return 'The `Int` scalar type represents non-fractional signed whole numeric ' . |
|
33 | - 'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' . |
|
34 | - 'represented in JSON as double-precision floating point numbers specified' . |
|
32 | + return 'The `Int` scalar type represents non-fractional signed whole numeric '. |
|
33 | + 'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since '. |
|
34 | + 'represented in JSON as double-precision floating point numbers specified'. |
|
35 | 35 | 'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
36 | 36 | } |
37 | 37 |
@@ -40,9 +40,9 @@ |
||
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 | } |
@@ -23,8 +23,8 @@ |
||
23 | 23 | |
24 | 24 | public function getDescription() |
25 | 25 | { |
26 | - return 'The `Float` scalar type represents signed double-precision fractional ' . |
|
27 | - 'values as specified by ' . |
|
26 | + return 'The `Float` scalar type represents signed double-precision fractional '. |
|
27 | + 'values as specified by '. |
|
28 | 28 | '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
29 | 29 | } |
30 | 30 |
@@ -29,8 +29,8 @@ |
||
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 | } |
@@ -25,8 +25,8 @@ |
||
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())) |
@@ -10,8 +10,8 @@ discard block |
||
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 |
||
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 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | parent::build($config); |
30 | 30 | |
31 | - $config->getField('friends')->getConfig()->set('resolve', function ($droid) { |
|
31 | + $config->getField('friends')->getConfig()->set('resolve', function($droid) { |
|
32 | 32 | return StarWarsData::getFriends($droid); |
33 | 33 | }); |
34 | 34 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
63 | - * @param mixed $name |
|
63 | + * @param string $name |
|
64 | 64 | */ |
65 | 65 | public function setName($name) |
66 | 66 | { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * @param mixed $model |
|
79 | + * @param string $model |
|
80 | 80 | */ |
81 | 81 | public function setModel($model) |
82 | 82 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * @return Field[]|Query[] |
|
87 | + * @return Query[] |
|
88 | 88 | */ |
89 | 89 | public function getFields() |
90 | 90 | { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | - * @param Field[]|Query[] $fields |
|
95 | + * @param Field[] $fields |
|
96 | 96 | */ |
97 | 97 | public function setFields($fields) |
98 | 98 | { |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * @return Field[]|Query[]|FragmentInterface[] |
|
77 | + * @return Query[] |
|
78 | 78 | */ |
79 | 79 | public function getFields() |
80 | 80 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | - * @return Field[]|Query[] |
|
31 | + * @return Field[] |
|
32 | 32 | */ |
33 | 33 | public function getFields() |
34 | 34 | { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * @param Field[]|Query[] $fields |
|
39 | + * @param Field[] $fields |
|
40 | 40 | */ |
41 | 41 | public function setFields($fields) |
42 | 42 | { |