Passed
Pull Request — main (#112)
by Tom
03:03
created
src/Services.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * This is the shared TypeManger for all Drivers
20 20
      */
21
-    private static Type\TypeManager|null $typeManagerShared = null;
21
+    private static Type\TypeManager | null $typeManagerShared = null;
22 22
 
23 23
     /**
24 24
      * @param string                 $entityManagerAlias required
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function __construct(
29 29
         EntityManager $entityManager,
30
-        Config|null $config = null,
31
-        array|null $metadataConfig = null,
30
+        Config | null $config = null,
31
+        array | null $metadataConfig = null,
32 32
     ) {
33
-        if (! $config) {
33
+        if (!$config) {
34 34
             $config = new Config();
35 35
         }
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             ->set(EntityManager::class, $entityManager)
40 40
             ->set(
41 41
                 Config::class,
42
-                static function () use ($config) {
42
+                static function() use ($config) {
43 43
                     return $config;
44 44
                 },
45 45
             )
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
             )
50 50
             ->set(
51 51
                 Type\TypeManager::class,
52
-                static function (ContainerInterface $container) {
53
-                    if (! $container->get(Config::class)->getSharedTypeManager()) {
52
+                static function(ContainerInterface $container) {
53
+                    if (!$container->get(Config::class)->getSharedTypeManager()) {
54 54
                         return new Type\TypeManager();
55 55
                     }
56 56
 
57
-                    if (! self::$typeManagerShared) {
57
+                    if (!self::$typeManagerShared) {
58 58
                         self::$typeManagerShared = new Type\TypeManager();
59 59
                     }
60 60
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
             )
64 64
             ->set(
65 65
                 Metadata\Metadata::class,
66
-                static function (ContainerInterface $container) use ($metadataConfig) {
66
+                static function(ContainerInterface $container) use ($metadataConfig) {
67 67
                     return (new Metadata\MetadataFactory($container, $metadataConfig))->getMetadata();
68 68
                 },
69 69
             )
70 70
             ->set(
71 71
                 Resolve\FieldResolver::class,
72
-                static function (ContainerInterface $container) {
72
+                static function(ContainerInterface $container) {
73 73
                     return new Resolve\FieldResolver(
74 74
                         $container->get(Config::class),
75 75
                         $container->get(Metadata\Metadata::class),
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             )
79 79
             ->set(
80 80
                 Resolve\ResolveCollectionFactory::class,
81
-                static function (ContainerInterface $container) {
81
+                static function(ContainerInterface $container) {
82 82
                     return new Resolve\ResolveCollectionFactory(
83 83
                         $container->get(EntityManager::class),
84 84
                         $container->get(Config::class),
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             )
90 90
             ->set(
91 91
                 Resolve\ResolveEntityFactory::class,
92
-                static function (ContainerInterface $container) {
92
+                static function(ContainerInterface $container) {
93 93
                     return new Resolve\ResolveEntityFactory(
94 94
                         $container->get(Config::class),
95 95
                         $container->get(EntityManager::class),
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             )
100 100
             ->set(
101 101
                 Criteria\CriteriaFactory::class,
102
-                static function (ContainerInterface $container) {
102
+                static function(ContainerInterface $container) {
103 103
                     return new Criteria\CriteriaFactory(
104 104
                         $container->get(Config::class),
105 105
                         $container->get(EntityManager::class),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             )
111 111
             ->set(
112 112
                 Hydrator\HydratorFactory::class,
113
-                static function (ContainerInterface $container) {
113
+                static function(ContainerInterface $container) {
114 114
                     return new Hydrator\HydratorFactory(
115 115
                         $container->get(EntityManager::class),
116 116
                         $container->get(Metadata\Metadata::class),
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             )
120 120
             ->set(
121 121
                 Input\InputFactory::class,
122
-                static function (ContainerInterface $container) {
122
+                static function(ContainerInterface $container) {
123 123
                     return new Input\InputFactory(
124 124
                         $container->get(Config::class),
125 125
                         $container->get(EntityManager::class),
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 },
130 130
             );
131 131
 
132
-        if (! $this->get(Config::class)->getGlobalEnable()) {
132
+        if (!$this->get(Config::class)->getGlobalEnable()) {
133 133
             return;
134 134
         }
135 135
 
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      *                  Be warned, using the same groupSuffix with two different
25 25
      *                  groups can cause collisions.
26 26
      */
27
-    protected string|null $groupSuffix = null;
27
+    protected string | null $groupSuffix = null;
28 28
 
29 29
     /**
30 30
      * @var bool When set to true hydrator results will be cached for the
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
      *           all hydrators will extract by reference.  This overrides
53 53
      *           per-entity attribute configuration.
54 54
      */
55
-    protected bool|null $globalByValue = null;
55
+    protected bool | null $globalByValue = null;
56 56
 
57 57
     /**
58 58
      * @var string|null When set, the entityPrefix will be removed from each
59 59
      *                  type name.  This simplifies type names and makes reading
60 60
      *                  the GraphQL documentation easier.
61 61
      */
62
-    protected string|null $entityPrefix = null;
62
+    protected string | null $entityPrefix = null;
63 63
 
64 64
     /**
65 65
      * @var bool When set to false the driver will have a unique instance of the
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
         return $this->group;
96 96
     }
97 97
 
98
-    protected function setGroupSuffix(string|null $groupSuffix): self
98
+    protected function setGroupSuffix(string | null $groupSuffix): self
99 99
     {
100 100
         $this->groupSuffix = $groupSuffix;
101 101
 
102 102
         return $this;
103 103
     }
104 104
 
105
-    public function getGroupSuffix(): string|null
105
+    public function getGroupSuffix(): string | null
106 106
     {
107 107
         return $this->groupSuffix;
108 108
     }
@@ -157,26 +157,26 @@  discard block
 block discarded – undo
157 157
         return $this->globalIgnore;
158 158
     }
159 159
 
160
-    protected function setGlobalByValue(bool|null $globalByValue): self
160
+    protected function setGlobalByValue(bool | null $globalByValue): self
161 161
     {
162 162
         $this->globalByValue = $globalByValue;
163 163
 
164 164
         return $this;
165 165
     }
166 166
 
167
-    public function getGlobalByValue(): bool|null
167
+    public function getGlobalByValue(): bool | null
168 168
     {
169 169
         return $this->globalByValue;
170 170
     }
171 171
 
172
-    protected function setEntityPrefix(string|null $entityPrefix): self
172
+    protected function setEntityPrefix(string | null $entityPrefix): self
173 173
     {
174 174
         $this->entityPrefix = $entityPrefix;
175 175
 
176 176
         return $this;
177 177
     }
178 178
 
179
-    public function getEntityPrefix(): string|null
179
+    public function getEntityPrefix(): string | null
180 180
     {
181 181
         return $this->entityPrefix;
182 182
     }
Please login to merge, or discard this patch.