@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $resultSet = $statement->execute(); |
| 92 | 92 | $this->data[$context] = []; |
| 93 | 93 | foreach ($resultSet as $result) { |
| 94 | - $this->data[$context][$result['path']] = $result['value']; |
|
| 94 | + $this->data[$context][$result['path']] = $result['value']; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $table->addColumn(new Text('value')); |
| 128 | 128 | $table->addColumn(new Varchar('context', 255)); |
| 129 | 129 | $table->addConstraint( |
| 130 | - new UniqueKey(['path','context'], 'configuration_uniqueness_index') |
|
| 130 | + new UniqueKey(['path', 'context'], 'configuration_uniqueness_index') |
|
| 131 | 131 | ); |
| 132 | 132 | |
| 133 | 133 | $sql = new Sql($this->adapter); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | |
| 8 | 8 | public function toXml() |
| 9 | 9 | { |
| 10 | - $file = $this->getFile(); |
|
| 10 | + $file = $this->getFile(); |
|
| 11 | 11 | $results = include $file; |
| 12 | 12 | $config = new \SimpleXMLElement('<configuration />'); |
| 13 | 13 | foreach ($results as $section => $sectionData) { |
@@ -49,6 +49,9 @@ discard block |
||
| 49 | 49 | return $possibleLocations; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string|null $file |
|
| 54 | + */ |
|
| 52 | 55 | protected function writeMagiumConfigurationFile($file) |
| 53 | 56 | { |
| 54 | 57 | file_put_contents($file, <<<XML |
@@ -70,6 +73,9 @@ discard block |
||
| 70 | 73 | ); |
| 71 | 74 | } |
| 72 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string|null $configPath |
|
| 78 | + */ |
|
| 73 | 79 | protected function getContextFileFromConfigPath($configPath) |
| 74 | 80 | { |
| 75 | 81 | $basePath = dirname($configPath); |
@@ -77,6 +83,9 @@ discard block |
||
| 77 | 83 | return $contextPath; |
| 78 | 84 | } |
| 79 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $contextPath |
|
| 88 | + */ |
|
| 80 | 89 | protected function writeContextFileXml($contextPath) |
| 81 | 90 | { |
| 82 | 91 | file_put_contents($contextPath, <<<XML |
@@ -120,6 +129,9 @@ discard block |
||
| 120 | 129 | } |
| 121 | 130 | |
| 122 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $contextPath |
|
| 134 | + */ |
|
| 123 | 135 | protected function askContextFileQuestion(InputInterface $input, OutputInterface $output, $contextPath) |
| 124 | 136 | { |
| 125 | 137 | $question = new ConfirmationQuestion(sprintf('The context file %s does not exist next to the magium-configuration.xml file. Create it? ', $contextPath)); |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | return $cacheFactory->getCache($element); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @return Builder |
|
| 73 | + */ |
|
| 71 | 74 | public function getBuilder() |
| 72 | 75 | { |
| 73 | 76 | if (!$this->builder instanceof Builder) { |