| Total Complexity | 6 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class Comment extends Source implements ReplaceableInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | * @return self |
||
| 24 | */ |
||
| 25 | public function replace($search, $replace): Comment |
||
| 26 | { |
||
| 27 | $lines = $this->getLines(); |
||
| 28 | |||
| 29 | array_walk($lines, static function (&$line) use ($search, $replace): void { |
||
| 30 | $line = str_replace($search, $replace, $line); |
||
| 31 | }); |
||
| 32 | |||
| 33 | return $this->setLines($lines); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | public function render(int $indentLevel = 0): string |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | protected function prepareLine(string $line): ?string |
||
| 68 |