Passed
Pull Request — main (#133)
by Tom
03:39
created
src/Type/Entity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->metadata          = $container->get(Metadata::class);
62 62
         $this->typeManager       = $container->get(TypeManager::class);
63 63
 
64
-        if (! isset(($this->metadata)()[$typeName])) {
64
+        if (!isset(($this->metadata)()[$typeName])) {
65 65
             throw new Error(
66 66
                 'Entity ' . $typeName . ' is not mapped in the metadata',
67 67
             );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         return $this->metadataConfig['typeName'];
86 86
     }
87 87
 
88
-    public function getDescription(): string|null
88
+    public function getDescription(): string | null
89 89
     {
90 90
         return $this->metadataConfig['description'];
91 91
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass());
145 145
 
146 146
         foreach ($classMetadata->getFieldNames() as $fieldName) {
147
-            if (! in_array($fieldName, array_keys($this->metadataConfig['fields']))) {
147
+            if (!in_array($fieldName, array_keys($this->metadataConfig['fields']))) {
148 148
                 continue;
149 149
             }
150 150
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass());
163 163
 
164 164
         foreach ($classMetadata->getAssociationNames() as $associationName) {
165
-            if (! in_array($associationName, array_keys($this->metadataConfig['fields']))) {
165
+            if (!in_array($associationName, array_keys($this->metadataConfig['fields']))) {
166 166
                 continue;
167 167
             }
168 168
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 case ClassMetadataInfo::MANY_TO_ONE:
174 174
                 case ClassMetadataInfo::TO_ONE:
175 175
                     $targetEntity             = $associationMetadata['targetEntity'];
176
-                    $fields[$associationName] = function () use ($targetEntity) {
176
+                    $fields[$associationName] = function() use ($targetEntity) {
177 177
                         $entity = $this->typeManager->build(self::class, $targetEntity);
178 178
 
179 179
                         return [
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 case ClassMetadataInfo::MANY_TO_MANY:
187 187
                 case ClassMetadataInfo::TO_MANY:
188 188
                     $targetEntity             = $associationMetadata['targetEntity'];
189
-                    $fields[$associationName] = function () use ($targetEntity, $associationName) {
189
+                    $fields[$associationName] = function() use ($targetEntity, $associationName) {
190 190
                         $entity    = $this->typeManager->build(self::class, $targetEntity);
191 191
                         $shortName = $this->getTypeName() . '_' . $associationName;
192 192
 
Please login to merge, or discard this patch.
src/Resolve/Services.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct(
24 24
         EntityManager $entityManager,
25
-        Config|null $config = null,
26
-        array|null $metadataConfig = null,
25
+        Config | null $config = null,
26
+        array | null $metadataConfig = null,
27 27
     ) {
28 28
         $this
29 29
             // Plain classes
30 30
             ->set(EntityManager::class, $entityManager)
31 31
             ->set(
32 32
                 Config::class,
33
-                static function () use ($config) {
34
-                    if (! $config) {
33
+                static function() use ($config) {
34
+                    if (!$config) {
35 35
                         $config = new Config();
36 36
                     }
37 37
 
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
             )
49 49
             ->set(
50 50
                 Metadata\Metadata::class,
51
-                static function (ContainerInterface $container) use ($metadataConfig) {
51
+                static function(ContainerInterface $container) use ($metadataConfig) {
52 52
                     return (new Metadata\MetadataFactory($container, $metadataConfig))->getMetadata();
53 53
                 },
54 54
             )
55 55
             ->set(
56 56
                 Metadata\GlobalEnable::class,
57
-                static function (ContainerInterface $container) {
57
+                static function(ContainerInterface $container) {
58 58
                     return new Metadata\GlobalEnable(
59 59
                         $container->get(EntityManager::class),
60 60
                         $container->get(Config::class),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             )
64 64
             ->set(
65 65
                 Resolve\FieldResolver::class,
66
-                static function (ContainerInterface $container) {
66
+                static function(ContainerInterface $container) {
67 67
                     return new Resolve\FieldResolver(
68 68
                         $container->get(Config::class),
69 69
                         $container->get(Type\TypeManager::class),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             )
73 73
             ->set(
74 74
                 Resolve\ResolveCollectionFactory::class,
75
-                static function (ContainerInterface $container) {
75
+                static function(ContainerInterface $container) {
76 76
                     return new Resolve\ResolveCollectionFactory(
77 77
                         $container->get(EntityManager::class),
78 78
                         $container->get(Config::class),
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             )
86 86
             ->set(
87 87
                 Resolve\ResolveEntityFactory::class,
88
-                static function (ContainerInterface $container) {
88
+                static function(ContainerInterface $container) {
89 89
                     return new Resolve\ResolveEntityFactory(
90 90
                         $container->get(Config::class),
91 91
                         $container->get(EntityManager::class),
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             )
96 96
             ->set(
97 97
                 Criteria\CriteriaFactory::class,
98
-                static function (ContainerInterface $container) {
98
+                static function(ContainerInterface $container) {
99 99
                     return new Criteria\CriteriaFactory(
100 100
                         $container->get(Config::class),
101 101
                         $container->get(EntityManager::class),
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             )
107 107
             ->set(
108 108
                 Hydrator\HydratorFactory::class,
109
-                static function (ContainerInterface $container) {
109
+                static function(ContainerInterface $container) {
110 110
                     return new Hydrator\HydratorFactory(
111 111
                         $container->get(EntityManager::class),
112 112
                         $container->get(Type\TypeManager::class),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             )
116 116
             ->set(
117 117
                 Input\InputFactory::class,
118
-                static function (ContainerInterface $container) {
118
+                static function(ContainerInterface $container) {
119 119
                     return new Input\InputFactory(
120 120
                         $container->get(Config::class),
121 121
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.