Completed
Push — master ( aff65e...3aac06 )
by Adrien
01:56
created
src/Annotation/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine\Annotation;
6 6
 
Please login to merge, or discard this patch.
src/Types.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
Please login to merge, or discard this patch.
src/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
Please login to merge, or discard this patch.
src/Annotation/Argument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine\Annotation;
6 6
 
Please login to merge, or discard this patch.
src/Annotation/Exclude.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine\Annotation;
6 6
 
Please login to merge, or discard this patch.
src/DocBlockReader.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param ReflectionMethod $method
29 29
      * @return string|null
30 30
      */
31
-    public function getMethodDescription(): ?string
31
+    public function getMethodDescription(): ? string
32 32
     {
33 33
         // Remove the comment markers
34 34
         $description = preg_replace('~^\s*(/\*\*|\* ?|\*/)~m', '', $this->comment);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param ReflectionParameter $param
48 48
      * @return string|null
49 49
      */
50
-    public function getParameterDescription(ReflectionParameter $param): ?string
50
+    public function getParameterDescription(ReflectionParameter $param): ? string
51 51
     {
52 52
         $name = preg_quote($param->getName());
53 53
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @param ReflectionParameter $param
64 64
      * @return string|null
65 65
      */
66
-    public function getParameterType(ReflectionParameter $param): ?string
66
+    public function getParameterType(ReflectionParameter $param): ? string
67 67
     {
68 68
         $name = preg_quote($param->getName());
69 69
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         return null;
75 75
     }
76 76
 
77
-    public function getReturnType(): ?string
77
+    public function getReturnType(): ? string
78 78
     {
79 79
         if (preg_match('~@return\h+(\H+)(\h|\n)~', $this->comment, $m)) {
80 80
             return trim($m[1]);
Please login to merge, or discard this patch.
src/DefaultFieldResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param string $fieldName
38 38
      * @return mixed
39 39
      */
40
-    private function resolveObject($source, ?array $args, string $fieldName)
40
+    private function resolveObject($source, ? array $args, string $fieldName)
41 41
     {
42 42
         $getter = $this->getGetter($source, $fieldName);
43 43
         if ($getter) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $name
69 69
      * @return string
70 70
      */
71
-    private function getGetter($source, string $name): ?ReflectionMethod
71
+    private function getGetter($source, string $name): ? ReflectionMethod
72 72
     {
73 73
         if (!preg_match('~^(is|has)[A-Z]~', $name)) {
74 74
             $name = 'get' . ucfirst($name);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * @param array $args
92 92
      * @return array
93 93
      */
94
-    private function orderArguments(ReflectionMethod $method, ?array $args): array
94
+    private function orderArguments(ReflectionMethod $method, ? array $args) : array
95 95
     {
96 96
         $result = [];
97 97
         foreach ($method->getParameters() as $param) {
Please login to merge, or discard this patch.
src/FieldsConfigurationFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @param string|null $typeDeclaration
148 148
      * @return Type|null
149 149
      */
150
-    private function phpDeclarationToInstance(ReflectionMethod $method, ?string $typeDeclaration, bool $isInputType = false): ?Type
150
+    private function phpDeclarationToInstance(ReflectionMethod $method, ? string $typeDeclaration, bool $isInputType = false) : ? Type
151 151
     {
152 152
         if (!$typeDeclaration) {
153 153
             return null;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @throws Exception
243 243
      * @return Type|null
244 244
      */
245
-    private function getTypeFromTypeHint(ReflectionMethod $method, string $fieldName): ?Type
245
+    private function getTypeFromTypeHint(ReflectionMethod $method, string $fieldName): ? Type
246 246
     {
247 247
         $returnType = $method->getReturnType();
248 248
         if (!$returnType) {
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
      * @param \GraphQL\Doctrine\DocBlockReader $docBlock
384 384
      * @return Type|null
385 385
      */
386
-    private function getTypeFromDocBock(ReflectionMethod $method, DocBlockReader $docBlock): ?Type
386
+    private function getTypeFromDocBock(ReflectionMethod $method, DocBlockReader $docBlock): ? Type
387 387
     {
388 388
         $typeDeclaration = $docBlock->getReturnType();
389 389
         $blacklist = [
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      * @param string|null $type
405 405
      * @throws Exception
406 406
      */
407
-    private function throwIfArray(ReflectionParameter $param, ?string $type)
407
+    private function throwIfArray(ReflectionParameter $param, ? string $type)
408 408
     {
409 409
         if ($type === 'array') {
410 410
             throw new Exception('The parameter `$' . $param->getName() . '` on method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' is type hinted as `array` and is not overriden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.');
Please login to merge, or discard this patch.
src/ObjectTypeFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace GraphQL\Doctrine;
6 6
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $typeName = Utils::getTypeName($className);
43 43
         $description = $this->getDescription($class);
44 44
 
45
-        $fieldGetter = function () use ($className): array {
45
+        $fieldGetter = function() use ($className): array {
46 46
             $factory = new FieldsConfigurationFactory($this->types, $this->entityManager);
47 47
             $configuration = $factory->create($className);
48 48
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param ReflectionClass $class
62 62
      * @return string|null
63 63
      */
64
-    private function getDescription(ReflectionClass $class): ?string
64
+    private function getDescription(ReflectionClass $class): ? string
65 65
     {
66 66
         $comment = $class->getDocComment();
67 67
 
Please login to merge, or discard this patch.