@@ -8,7 +8,6 @@ |
||
8 | 8 | |
9 | 9 | namespace Youshido\GraphQL\Validator\SchemaValidator; |
10 | 10 | |
11 | -use Youshido\GraphQL\Config\AbstractConfig; |
|
12 | 11 | use Youshido\GraphQL\Field\Field; |
13 | 12 | use Youshido\GraphQL\Schema\AbstractSchema; |
14 | 13 | use Youshido\GraphQL\Type\InterfaceType\AbstractInterfaceType; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function assertValidateConfig(AbstractConfig $config) |
54 | 54 | { |
55 | 55 | if (!$this->validate($config->getData(), $this->getConfigFinalRules($config), $config->isExtraFieldsAllowed())) { |
56 | - throw new ConfigurationException('Config is not valid for ' . ($config->getContextObject() ? get_class($config->getContextObject()) : null) . "\n" . implode("\n", $this->getErrorsArray(false))); |
|
56 | + throw new ConfigurationException('Config is not valid for '.($config->getContextObject() ? get_class($config->getContextObject()) : null)."\n".implode("\n", $this->getErrorsArray(false))); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $config['type'] = $this->getType(); |
35 | 35 | $config['name'] = $this->getName(); |
36 | 36 | if (empty($config['name'])) { |
37 | - $config['name'] =$this->getAutoName(); |
|
37 | + $config['name'] = $this->getAutoName(); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $validator = ConfigValidator::getInstance(); |
60 | 60 | |
61 | 61 | if (!$validator->validate($this->data, $this->getContextRules(), $this->extraFieldsAllowed)) { |
62 | - throw new ConfigurationException('Config is not valid for ' . ($this->contextObject ? get_class($this->contextObject) : null) . "\n" . implode("\n", $validator->getErrorsArray(false))); |
|
62 | + throw new ConfigurationException('Config is not valid for '.($this->contextObject ? get_class($this->contextObject) : null)."\n".implode("\n", $validator->getErrorsArray(false))); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } elseif (substr($method, 0, 2) == 'is') { |
152 | 152 | $propertyName = lcfirst(substr($method, 2)); |
153 | 153 | } else { |
154 | - throw new \Exception('Call to undefined method ' . $method); |
|
154 | + throw new \Exception('Call to undefined method '.$method); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | return $this->get($propertyName); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function testConfigNoFields() |
32 | 32 | { |
33 | 33 | ConfigValidator::getInstance()->assertValidateConfig( |
34 | - new InterfaceTypeConfig(['name' => 'Test', 'resolveType' => function () { }], null, true) |
|
34 | + new InterfaceTypeConfig(['name' => 'Test', 'resolveType' => function() { }], null, true) |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $interfaceConfig = new InterfaceTypeConfig([ |
60 | 60 | 'name' => 'Test', |
61 | 61 | 'fields' => ['id' => new IntType()], |
62 | - 'resolveType' => function ($object) { |
|
62 | + 'resolveType' => function($object) { |
|
63 | 63 | return $object->getType(); |
64 | 64 | } |
65 | 65 | ], null, true); |
66 | - $object = new ObjectType(['name' => 'User', 'fields' => ['name' => new StringType()]]); |
|
66 | + $object = new ObjectType(['name' => 'User', 'fields' => ['name' => new StringType()]]); |
|
67 | 67 | |
68 | 68 | $this->assertEquals($interfaceConfig->getName(), 'Test'); |
69 | 69 | $this->assertEquals($interfaceConfig->resolveType($object), $object->getType()); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ] |
79 | 79 | ]); |
80 | 80 | |
81 | - $finalConfig = new TestConfig(['name' => $name . 'final', 'resolve' => function () { return []; }], $object, true); |
|
81 | + $finalConfig = new TestConfig(['name' => $name.'final', 'resolve' => function() { return []; }], $object, true); |
|
82 | 82 | $this->assertEquals($finalConfig->getType(), null); |
83 | 83 | |
84 | 84 | $rules['resolve']['required'] = true; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function testFinalRule() |
100 | 100 | { |
101 | - ConfigValidator::getInstance()->assertValidateConfig(new TestConfig(['name' => 'Test' . 'final'], null, true)); |
|
101 | + ConfigValidator::getInstance()->assertValidateConfig(new TestConfig(['name' => 'Test'.'final'], null, true)); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |