@@ -48,13 +48,13 @@ discard block |
||
| 48 | 48 | 'fields' => [ |
| 49 | 49 | 'nonNullScalar' => [ |
| 50 | 50 | 'type' => new NonNullType(new IntType()), |
| 51 | - 'resolve' => function () { |
|
| 51 | + 'resolve' => function() { |
|
| 52 | 52 | return null; |
| 53 | 53 | }, |
| 54 | 54 | ], |
| 55 | 55 | 'nonNullList' => [ |
| 56 | 56 | 'type' => new NonNullType(new ListType(new IntType())), |
| 57 | - 'resolve' => function () { |
|
| 57 | + 'resolve' => function() { |
|
| 58 | 58 | return null; |
| 59 | 59 | } |
| 60 | 60 | ], |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'name' => new StringType(), |
| 67 | 67 | ] |
| 68 | 68 | ])), |
| 69 | - 'resolve' => function () { |
|
| 69 | + 'resolve' => function() { |
|
| 70 | 70 | return [ |
| 71 | 71 | 'id' => new uid('6cfb044c-9c0a-4ddd-9ef8-a0b940818db3'), |
| 72 | 72 | 'name' => 'Alex' |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | ], |
| 76 | 76 | 'nonNullListOfNpnNull' => [ |
| 77 | 77 | 'type' => new NonNullType(new ListType(new NonNullType(new IntType()))), |
| 78 | - 'resolve' => function () { |
|
| 78 | + 'resolve' => function() { |
|
| 79 | 79 | return [1, null]; |
| 80 | 80 | } |
| 81 | 81 | ], |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | 'fields' => [ |
| 104 | 104 | 'user' => [ |
| 105 | 105 | 'type' => new UserType(), |
| 106 | - 'resolve' => function ($args) { |
|
| 106 | + 'resolve' => function($args) { |
|
| 107 | 107 | return [ |
| 108 | 108 | 'id' => 'user-id-1', |
| 109 | 109 | 'fullName' => 'Alex', |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ] |
| 81 | 81 | ]); |
| 82 | 82 | |
| 83 | - $finalConfig = new TestConfig(['name' => $name . 'final', 'resolve' => function () { return []; }], $object, true); |
|
| 83 | + $finalConfig = new TestConfig(['name' => $name.'final', 'resolve' => function() { return []; }], $object, true); |
|
| 84 | 84 | $this->assertEquals($finalConfig->getType(), null); |
| 85 | 85 | |
| 86 | 86 | $rules['resolve']['required'] = true; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function testFinalRule() |
| 102 | 102 | { |
| 103 | - ConfigValidator::getInstance()->assertValidConfig(new TestConfig(['name' => 'Test' . 'final'], null, true)); |
|
| 103 | + ConfigValidator::getInstance()->assertValidConfig(new TestConfig(['name' => 'Test'.'final'], null, true)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ] |
| 128 | 128 | ] |
| 129 | 129 | ]); |
| 130 | - $object = new ObjectType([ |
|
| 130 | + $object = new ObjectType([ |
|
| 131 | 131 | 'name' => 'Project', |
| 132 | 132 | 'fields' => [ |
| 133 | 133 | 'id' => new IdType(), |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | 'from' => new DateTimeType(), |
| 31 | 31 | 'fromtz' => new DateTimeTzType(), |
| 32 | 32 | ], |
| 33 | - 'resolve' => function ($source, $args) { |
|
| 33 | + 'resolve' => function($source, $args) { |
|
| 34 | 34 | return sprintf('Result with %s date and %s tz', |
| 35 | 35 | empty($args['from']) ? 'default' : $args['from'], |
| 36 | 36 | empty($args['fromtz']) ? 'default' : $args['fromtz'] |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * Fragments (anonymous and named), and Fields. The core of the function is simple: recurse until we hit the base |
| 93 | 93 | * case of a Field and yield that back up to the visitor up in `doVisit`. |
| 94 | 94 | * |
| 95 | - * @param Query|Field|\Youshido\GraphQL\Parser\Ast\Interfaces\FragmentInterface $queryNode |
|
| 95 | + * @param Query $queryNode |
|
| 96 | 96 | * @param FieldInterface $currentLevelAST |
| 97 | 97 | * |
| 98 | 98 | * @return \Generator |
@@ -294,7 +294,7 @@ |
||
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | /** |
| 297 | - * @return array|InputList|InputObject|Literal|VariableReference |
|
| 297 | + * @return Ast\Interfaces\ValueInterface |
|
| 298 | 298 | * |
| 299 | 299 | * @throws SyntaxErrorException |
| 300 | 300 | */ |
@@ -271,7 +271,7 @@ |
||
| 271 | 271 | if ($first) { |
| 272 | 272 | $first = false; |
| 273 | 273 | } else { |
| 274 | - if($this->match(Token::TYPE_COMMA)) { |
|
| 274 | + if ($this->match(Token::TYPE_COMMA)) { |
|
| 275 | 275 | $this->eat(Token::TYPE_COMMA); |
| 276 | 276 | } |
| 277 | 277 | } |
@@ -51,6 +51,10 @@ |
||
| 51 | 51 | /** @var integer */ |
| 52 | 52 | private $column; |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param integer $line |
|
| 56 | + * @param integer $column |
|
| 57 | + */ |
|
| 54 | 58 | public function __construct($type, $line, $column, $data = null) |
| 55 | 59 | { |
| 56 | 60 | $this->type = $type; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 'fields' => [ |
| 30 | 30 | 'currentTime' => [ |
| 31 | 31 | 'type' => new StringType(), |
| 32 | - 'resolve' => function ($value, $args, $type) { |
|
| 32 | + 'resolve' => function($value, $args, $type) { |
|
| 33 | 33 | return 'May 5, 9:00am'; |
| 34 | 34 | }, |
| 35 | 35 | 'args' => [ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $this->assertEquals(1, count($schema->getMutationType()->getFields())); |
| 60 | 60 | |
| 61 | - $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => function () { |
|
| 61 | + $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => function() { |
|
| 62 | 62 | }]); |
| 63 | 63 | $this->assertEquals(2, count($schema->getMutationType()->getFields())); |
| 64 | 64 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'fields' => [ |
| 91 | 91 | 'name' => new StringType(), |
| 92 | 92 | ], |
| 93 | - 'resolveType' => function () use ($authorType) { |
|
| 93 | + 'resolveType' => function() use ($authorType) { |
|
| 94 | 94 | return $authorType; |
| 95 | 95 | } |
| 96 | 96 | ]); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | 'fields' => [ |
| 110 | 110 | 'user' => [ |
| 111 | 111 | 'type' => $userInterface, |
| 112 | - 'resolve' => function () { |
|
| 112 | + 'resolve' => function() { |
|
| 113 | 113 | return [ |
| 114 | 114 | 'name' => 'Alex' |
| 115 | 115 | ]; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | public function testMethods() |
| 23 | 23 | { |
| 24 | - $fieldAst = new FieldAST('name', null, [], new Location(1,1)); |
|
| 24 | + $fieldAst = new FieldAST('name', null, [], new Location(1, 1)); |
|
| 25 | 25 | $field = new Field(['name' => 'id', 'type' => new IntType()]); |
| 26 | 26 | $returnType = new IntType(); |
| 27 | 27 | $executionContext = new ExecutionContext(new TestSchema()); |