@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | 'fields' => [ |
| 44 | 44 | 'name' => new StringType() |
| 45 | 45 | ], |
| 46 | - 'resolveType' => function ($object) { |
|
| 46 | + 'resolveType' => function($object) { |
|
| 47 | 47 | return $object; |
| 48 | 48 | } |
| 49 | 49 | ]); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | new TestObjectType(), |
| 33 | 33 | $object |
| 34 | 34 | ], |
| 35 | - 'resolveType' => function ($type) { |
|
| 35 | + 'resolveType' => function($type) { |
|
| 36 | 36 | return $type; |
| 37 | 37 | } |
| 38 | 38 | ]); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'types' => [ |
| 68 | 68 | 'test', new IntType() |
| 69 | 69 | ], |
| 70 | - 'resolveType' => function ($type) { |
|
| 70 | + 'resolveType' => function($type) { |
|
| 71 | 71 | return $type; |
| 72 | 72 | } |
| 73 | 73 | ]); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | 'types' => [ |
| 85 | 85 | new IntType() |
| 86 | 86 | ], |
| 87 | - 'resolveType' => function ($type) { |
|
| 87 | + 'resolveType' => function($type) { |
|
| 88 | 88 | return $type; |
| 89 | 89 | } |
| 90 | 90 | ]); |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | 'value' => 'disable' |
| 103 | 103 | ] |
| 104 | 104 | ]; |
| 105 | - $enumType = new EnumType([ |
|
| 105 | + $enumType = new EnumType([ |
|
| 106 | 106 | 'name' => 'BoolEnum', |
| 107 | 107 | 'values' => $valuesData |
| 108 | 108 | ]); |