@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | if (!count($field->getArguments())) return true; |
| 63 | 63 | |
| 64 | - $requiredArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
| 64 | + $requiredArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
| 65 | 65 | return $argument->getType()->getKind() == TypeMap::KIND_NON_NULL; |
| 66 | 66 | }); |
| 67 | 67 | |
| 68 | - $withDefaultArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
| 68 | + $withDefaultArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
| 69 | 69 | return $argument->getConfig()->get('default') !== null; |
| 70 | 70 | }); |
| 71 | 71 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | public function assertTypeImplementsInterface(AbstractType $type, AbstractInterfaceType $interface) |
| 134 | 134 | { |
| 135 | 135 | if (!$interface->isValidValue($type)) { |
| 136 | - throw new ResolveException('Type ' . $type->getName() . ' does not implement ' . $interface->getName()); |
|
| 136 | + throw new ResolveException('Type '.$type->getName().' does not implement '.$interface->getName()); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if (!$valid) { |
| 155 | - throw new ResolveException('Type ' . $type->getName() . ' not exist in types of ' . $unionType->getName()); |
|
| 155 | + throw new ResolveException('Type '.$type->getName().' not exist in types of '.$unionType->getName()); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
@@ -45,6 +45,9 @@ |
||
| 45 | 45 | { |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $name |
|
| 50 | + */ |
|
| 48 | 51 | public function addQuery($name, AbstractObjectType $query) |
| 49 | 52 | { |
| 50 | 53 | $this->getQueryType()->getConfig()->addField($name, $query); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->memo += $cost; |
| 54 | 54 | |
| 55 | 55 | if ($this->memo > $this->maxScore) { |
| 56 | - throw new \Exception('query exceeded max allowed complexity of ' . $this->maxScore); |
|
| 56 | + throw new \Exception('query exceeded max allowed complexity of '.$this->maxScore); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | return $cost; |