@@ -41,7 +41,7 @@ |
||
41 | 41 | public function getValue() |
42 | 42 | { |
43 | 43 | if (!$this->value) { |
44 | - throw new \LogicException('Value is not set for variable "' . $this->name . '"'); |
|
44 | + throw new \LogicException('Value is not set for variable "'.$this->name.'"'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $this->value; |
@@ -30,21 +30,21 @@ |
||
30 | 30 | ], |
31 | 31 | ])) |
32 | 32 | ->addField('location', [ |
33 | - 'type' => new ObjectType( |
|
34 | - [ |
|
35 | - 'name' => 'Location', |
|
36 | - 'fields' => [ |
|
37 | - 'address' => new StringType() |
|
38 | - ] |
|
39 | - ] |
|
40 | - ), |
|
41 | - 'args' => [ |
|
42 | - 'noop' => new IntType() |
|
43 | - ], |
|
44 | - 'resolve' => function ($value, $args, $info) { |
|
45 | - return ['address' => '1234 Street']; |
|
46 | - } |
|
47 | - ] |
|
33 | + 'type' => new ObjectType( |
|
34 | + [ |
|
35 | + 'name' => 'Location', |
|
36 | + 'fields' => [ |
|
37 | + 'address' => new StringType() |
|
38 | + ] |
|
39 | + ] |
|
40 | + ), |
|
41 | + 'args' => [ |
|
42 | + 'noop' => new IntType() |
|
43 | + ], |
|
44 | + 'resolve' => function ($value, $args, $info) { |
|
45 | + return ['address' => '1234 Street']; |
|
46 | + } |
|
47 | + ] |
|
48 | 48 | ) |
49 | 49 | ->addField( |
50 | 50 | 'echo', [ |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | 'args' => [ |
42 | 42 | 'noop' => new IntType() |
43 | 43 | ], |
44 | - 'resolve' => function ($value, $args, $info) { |
|
44 | + 'resolve' => function($value, $args, $info) { |
|
45 | 45 | return ['address' => '1234 Street']; |
46 | 46 | } |
47 | 47 | ] |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | 'args' => [ |
53 | 53 | 'value' => new NonNullType(new StringType()) |
54 | 54 | ], |
55 | - 'resolve' => function ($value, $args, $info) { |
|
55 | + 'resolve' => function($value, $args, $info) { |
|
56 | 56 | return $args['value']; |
57 | 57 | } |
58 | 58 | ] |
@@ -61,6 +61,6 @@ |
||
61 | 61 | $arrayData = (new TestObjectType())->getData(); |
62 | 62 | |
63 | 63 | $this->assertEquals('John', TypeService::getPropertyValue($arrayData, 'name')); |
64 | - $this->assertEquals('John', TypeService::getPropertyValue((object) $arrayData, 'name')); |
|
64 | + $this->assertEquals('John', TypeService::getPropertyValue((object)$arrayData, 'name')); |
|
65 | 65 | } |
66 | 66 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public static function resolveOfType(AbstractType $value) |
37 | 37 | { |
38 | 38 | if ($value instanceof CompositeTypeInterface) { |
39 | - return $value->getTypeOf(); |
|
39 | + return $value->getTypeOf(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | return null; |