@@ -129,7 +129,7 @@ |
||
| 129 | 129 | if (is_object($data)) { |
| 130 | 130 | $getter = $path; |
| 131 | 131 | if (substr($path, 0, 2) != 'is') { |
| 132 | - $getter = 'get' . self::classify($path); |
|
| 132 | + $getter = 'get'.self::classify($path); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | return is_callable([$data, $getter]) ? $data->$getter() : (isset($data->$path) ? $data->$path : null); |
@@ -34,13 +34,13 @@ |
||
| 34 | 34 | $name = $name == 'Datetime' ? 'DateTime' : $name; |
| 35 | 35 | $name = $name == 'Datetimetz' ? 'DateTimeTz' : $name; |
| 36 | 36 | |
| 37 | - $className = 'Youshido\GraphQL\Type\Scalar\\' . $name . 'Type'; |
|
| 37 | + $className = 'Youshido\GraphQL\Type\Scalar\\'.$name.'Type'; |
|
| 38 | 38 | self::$objectsHash[$type] = new $className(); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return self::$objectsHash[$type]; |
| 42 | 42 | } else { |
| 43 | - throw new ConfigurationException('Configuration problem with type ' . $type); |
|
| 43 | + throw new ConfigurationException('Configuration problem with type '.$type); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | foreach ($value->getTypesList()->getTypes() as $type) { |
| 48 | - $this->collectTypes($type); |
|
| 48 | + $this->collectTypes($type); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | return array_values($this->types); |
@@ -20,7 +20,9 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected function collectTypes(AbstractType $type) |
| 22 | 22 | { |
| 23 | - if (is_object($type) && array_key_exists($type->getName(), $this->types)) return; |
|
| 23 | + if (is_object($type) && array_key_exists($type->getName(), $this->types)) { |
|
| 24 | + return; |
|
| 25 | + } |
|
| 24 | 26 | |
| 25 | 27 | switch ($type->getKind()) { |
| 26 | 28 | case TypeMap::KIND_INTERFACE: |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | public function getValue() |
| 63 | 63 | { |
| 64 | 64 | if (null === $this->value) { |
| 65 | - throw new \LogicException('Value is not set for variable "' . $this->name . '"'); |
|
| 65 | + throw new \LogicException('Value is not set for variable "'.$this->name.'"'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | return $this->value; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function assertValidArguments(FieldInterface $field, AstFieldInterface $query, Request $request) |
| 35 | 35 | { |
| 36 | - $requiredArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
| 36 | + $requiredArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
| 37 | 37 | return $argument->getType()->getKind() === TypeMap::KIND_NON_NULL; |
| 38 | 38 | }); |
| 39 | 39 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | self::assertTrue(isset($res['data']['items'])); |
| 24 | 24 | |
| 25 | - foreach($res['data']['items'] as $item) { |
|
| 25 | + foreach ($res['data']['items'] as $item) { |
|
| 26 | 26 | self::assertTrue(isset($item['custom']['value'])); |
| 27 | 27 | self::assertEquals(self::BUG_NOT_EXISTS_VALUE, $item['custom']['value']); |
| 28 | 28 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | 'args' => [ |
| 53 | 53 | 'example' => new StringType() |
| 54 | 54 | ], |
| 55 | - 'resolve' => function () { |
|
| 55 | + 'resolve' => function() { |
|
| 56 | 56 | return [ |
| 57 | 57 | ['id' => 1], |
| 58 | 58 | ['id' => 2], |