Passed
Push — master ( c5a0e4...697ce1 )
by Dev
02:36
created

src/StaticWrapperTrait.php (2 issues)

Severity
1
<?php
2
3
namespace PiedWeb\Curl;
4
5
trait StaticWrapperTrait
6
{
7 3
    public static function get(string $url)
8
    {
9 3
        $request = new self($url);
10
        $request
11 3
            ->setDefaultGetOptions()
0 ignored issues
show
It seems like setDefaultGetOptions() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
            ->/** @scrutinizer ignore-call */ 
12
              setDefaultGetOptions()
Loading history...
12 3
            ->setDefaultSpeedOptions()
13 3
            ->setNoFollowRedirection()
14 3
            ->setDesktopUserAgent()
15
        ;
16
17 3
        $response = $request->exec();
0 ignored issues
show
It seems like exec() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        /** @scrutinizer ignore-call */ 
18
        $response = $request->exec();
Loading history...
18
19 3
        return is_int($response) ? $response : $response->getContent();
20
    }
21
}
22