NullRequest   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 26
c 0
b 0
f 0
dl 0
loc 80
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A withQuery() 0 6 1
A request() 0 4 1
A toUriWithMethod() 0 4 1
A toUri() 0 4 1
A linkNew() 0 6 1
A addQuery() 0 6 1
A hash() 0 4 1
A __invoke() 0 4 1
A linkCrawl() 0 6 1
A linkSelf() 0 6 1
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
Bug introduced by
The type BEAR\Resource\Query was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

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