Issues (169)

src/ResourceInterface.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource;
6
7
/** @psalm-import-type Query from Types */
8
interface ResourceInterface
9
{
10
    /**
11
     * Return new resource object instance
12
     *
13
     * @param AbstractUri|string $uri
14
     */
15
    public function newInstance($uri): ResourceObject;
16
17
    /**
18
     * Set resource object
19
     */
20
    public function object(ResourceObject $ro): RequestInterface;
21
22
    /**
23
     * Set URI
24
     *
25
     * @param AbstractUri|string $uri
26
     *
27
     * @deprecated Use createRequest() instead
28
     */
29
    public function uri($uri): RequestInterface;
30
31
    /**
32
     * Create a request atomically (coroutine-safe)
33
     *
34
     * @param Query $query
0 ignored issues
show
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...
35
     */
36
    public function createRequest(string $method, string $uri, array $query = []): RequestInterface;
37
38
    /**
39
     * Execute a GET request with link crawl
40
     *
41
     * @param Query $query
42
     */
43
    public function crawl(string $uri, string $linkKey, array $query = []): ResourceObject;
44
45
    /**
46
     * Hyper reference (Hypertext As The Engine Of Application State)
47
     *
48
     * @param Query $query
49
     */
50
    public function href(string $rel, array $query = [], ResourceObject|null $ro = null): ResourceObject;
51
52
    /**
53
     * Invoke GET request
54
     *
55
     * @param Query $query
56
     */
57
    public function get(string $uri, array $query = []): ResourceObject;
58
59
    /**
60
     * Invoke POST request
61
     *
62
     * @param Query $query
63
     */
64
    public function post(string $uri, array $query = []): ResourceObject;
65
66
    /**
67
     * Invoke PUT request
68
     *
69
     * @param Query $query
70
     */
71
    public function put(string $uri, array $query = []): ResourceObject;
72
73
    /**
74
     * Invoke PATCH request
75
     *
76
     * @param Query $query
77
     */
78
    public function patch(string $uri, array $query = []): ResourceObject;
79
80
    /**
81
     * Invoke DELETE request
82
     *
83
     * @param Query $query
84
     */
85
    public function delete(string $uri, array $query = []): ResourceObject;
86
87
    /**
88
     * Invoke HEAD request
89
     *
90
     * @param Query $query
91
     */
92
    public function head(string $uri, array $query = []): ResourceObject;
93
94
    /**
95
     * Invoke OPTIONS request
96
     *
97
     * @param Query $query
98
     */
99
    public function options(string $uri, array $query = []): ResourceObject;
100
}
101