@@ -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 |