@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | public function getGenerators(): array |
89 | 89 | { |
90 | 90 | $result = []; |
91 | - foreach ($this->generators as $group) { |
|
92 | - foreach ($group as $generator) { |
|
93 | - if (is_object($generator) && !$generator instanceof Container\Autowire) { |
|
91 | + foreach ($this->generators as $group){ |
|
92 | + foreach ($group as $generator){ |
|
93 | + if (is_object($generator) && !$generator instanceof Container\Autowire){ |
|
94 | 94 | $result[] = $generator; |
95 | - } else { |
|
95 | + }else{ |
|
96 | 96 | $result[] = $this->container->get($generator); |
97 | 97 | } |
98 | 98 | } |
@@ -110,20 +110,20 @@ discard block |
||
110 | 110 | protected function schema(MemoryInterface $memory): SchemaInterface |
111 | 111 | { |
112 | 112 | $schema = $memory->loadData('cycle'); |
113 | - if (empty($schema)) { |
|
113 | + if (empty($schema)){ |
|
114 | 114 | $schema = (new Compiler())->compile( |
115 | 115 | $this->container->get(Registry::class), |
116 | 116 | $this->getGenerators() |
117 | 117 | ); |
118 | 118 | |
119 | - if (empty($schema)) { |
|
119 | + if (empty($schema)){ |
|
120 | 120 | $schema = self::EMPTY_SCHEMA; |
121 | 121 | } |
122 | 122 | |
123 | 123 | $memory->saveData('cycle', $schema); |
124 | 124 | } |
125 | 125 | |
126 | - if ($schema === self::EMPTY_SCHEMA) { |
|
126 | + if ($schema === self::EMPTY_SCHEMA){ |
|
127 | 127 | $schema = []; |
128 | 128 | } |
129 | 129 |
@@ -88,11 +88,16 @@ discard block |
||
88 | 88 | public function getGenerators(): array |
89 | 89 | { |
90 | 90 | $result = []; |
91 | - foreach ($this->generators as $group) { |
|
92 | - foreach ($group as $generator) { |
|
93 | - if (is_object($generator) && !$generator instanceof Container\Autowire) { |
|
91 | + foreach ($this->generators as $group) |
|
92 | + { |
|
93 | + foreach ($group as $generator) |
|
94 | + { |
|
95 | + if (is_object($generator) && !$generator instanceof Container\Autowire) |
|
96 | + { |
|
94 | 97 | $result[] = $generator; |
95 | - } else { |
|
98 | + } |
|
99 | + else |
|
100 | + { |
|
96 | 101 | $result[] = $this->container->get($generator); |
97 | 102 | } |
98 | 103 | } |
@@ -110,20 +115,23 @@ discard block |
||
110 | 115 | protected function schema(MemoryInterface $memory): SchemaInterface |
111 | 116 | { |
112 | 117 | $schema = $memory->loadData('cycle'); |
113 | - if (empty($schema)) { |
|
118 | + if (empty($schema)) |
|
119 | + { |
|
114 | 120 | $schema = (new Compiler())->compile( |
115 | 121 | $this->container->get(Registry::class), |
116 | 122 | $this->getGenerators() |
117 | 123 | ); |
118 | 124 | |
119 | - if (empty($schema)) { |
|
125 | + if (empty($schema)) |
|
126 | + { |
|
120 | 127 | $schema = self::EMPTY_SCHEMA; |
121 | 128 | } |
122 | 129 | |
123 | 130 | $memory->saveData('cycle', $schema); |
124 | 131 | } |
125 | 132 | |
126 | - if ($schema === self::EMPTY_SCHEMA) { |
|
133 | + if ($schema === self::EMPTY_SCHEMA) |
|
134 | + { |
|
127 | 135 | $schema = []; |
128 | 136 | } |
129 | 137 |
@@ -62,10 +62,10 @@ |
||
62 | 62 | { |
63 | 63 | $app = TestApp::init( |
64 | 64 | [ |
65 | - 'root' => __DIR__ . '/../../..', |
|
66 | - 'app' => __DIR__ . '/../../emptyApp', |
|
67 | - 'runtime' => sys_get_temp_dir() . '/spiral', |
|
68 | - 'cache' => sys_get_temp_dir() . '/spiral', |
|
65 | + 'root' => __DIR__.'/../../..', |
|
66 | + 'app' => __DIR__.'/../../emptyApp', |
|
67 | + 'runtime' => sys_get_temp_dir().'/spiral', |
|
68 | + 'cache' => sys_get_temp_dir().'/spiral', |
|
69 | 69 | ], |
70 | 70 | new Environment(['SAFE_MIGRATIONS' => true]), |
71 | 71 | false |