| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 42 | public function create(ArrayObject $spec) |
||
| 43 | { |
||
| 44 | $filePath = $this->config->getConfig('path') . self::MAPPER_NAME; |
||
| 45 | $configArray = new ArrayObject(); |
||
| 46 | |||
| 47 | foreach ($spec['entities'] as $entity) { |
||
| 48 | if (isset($entity['entity'])) { |
||
| 49 | $configArray[$entity['entity']] = $entity; |
||
| 50 | unset($entity['entity']); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | $writer = new PhpArray(); |
||
| 55 | $writer->setUseBracketArraySyntax(true); |
||
| 56 | $writer->toFile($filePath, $configArray); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |