1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace BEAR\Resource; |
||
6 | |||
7 | use Override; |
||
8 | |||
9 | /** @psalm-import-type Query from Types */ |
||
10 | final class NullRequest implements RequestInterface |
||
11 | { |
||
12 | /** @param Query $query */ |
||
0 ignored issues
–
show
|
|||
13 | #[Override] |
||
14 | public function __invoke(array|null $query = null): ResourceObject |
||
15 | { |
||
16 | return new NullResourceObject(); |
||
17 | } |
||
18 | |||
19 | #[Override] |
||
20 | public function hash(): string |
||
21 | { |
||
22 | return ''; |
||
23 | } |
||
24 | |||
25 | #[Override] |
||
26 | public function request(): ResourceObject |
||
27 | { |
||
28 | return new NullResourceObject(); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * {@inheritDoc} |
||
33 | */ |
||
34 | #[Override] |
||
35 | public function withQuery(array $query): RequestInterface |
||
36 | { |
||
37 | unset($query); |
||
38 | |||
39 | return $this; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | #[Override] |
||
46 | public function addQuery(array $query): RequestInterface |
||
47 | { |
||
48 | unset($query); |
||
49 | |||
50 | return $this; |
||
51 | } |
||
52 | |||
53 | #[Override] |
||
54 | public function toUri(): string |
||
55 | { |
||
56 | return (string) new NullUri(); |
||
57 | } |
||
58 | |||
59 | #[Override] |
||
60 | public function toUriWithMethod(): string |
||
61 | { |
||
62 | return 'get ' . (string) new NullUri(); |
||
63 | } |
||
64 | |||
65 | /** @return self */ |
||
66 | #[Override] |
||
67 | public function linkSelf(string $linkKey): RequestInterface |
||
68 | { |
||
69 | unset($linkKey); |
||
70 | |||
71 | return $this; |
||
72 | } |
||
73 | |||
74 | /** @return self */ |
||
75 | #[Override] |
||
76 | public function linkNew(string $linkKey): RequestInterface |
||
77 | { |
||
78 | unset($linkKey); |
||
79 | |||
80 | return $this; |
||
81 | } |
||
82 | |||
83 | /** @return self */ |
||
84 | #[Override] |
||
85 | public function linkCrawl(string $linkKey): RequestInterface |
||
86 | { |
||
87 | unset($linkKey); |
||
88 | |||
89 | return $this; |
||
90 | } |
||
91 | } |
||
92 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths