Passed
Push — master ( f3dfd7...3731bd )
by Anton
02:12
created
src/Bootloader/Cycle/SchemaBootloader.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
     public function getGenerators(): array
86 86
     {
87 87
         $result = [];
88
-        foreach ($this->generators as $group) {
89
-            foreach ($group as $generator) {
90
-                if (is_object($generator) && !$generator instanceof Container\Autowire) {
88
+        foreach ($this->generators as $group){
89
+            foreach ($group as $generator){
90
+                if (is_object($generator) && !$generator instanceof Container\Autowire){
91 91
                     $result[] = $generator;
92
-                } else {
92
+                }else{
93 93
                     $result[] = $this->container->get($generator);
94 94
                 }
95 95
             }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     protected function schema(MemoryInterface $memory): SchemaInterface
106 106
     {
107 107
         $schema = $memory->loadData('cycle');
108
-        if (is_null($schema)) {
108
+        if (is_null($schema)){
109 109
             $schema = (new Compiler())->compile(
110 110
                 $this->container->get(Registry::class),
111 111
                 $this->getGenerators()
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,11 +85,16 @@  discard block
 block discarded – undo
85 85
     public function getGenerators(): array
86 86
     {
87 87
         $result = [];
88
-        foreach ($this->generators as $group) {
89
-            foreach ($group as $generator) {
90
-                if (is_object($generator) && !$generator instanceof Container\Autowire) {
88
+        foreach ($this->generators as $group)
89
+        {
90
+            foreach ($group as $generator)
91
+            {
92
+                if (is_object($generator) && !$generator instanceof Container\Autowire)
93
+                {
91 94
                     $result[] = $generator;
92
-                } else {
95
+                }
96
+                else
97
+                {
93 98
                     $result[] = $this->container->get($generator);
94 99
                 }
95 100
             }
@@ -105,7 +110,8 @@  discard block
 block discarded – undo
105 110
     protected function schema(MemoryInterface $memory): SchemaInterface
106 111
     {
107 112
         $schema = $memory->loadData('cycle');
108
-        if (is_null($schema)) {
113
+        if (is_null($schema))
114
+        {
109 115
             $schema = (new Compiler())->compile(
110 116
                 $this->container->get(Registry::class),
111 117
                 $this->getGenerators()
Please login to merge, or discard this patch.
src/Bootloader/Cycle/CycleBootloader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function boot(Container $container, FinalizerInterface $finalizer): void
53 53
     {
54 54
         $finalizer->addFinalizer(function () use ($container): void {
55
-            if ($container->hasInstance(ORMInterface::class)) {
55
+            if ($container->hasInstance(ORMInterface::class)){
56 56
                 $container->get(ORMInterface::class)->getHeap()->clean();
57 57
             }
58 58
         });
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     ): ORMInterface {
74 74
         $orm = new ORM($factory, $schema);
75 75
 
76
-        if ($promiseFactory !== null) {
76
+        if ($promiseFactory !== null){
77 77
             return $orm->withPromiseFactory($promiseFactory);
78 78
         }
79 79
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,8 @@  discard block
 block discarded – undo
52 52
     public function boot(Container $container, FinalizerInterface $finalizer): void
53 53
     {
54 54
         $finalizer->addFinalizer(function () use ($container): void {
55
-            if ($container->hasInstance(ORMInterface::class)) {
55
+            if ($container->hasInstance(ORMInterface::class))
56
+            {
56 57
                 $container->get(ORMInterface::class)->getHeap()->clean();
57 58
             }
58 59
         });
@@ -73,7 +74,8 @@  discard block
 block discarded – undo
73 74
     ): ORMInterface {
74 75
         $orm = new ORM($factory, $schema);
75 76
 
76
-        if ($promiseFactory !== null) {
77
+        if ($promiseFactory !== null)
78
+        {
77 79
             return $orm->withPromiseFactory($promiseFactory);
78 80
         }
79 81
 
Please login to merge, or discard this patch.
src/Cycle/RepositoryInjector.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
     public function createInjection(\ReflectionClass $class, string $context = null)
39 39
     {
40 40
         $schema = $this->orm->getSchema();
41
-        foreach ($schema->getRoles() as $role) {
41
+        foreach ($schema->getRoles() as $role){
42 42
             $repository = $schema->define($role, Schema::REPOSITORY);
43
-            if ($repository !== Select\Repository::class && $repository === $class->getName()) {
43
+            if ($repository !== Select\Repository::class && $repository === $class->getName()){
44 44
                 return $this->orm->getRepository($role);
45 45
             }
46 46
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,11 @@
 block discarded – undo
38 38
     public function createInjection(\ReflectionClass $class, string $context = null)
39 39
     {
40 40
         $schema = $this->orm->getSchema();
41
-        foreach ($schema->getRoles() as $role) {
41
+        foreach ($schema->getRoles() as $role)
42
+        {
42 43
             $repository = $schema->define($role, Schema::REPOSITORY);
43
-            if ($repository !== Select\Repository::class && $repository === $class->getName()) {
44
+            if ($repository !== Select\Repository::class && $repository === $class->getName())
45
+            {
44 46
                 return $this->orm->getRepository($role);
45 47
             }
46 48
         }
Please login to merge, or discard this patch.