| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1.027 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | 4 | protected function initPreprocessors(): void |
|
| 13 | { |
||
| 14 | 8 | $this->setPreprocessor('og:title', function ($value) { |
|
| 15 | 3 | return htmlspecialchars(strip_tags(implode(' | ', array_reverse($value)))); |
|
| 16 | 12 | }); |
|
| 17 | 8 | $this->setPreprocessor('og:description', function ($value) { |
|
| 18 | 3 | return htmlspecialchars(strip_tags(implode(' ', $value))); |
|
| 19 | 12 | }); |
|
| 20 | $this->setPreprocessor('og:url', function ($value) { |
||
| 21 | return array_map(function ($val) { |
||
| 22 | return htmlspecialchars(strip_tags($val)); |
||
| 23 | }, $value); |
||
| 24 | 4 | }); |
|
| 27 |