1 | <?php |
||
11 | abstract class AbstractResource extends VersionableRequestMaker |
||
12 | { |
||
13 | /** |
||
14 | * The resource HTTP verb. |
||
15 | * |
||
16 | * @var string|null |
||
17 | */ |
||
18 | protected $verb; |
||
19 | |||
20 | /** |
||
21 | * The HTTP call options. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $options = []; |
||
26 | |||
27 | /** |
||
28 | * Retrieve the resource endpoint. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | abstract public function getEndpoint(); |
||
33 | |||
34 | /** |
||
35 | * Retrieve the request to pass through resources. |
||
36 | * |
||
37 | * @return Cerbero\FluentApi\Requests\Request |
||
38 | */ |
||
39 | public function getRequest() |
||
43 | |||
44 | /** |
||
45 | * Update the given request with the resource options. |
||
46 | * |
||
47 | * @param Cerbero\FluentApi\Requests\Request $request |
||
48 | * @return Cerbero\FluentApi\Requests\Request |
||
49 | */ |
||
50 | public function updateOptions(Request $request) |
||
54 | |||
55 | /** |
||
56 | * Fill the given request with the resource details. |
||
57 | * |
||
58 | * @param Cerbero\FluentApi\Requests\Request $request |
||
59 | * @return Cerbero\FluentApi\Requests\Request |
||
60 | */ |
||
61 | public function fillRequest(Request $request) |
||
67 | |||
68 | /** |
||
69 | * Retrieve the resource HTTP verb. |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getVerb() |
||
77 | |||
78 | /** |
||
79 | * Set the HTTP call options. |
||
80 | * |
||
81 | * @param array $options |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function setOptions(array $options) |
||
90 | |||
91 | /** |
||
92 | * Retrieve the HTTP call options. |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | public function getOptions() |
||
100 | |||
101 | /** |
||
102 | * Set a singular HTTP call option. |
||
103 | * |
||
104 | * @param string $option |
||
105 | * @param mixed $value |
||
106 | * @return $this |
||
107 | */ |
||
108 | public function setOption($option, $value) |
||
114 | |||
115 | /** |
||
116 | * Retrieve a singular HTTP call option. |
||
117 | * |
||
118 | * @param string $option |
||
119 | * @return mixed |
||
120 | */ |
||
121 | public function getOption($option) |
||
129 | } |
||
130 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..