1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace Swis\JsonApi\Client\Actions; |
||||
6 | |||||
7 | /** |
||||
8 | * @template TItem of \Swis\JsonApi\Client\Interfaces\ItemInterface |
||||
9 | */ |
||||
10 | trait TakeOne |
||||
11 | { |
||||
12 | /** |
||||
13 | * @return \Swis\JsonApi\Client\Interfaces\ItemDocumentInterface<TItem> |
||||
14 | */ |
||||
15 | 4 | public function take(array $parameters = [], array $headers = []) |
|||
16 | { |
||||
17 | 4 | return $this->getClient()->get($this->getEndpoint().'?'.http_build_query($parameters), $headers); |
|||
0 ignored issues
–
show
Bug
introduced
by
![]() It seems like
getEndpoint() 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
![]() |
|||||
18 | } |
||||
19 | } |
||||
20 |