Passed
Pull Request — master (#641)
by Maxim
06:27
created
src/Prototype/src/Bootloader/PrototypeBootloader.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
     public function initAnnotations(ContainerInterface $container, bool $reset = false): void
125 125
     {
126 126
         $prototyped = $this->memory->loadData('prototyped');
127
-        if (!$reset && $prototyped !== null) {
128
-            foreach ($prototyped as $property => $class) {
127
+        if (!$reset && $prototyped !== null){
128
+            foreach ($prototyped as $property => $class){
129 129
                 $this->bindProperty($property, $class);
130 130
             }
131 131
 
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
         $reader = $container->get(ReaderInterface::class);
138 138
 
139 139
         $prototyped = [];
140
-        foreach ($locator->getClasses() as $class) {
140
+        foreach ($locator->getClasses() as $class){
141 141
             $meta = $reader->firstClassMetadata($class, Prototyped::class);
142 142
 
143
-            if ($meta === null) {
143
+            if ($meta === null){
144 144
                 continue;
145 145
             }
146 146
 
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function initCycle(ContainerInterface $container): void
158 158
     {
159
-        if (!$container->has(ORM\SchemaInterface::class)) {
159
+        if (!$container->has(ORM\SchemaInterface::class)){
160 160
             return;
161 161
         }
162 162
 
163 163
         /** @var ORM\SchemaInterface|null $schema */
164 164
         $schema = $container->get(ORM\SchemaInterface::class);
165
-        if ($schema === null) {
165
+        if ($schema === null){
166 166
             return;
167 167
         }
168 168
 
169
-        foreach ($schema->getRoles() as $role) {
169
+        foreach ($schema->getRoles() as $role){
170 170
             $repository = $schema->define($role, ORM\SchemaInterface::REPOSITORY);
171
-            if ($repository === ORM\Select\Repository::class || $repository === null) {
171
+            if ($repository === ORM\Select\Repository::class || $repository === null){
172 172
                 // default repository can not be wired
173 173
                 continue;
174 174
             }
@@ -179,23 +179,23 @@  discard block
 block discarded – undo
179 179
 
180 180
     private function initDefaults(ContainerInterface $container): void
181 181
     {
182
-        foreach (self::DEFAULT_SHORTCUTS as $property => $shortcut) {
183
-            if (is_array($shortcut) && isset($shortcut['resolve'])) {
184
-                if (isset($shortcut['with'])) {
182
+        foreach (self::DEFAULT_SHORTCUTS as $property => $shortcut){
183
+            if (is_array($shortcut) && isset($shortcut['resolve'])){
184
+                if (isset($shortcut['with'])){
185 185
                     // check dependencies
186
-                    foreach ($shortcut['with'] as $dep) {
187
-                        if (!class_exists($dep, true) && !interface_exists($dep, true)) {
186
+                    foreach ($shortcut['with'] as $dep){
187
+                        if (!class_exists($dep, true) && !interface_exists($dep, true)){
188 188
                             continue 2;
189 189
                         }
190 190
                     }
191 191
                 }
192 192
 
193
-                try {
193
+                try{
194 194
                     $target = $container->get($shortcut['resolve']);
195
-                    if (is_object($target)) {
195
+                    if (is_object($target)){
196 196
                         $this->bindProperty($property, get_class($target));
197 197
                     }
198
-                } catch (ContainerExceptionInterface $e) {
198
+                }catch (ContainerExceptionInterface $e){
199 199
                     continue;
200 200
                 }
201 201
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 is_string($shortcut)
207 207
                 && (class_exists($shortcut, true)
208 208
                     || interface_exists($shortcut, true))
209
-            ) {
209
+            ){
210 210
                 $this->bindProperty($property, $shortcut);
211 211
             }
212 212
         }
Please login to merge, or discard this patch.