Issues (48)

src/Api/ImageFixer.php (3 issues)

Severity
1
<?php
2
3
class ImageFixer
4
{
5
    public function makeImageProper($matches, ?string $prefix = '')
0 ignored issues
show
The parameter $prefix 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 ignore-unused  annotation

5
    public function makeImageProper($matches, /** @scrutinizer ignore-unused */ ?string $prefix = '')

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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 ignore-unused  annotation

5
    public function makeImageProper(/** @scrutinizer ignore-unused */ $matches, ?string $prefix = '')

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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 ignore-unused  annotation

10
    public function replaceContentAlt(/** @scrutinizer ignore-unused */ $contents)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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