| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function render() |
||
| 24 | { |
||
| 25 | $monTexte = preg_replace("#\<[[:space:]]?br[[:space:]]?\/?[[:space:]]?>#", "<br/>\n", $this->getContenu()); |
||
| 26 | $monTexte = preg_replace("#\<\/[[:space:]]?p[[:space:]]?>#", "</p>\n\n", $monTexte); |
||
| 27 | $monTexte = preg_replace("#\<\/[[:space:]]?div[[:space:]]?>#", "</div>\n\n", $monTexte); |
||
| 28 | $monTexte = $this->htmlPurifierService->purify( |
||
| 29 | $monTexte, |
||
| 30 | [ |
||
|
|
|||
| 31 | 'AutoFormat.DisplayLinkURI' => true, |
||
| 32 | ] |
||
| 33 | ); |
||
| 34 | $monTexte = strip_tags($monTexte); |
||
| 35 | $monTexte = implode( |
||
| 36 | "\n", |
||
| 37 | array_map( |
||
| 38 | function ($ligne) { |
||
| 39 | return trim($ligne); |
||
| 40 | }, |
||
| 41 | explode("\n", $monTexte) |
||
| 42 | ) |
||
| 43 | ); |
||
| 44 | $monTexte = str_replace(["[{@mirror}]", "[{@pixel}]"], "", $monTexte); |
||
| 45 | |||
| 46 | return $monTexte; |
||
| 47 | } |
||
| 48 | |||
| 54 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: