1 | <?php |
||||
2 | |||||
3 | class ImageFixer |
||||
4 | { |
||||
5 | public function makeImageProper($matches, ?string $prefix = '') |
||||
0 ignored issues
–
show
The parameter
$matches is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
6 | { |
||||
7 | // print_r($matches); |
||||
8 | } |
||||
9 | |||||
10 | public function replaceContentAlt($contents) |
||||
0 ignored issues
–
show
The parameter
$contents is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
11 | { |
||||
12 | // return preg_replace_callback("#(<img[^>]*src *= *[\"']?)([^\"']*)#i", function ($matches, ?string $prefix) { |
||||
13 | // return $this->makeImageProper($matches, $prefix); |
||||
14 | // }, $contents); |
||||
15 | } |
||||
16 | |||||
17 | public function replaceContent() |
||||
18 | { |
||||
19 | // libxml_use_internal_errors(true); |
||||
20 | // $dom = new \DOMDocument(); |
||||
21 | // $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); |
||||
22 | // foreach ($dom->getElementsByTagName('img') as $img) { |
||||
23 | // $src = $iframe->getAttribute('src'); |
||||
24 | // $image = Image::get()->filter(['Name' => $src])->first(); |
||||
25 | // // if($image) { |
||||
26 | // } |
||||
27 | // echo $dom->saveHTML(); |
||||
28 | } |
||||
29 | } |
||||
30 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.