@@ -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; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function assertValidConfig(AbstractConfig $config) |
54 | 54 | { |
55 | 55 | if (!$this->isValidConfig($config)) { |
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 |
@@ -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], |
@@ -208,7 +208,7 @@ |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | $this->variables = $variables; |
211 | - foreach($this->variableReferences as $reference) { |
|
211 | + foreach ($this->variableReferences as $reference) { |
|
212 | 212 | /** invalid request with no variable */ |
213 | 213 | if (!$reference->getVariable()) continue; |
214 | 214 | $variableName = $reference->getVariable()->getName(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | ] |
41 | 41 | ] |
42 | 42 | ]), |
43 | - 'resolve' => function ($source, array $args, ResolveInfo $info) { |
|
43 | + 'resolve' => function($source, array $args, ResolveInfo $info) { |
|
44 | 44 | $internalArgs = [ |
45 | 45 | 'comment_id' => 200 |
46 | 46 | ]; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | ['id' => 2, 'name' => 'Alex'], |
32 | 32 | ['id' => 3, 'name' => 'Mike'], |
33 | 33 | ]; |
34 | - $posts = []; |
|
34 | + $posts = []; |
|
35 | 35 | for ($i = 0; $i < 10; $i++) { |
36 | 36 | $posts[] = [ |
37 | 37 | 'id' => $i + 1, |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'fields' => [ |
68 | 68 | 'posts' => [ |
69 | 69 | 'type' => new ListType($postType), |
70 | - 'resolve' => function ($source, $args, $info) { |
|
70 | + 'resolve' => function($source, $args, $info) { |
|
71 | 71 | return $this->getDataForPosts(); |
72 | 72 | } |
73 | 73 | ] |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | if (!is_array($data)) return null; |
19 | 19 | |
20 | 20 | $index = array_search($object, $data); |
21 | - return $index === false ? null : (string) self::keyToCursor($index); |
|
21 | + return $index === false ? null : (string)self::keyToCursor($index); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public static function keyToCursor($key) |
36 | 36 | { |
37 | - return base64_encode(self::PREFIX . $key); |
|
37 | + return base64_encode(self::PREFIX.$key); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $offset = array_search($key, array_keys($array)); |
87 | 87 | } |
88 | 88 | |
89 | - return is_null($offset) ? $default : (int) $offset; |
|
89 | + return is_null($offset) ? $default : (int)$offset; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | public static function connectionFromArray(array $data, array $args = []) |