| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function hide(&$docBlock) |
||
| 29 | { |
||
| 30 | $matches = []; |
||
| 31 | preg_match_all('~(```.*?```)~ms', $docBlock, $matches); |
||
| 32 | if (empty($matches[0])) |
||
| 33 | { |
||
| 34 | return; |
||
| 35 | } |
||
| 36 | $i = 0; |
||
| 37 | |||
| 38 | // Collect matches |
||
| 39 | foreach ($matches[0] as $match) |
||
| 40 | { |
||
| 41 | $key = sprintf('~%s@%s~', __CLASS__, $i++); |
||
| 42 | $this->fences[$key] = $match; |
||
| 43 | } |
||
| 44 | |||
| 45 | $docBlock = str_replace(array_values($this->fences), array_keys($this->fences), $docBlock); |
||
| 46 | } |
||
| 47 | |||
| 58 |