@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @param $cursor string |
54 | 54 | * |
55 | - * @return int|null |
|
55 | + * @return string|null |
|
56 | 56 | * |
57 | 57 | * @deprecated Use cursorToKey instead. |
58 | 58 | */ |
@@ -109,6 +109,10 @@ discard block |
||
109 | 109 | return self::connectionFromArraySlice($data, $args, 0, \count($data)); |
110 | 110 | } |
111 | 111 | |
112 | + /** |
|
113 | + * @param integer $sliceStart |
|
114 | + * @param integer $arrayLength |
|
115 | + */ |
|
112 | 116 | public static function connectionFromArraySlice(array $data, array $args, $sliceStart, $arrayLength) |
113 | 117 | { |
114 | 118 | $after = $args['after'] ?? null; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 17.05.16. |
15 | 15 | */ |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | $index = \array_search($object, $data, true); |
30 | 30 | |
31 | - return false === $index ? null : (string) self::keyToCursor($index); |
|
31 | + return false === $index ? null : (string)self::keyToCursor($index); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | public static function keyToCursor($key) |
48 | 48 | { |
49 | - return \base64_encode(self::PREFIX . $key); |
|
49 | + return \base64_encode(self::PREFIX.$key); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $offset = \array_search($key, \array_keys($array), true); |
102 | 102 | } |
103 | 103 | |
104 | - return null === $offset ? $default : (int) $offset; |
|
104 | + return null === $offset ? $default : (int)$offset; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public static function connectionFromArray(array $data, array $args = []) |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @param $typeName string name of type |
|
36 | + * @param string $typeName string name of type |
|
37 | 37 | * @param $id int local id |
38 | 38 | * |
39 | 39 | * @return string global id |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 10.05.16. |
15 | 15 | */ |
@@ -70,6 +70,9 @@ |
||
70 | 70 | return $this->directivesList; |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param DirectiveInterface $directive |
|
75 | + */ |
|
73 | 76 | private function getDirectiveName($directive) |
74 | 77 | { |
75 | 78 | if (\is_string($directive)) { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 3/24/17. |
15 | 15 | */ |
@@ -18,5 +18,8 @@ |
||
18 | 18 | |
19 | 19 | interface ConfigValidatorInterface |
20 | 20 | { |
21 | + /** |
|
22 | + * @return boolean |
|
23 | + */ |
|
21 | 24 | public function validate($data, $rules = [], $allowExtraFields = null); |
22 | 25 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 01.12.15. |
15 | 15 | */ |
@@ -21,5 +21,8 @@ |
||
21 | 21 | |
22 | 22 | interface ValidationRuleInterface |
23 | 23 | { |
24 | + /** |
|
25 | + * @return boolean |
|
26 | + */ |
|
24 | 27 | public function validate($data, $ruleInfo); |
25 | 28 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /* |
14 | 14 | * This file is a part of graphql-youshido project. |
15 | 15 | * |
@@ -18,15 +18,27 @@ |
||
18 | 18 | |
19 | 19 | interface ErrorContainerInterface |
20 | 20 | { |
21 | + /** |
|
22 | + * @return ErrorContainerTrait |
|
23 | + */ |
|
21 | 24 | public function addError(\Exception $exception); |
22 | 25 | |
26 | + /** |
|
27 | + * @return ErrorContainerTrait |
|
28 | + */ |
|
23 | 29 | public function mergeErrors(self $errorContainer); |
24 | 30 | |
31 | + /** |
|
32 | + * @return boolean |
|
33 | + */ |
|
25 | 34 | public function hasErrors(); |
26 | 35 | |
27 | 36 | public function getErrors(); |
28 | 37 | |
29 | 38 | public function getErrorsArray(); |
30 | 39 | |
40 | + /** |
|
41 | + * @return ErrorContainerTrait |
|
42 | + */ |
|
31 | 43 | public function clearErrors(); |
32 | 44 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 27.11.15. |
15 | 15 | */ |
@@ -20,5 +20,8 @@ |
||
20 | 20 | |
21 | 21 | interface RequestValidatorInterface |
22 | 22 | { |
23 | + /** |
|
24 | + * @return void |
|
25 | + */ |
|
23 | 26 | public function validate(Request $request); |
24 | 27 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 10/24/16. |
15 | 15 | */ |
@@ -25,13 +25,28 @@ |
||
25 | 25 | |
26 | 26 | interface ResolveValidatorInterface |
27 | 27 | { |
28 | + /** |
|
29 | + * @return void |
|
30 | + */ |
|
28 | 31 | public function assetTypeHasField(AbstractType $objectType, AstFieldInterface $ast); |
29 | 32 | |
33 | + /** |
|
34 | + * @return void |
|
35 | + */ |
|
30 | 36 | public function assertValidArguments(FieldInterface $field, AstFieldInterface $query, Request $request); |
31 | 37 | |
38 | + /** |
|
39 | + * @return void |
|
40 | + */ |
|
32 | 41 | public function assertValidResolvedValueForField(FieldInterface $field, $resolvedValue); |
33 | 42 | |
43 | + /** |
|
44 | + * @return void |
|
45 | + */ |
|
34 | 46 | public function assertTypeImplementsInterface(AbstractType $type, AbstractInterfaceType $interface); |
35 | 47 | |
48 | + /** |
|
49 | + * @return void |
|
50 | + */ |
|
36 | 51 | public function assertTypeInUnionTypes(AbstractType $type, AbstractUnionType $unionType); |
37 | 52 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 01.12.15. |
15 | 15 | */ |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * http://opensource.org/licenses/MIT |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | /** |
14 | 14 | * Date: 12.05.16. |
15 | 15 | */ |