| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function replaceValue($variableName, $value) |
||
| 41 | { |
||
| 42 | $variableDeclaration = $variableName.'=\''.$value.'\''; |
||
| 43 | if (null === $this->getValue($variableName)) { |
||
| 44 | $contents = $this->fileManipulator->read().PHP_EOL.$variableDeclaration; |
||
| 45 | } else { |
||
| 46 | $contents = preg_replace($this->getVariablePattern($variableName), $variableDeclaration, $this->fileManipulator->read()); |
||
| 47 | } |
||
| 48 | |||
| 49 | $this->fileManipulator->write($contents); |
||
| 50 | } |
||
| 51 | |||
| 62 |