Passed
Push — master ( 6ba2e7...3c485e )
by Adrien
02:48
created
tests/TypesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                         'type' => Type::nonNull($types->getOutput(Post::class)),
73 73
                         'args' => [
74 74
                             'id' => Type::nonNull(Type::id()), // Use standard API when needed
75
-                            'input' => $types->getPartialInput(Post::class),  // Use automated InputObjectType for partial input for updates
75
+                            'input' => $types->getPartialInput(Post::class), // Use automated InputObjectType for partial input for updates
76 76
                         ],
77 77
                         'resolve' => function ($root, $args): void {
78 78
                             // update existing post and flush...
Please login to merge, or discard this patch.
src/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      *
32 32
      * @param class-string $className
33 33
      */
34
-    public static function getOperatorTypeName(string $className, EnumType|ScalarType $type): string
34
+    public static function getOperatorTypeName(string $className, EnumType | ScalarType $type): string
35 35
     {
36 36
         return preg_replace('~Type$~', '', self::getTypeName($className)) . ucfirst($type->name);
37 37
     }
Please login to merge, or discard this patch.
src/Attribute/Reader/Reader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @return null|T
55 55
      */
56
-    public function getAttribute(ReflectionClass|ReflectionProperty|ReflectionMethod|ReflectionParameter $element, string $attributeName): ?ApiAttribute
56
+    public function getAttribute(ReflectionClass | ReflectionProperty | ReflectionMethod | ReflectionParameter $element, string $attributeName): ?ApiAttribute
57 57
     {
58 58
         $attributes = $this->getAttributeInstances($element, $attributeName);
59 59
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @return T[]
69 69
      */
70
-    private function getAttributeInstances(ReflectionClass|ReflectionMethod|ReflectionParameter|ReflectionProperty $element, string $attributeName): array
70
+    private function getAttributeInstances(ReflectionClass | ReflectionMethod | ReflectionParameter | ReflectionProperty $element, string $attributeName): array
71 71
     {
72 72
         if (!is_subclass_of($attributeName, ApiAttribute::class)) {
73 73
             throw new Exception(self::class . ' cannot be used for attribute than are not part of `ecodev/graphql-doctrine`.');
Please login to merge, or discard this patch.
src/Attribute/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public array $args = [];
23 23
 
24
-    public null|string|Type $type = null;
24
+    public null | string | Type $type = null;
25 25
 
26 26
     /**
27 27
      * @param null|string $name Can be used to alias the field
Please login to merge, or discard this patch.
src/Factory/AbstractFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      *  - `MyType[]|null`
52 52
      *  - `Collection<int, MyType>`
53 53
      */
54
-    final protected function getTypeFromPhpDeclaration(ReflectionClass $class, null|string|Type $typeDeclaration, bool $isEntityId = false): ?Type
54
+    final protected function getTypeFromPhpDeclaration(ReflectionClass $class, null | string | Type $typeDeclaration, bool $isEntityId = false): ?Type
55 55
     {
56 56
         if ($typeDeclaration === null || $typeDeclaration instanceof Type) {
57 57
             return $typeDeclaration;
Please login to merge, or discard this patch.
tests/DefaultFieldResolverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 final class DefaultFieldResolverTest extends TestCase
23 23
 {
24 24
     #[DataProvider('providerDefaultFieldResolver')]
25
-    public function testDefaultFieldResolver(mixed $expected, array|object $source, string $fieldName, array $args = []): void
25
+    public function testDefaultFieldResolver(mixed $expected, array | object $source, string $fieldName, array $args = []): void
26 26
     {
27 27
         $resolver = new DefaultFieldResolver();
28 28
         $fieldDefinition = new FieldDefinition(['name' => $fieldName, 'type' => Type::boolean()]);
Please login to merge, or discard this patch.
tests/DocBlockReaderTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */';
37 37
 
38 38
     #[DataProvider('providerGetMethodDescription')]
39
-    public function testGetMethodDescription(string|false $comment, ?string $expected): void
39
+    public function testGetMethodDescription(string | false $comment, ?string $expected): void
40 40
     {
41 41
         $reader = $this->create($comment);
42 42
         $actual = $reader->getMethodDescription();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     }
57 57
 
58 58
     #[DataProvider('providerGetParameterDescription')]
59
-    public function testGetParameterDescription(string|false $comment, string $parameterName, ?string $expected): void
59
+    public function testGetParameterDescription(string | false $comment, string $parameterName, ?string $expected): void
60 60
     {
61 61
         $reader = $this->create($comment);
62 62
         $parameter = $this->createParameter($parameterName);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     #[DataProvider('providerGetParameterType')]
79
-    public function testGetParameterType(string|false $comment, string $parameterName, ?string $expected): void
79
+    public function testGetParameterType(string | false $comment, string $parameterName, ?string $expected): void
80 80
     {
81 81
         $reader = $this->create($comment);
82 82
         $parameter = $this->createParameter($parameterName);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     #[DataProvider('providerGetReturnType')]
101
-    public function testGetReturnType(string|false $comment, ?string $expected): void
101
+    public function testGetReturnType(string | false $comment, ?string $expected): void
102 102
     {
103 103
         $reader = $this->create($comment);
104 104
         $actual = $reader->getReturnType();
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
         ];
116 116
     }
117 117
 
118
-    private function create(string|false $comment): DocBlockReader
118
+    private function create(string | false $comment): DocBlockReader
119 119
     {
120 120
         $method = new class($comment) extends ReflectionMethod {
121 121
             public function __construct(
122
-                private readonly string|false $comment,
122
+                private readonly string | false $comment,
123 123
             ) {}
124 124
 
125
-            public function getDocComment(): string|false
125
+            public function getDocComment(): string | false
126 126
             {
127 127
                 return $this->comment;
128 128
             }
Please login to merge, or discard this patch.