@@ -24,8 +24,8 @@ |
||
| 24 | 24 | public function getDescription() |
| 25 | 25 | { |
| 26 | 26 | return 'The `Float` scalar type represents signed double-precision fractional ' . |
| 27 | - 'values as specified by ' . |
|
| 28 | - '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
|
| 27 | + 'values as specified by ' . |
|
| 28 | + '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |
@@ -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 | |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | public function getDescription() |
| 27 | 27 | { |
| 28 | 28 | return 'The `Int` scalar type represents non-fractional signed whole numeric ' . |
| 29 | - 'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' . |
|
| 30 | - 'represented in JSON as double-precision floating point numbers specified' . |
|
| 31 | - 'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
|
| 29 | + 'values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since ' . |
|
| 30 | + 'represented in JSON as double-precision floating point numbers specified' . |
|
| 31 | + 'by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | } |
| 35 | 35 | \ No newline at end of file |
@@ -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 | |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | public function getDescription() |
| 38 | 38 | { |
| 39 | 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 | - 'represent free-form human-readable text.'; |
|
| 40 | + 'character sequences. The String type is most often used by GraphQL to ' . |
|
| 41 | + 'represent free-form human-readable text.'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | } |
| 45 | 45 | \ No newline at end of file |
@@ -36,8 +36,8 @@ |
||
| 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 | |
@@ -24,9 +24,9 @@ |
||
| 24 | 24 | public function getDescription() |
| 25 | 25 | { |
| 26 | 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 | - '(such as `4`) input value will be accepted as an ID.'; |
|
| 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 | + '(such as `4`) input value will be accepted as an ID.'; |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | \ No newline at end of file |
@@ -23,10 +23,10 @@ |
||
| 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 |
@@ -37,7 +37,7 @@ |
||
| 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 | |
@@ -31,7 +31,7 @@ |
||
| 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 | ]) |
@@ -33,7 +33,7 @@ |
||
| 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 | ]) |
@@ -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 | ], |
@@ -44,7 +44,7 @@ |
||
| 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(); |