Skip to content

Commit 534dcfe

Browse files
JaZogithub-actions[bot]
authored andcommitted
styling: fix styling
1 parent 1738a10 commit 534dcfe

File tree

100 files changed

+711
-1586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+711
-1586
lines changed

src/Actions/Create.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
trait Create
1010
{
1111
/**
12-
* @param \Swis\JsonApi\Client\Interfaces\ItemInterface $item
13-
* @param array $parameters
14-
* @param array $headers
15-
*
1612
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1713
*/
1814
public function create(ItemInterface $item, array $parameters = [], array $headers = [])

src/Actions/Delete.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
trait Delete
88
{
99
/**
10-
* @param string $id
11-
* @param array $parameters
12-
* @param array $headers
13-
*
1410
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1511
*/
1612
public function delete(string $id, array $parameters = [], array $headers = [])

src/Actions/FetchMany.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
trait FetchMany
88
{
99
/**
10-
* @param array $parameters
11-
* @param array $headers
12-
*
1310
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1411
*/
1512
public function all(array $parameters = [], array $headers = [])

src/Actions/FetchOne.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
trait FetchOne
88
{
99
/**
10-
* @param string $id
11-
* @param array $parameters
12-
* @param array $headers
13-
*
1410
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1511
*/
1612
public function find(string $id, array $parameters = [], array $headers = [])

src/Actions/Save.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ trait Save
1212
use Update { update as protected saveExisting; }
1313

1414
/**
15-
* @param \Swis\JsonApi\Client\Interfaces\ItemInterface $item
16-
* @param array $parameters
17-
* @param array $headers
18-
*
1915
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
2016
*/
2117
public function save(ItemInterface $item, array $parameters = [], array $headers = [])

src/Actions/TakeOne.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
trait TakeOne
88
{
99
/**
10-
* @param array $parameters
11-
* @param array $headers
12-
*
1310
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1411
*/
1512
public function take(array $parameters = [], array $headers = [])

src/Actions/Update.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
trait Update
1010
{
1111
/**
12-
* @param \Swis\JsonApi\Client\Interfaces\ItemInterface $item
13-
* @param array $parameters
14-
* @param array $headers
15-
*
1612
* @return \Swis\JsonApi\Client\Interfaces\DocumentInterface
1713
*/
1814
public function update(ItemInterface $item, array $parameters = [], array $headers = [])

src/BaseRepository.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ abstract class BaseRepository
2323
*/
2424
protected $endpoint = '';
2525

26-
/**
27-
* @param \Swis\JsonApi\Client\Interfaces\DocumentClientInterface $client
28-
* @param \Swis\JsonApi\Client\DocumentFactory $documentFactory
29-
*/
3026
public function __construct(DocumentClientInterface $client, DocumentFactory $documentFactory)
3127
{
3228
$this->client = $client;

src/Client.php

Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -39,114 +39,74 @@ public function __construct(
3939
$this->streamFactory = $streamFactory ?: Psr17FactoryDiscovery::findStreamFactory();
4040
}
4141

42-
/**
43-
* @return string
44-
*/
4542
public function getBaseUri(): string
4643
{
4744
return $this->baseUri;
4845
}
4946

50-
/**
51-
* @param string $baseUri
52-
*/
5347
public function setBaseUri(string $baseUri): void
5448
{
5549
$this->baseUri = $baseUri;
5650
}
5751

58-
/**
59-
* @return array
60-
*/
6152
public function getDefaultHeaders(): array
6253
{
6354
return $this->defaultHeaders;
6455
}
6556

66-
/**
67-
* @param array $defaultHeaders
68-
*/
6957
public function setDefaultHeaders(array $defaultHeaders): void
7058
{
7159
$this->defaultHeaders = $defaultHeaders;
7260
}
7361

7462
/**
75-
* @param string $endpoint
76-
* @param array $headers
77-
*
7863
* @throws \Psr\Http\Client\ClientExceptionInterface
79-
*
80-
* @return \Psr\Http\Message\ResponseInterface
8164
*/
8265
public function get(string $endpoint, array $headers = []): ResponseInterface
8366
{
8467
return $this->request('GET', $endpoint, null, $headers);
8568
}
8669

8770
/**
88-
* @param string $endpoint
89-
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
90-
* @param array $headers
71+
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
9172
*
9273
* @throws \Psr\Http\Client\ClientExceptionInterface
93-
*
94-
* @return \Psr\Http\Message\ResponseInterface
9574
*/
9675
public function post(string $endpoint, $body, array $headers = []): ResponseInterface
9776
{
9877
return $this->request('POST', $endpoint, $body, $headers);
9978
}
10079

10180
/**
102-
* @param string $endpoint
103-
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
104-
* @param array $headers
81+
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
10582
*
10683
* @throws \Psr\Http\Client\ClientExceptionInterface
107-
*
108-
* @return \Psr\Http\Message\ResponseInterface
10984
*/
11085
public function patch(string $endpoint, $body, array $headers = []): ResponseInterface
11186
{
11287
return $this->request('PATCH', $endpoint, $body, $headers);
11388
}
11489

11590
/**
116-
* @param string $endpoint
117-
* @param array $headers
118-
*
11991
* @throws \Psr\Http\Client\ClientExceptionInterface
120-
*
121-
* @return \Psr\Http\Message\ResponseInterface
12292
*/
12393
public function delete(string $endpoint, array $headers = []): ResponseInterface
12494
{
12595
return $this->request('DELETE', $endpoint, null, $headers);
12696
}
12797

12898
/**
129-
* @param string $method
130-
* @param string $endpoint
131-
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
132-
* @param array $headers
99+
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
133100
*
134101
* @throws \Psr\Http\Client\ClientExceptionInterface
135-
*
136-
* @return \Psr\Http\Message\ResponseInterface
137102
*/
138103
public function request(string $method, string $endpoint, $body = null, array $headers = []): ResponseInterface
139104
{
140105
return $this->client->sendRequest($this->buildRequest($method, $endpoint, $body, $headers));
141106
}
142107

143108
/**
144-
* @param string $method
145-
* @param string $endpoint
146-
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
147-
* @param array $headers
148-
*
149-
* @return \Psr\Http\Message\RequestInterface
109+
* @param string|resource|\Psr\Http\Message\StreamInterface|null $body
150110
*/
151111
protected function buildRequest(string $method, string $endpoint, $body = null, array $headers = []): RequestInterface
152112
{
@@ -156,7 +116,7 @@ protected function buildRequest(string $method, string $endpoint, $body = null,
156116
if (is_resource($body)) {
157117
$body = $this->streamFactory->createStreamFromResource($body);
158118
}
159-
if (!($body instanceof StreamInterface)) {
119+
if (! ($body instanceof StreamInterface)) {
160120
$body = $this->streamFactory->createStream($body);
161121
}
162122

@@ -170,11 +130,6 @@ protected function buildRequest(string $method, string $endpoint, $body = null,
170130
return $request;
171131
}
172132

173-
/**
174-
* @param string $endpoint
175-
*
176-
* @return string
177-
*/
178133
protected function getEndpoint(string $endpoint): string
179134
{
180135
if (strpos($endpoint, 'http://') === 0 || strpos($endpoint, 'https://') === 0) {
@@ -184,11 +139,6 @@ protected function getEndpoint(string $endpoint): string
184139
return $this->baseUri.$endpoint;
185140
}
186141

187-
/**
188-
* @param array $headers
189-
*
190-
* @return array
191-
*/
192142
protected function mergeHeaders(array $headers): array
193143
{
194144
return array_merge($this->defaultHeaders, $headers);

src/Collection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ class Collection extends \Illuminate\Support\Collection implements DataInterface
1010
{
1111
/**
1212
* Get the collection of items as a plain json api array.
13-
*
14-
* @return array
1513
*/
1614
public function toJsonApiArray(): array
1715
{

0 commit comments

Comments
 (0)