tangled
alpha
login
or
join now
socialde.pt
/
atp-client
3
fork
atom
Laravel AT Protocol Client (alpha & unstable)
3
fork
atom
overview
issues
pulls
pipelines
Add EmptyResponse class for void endpoints
Miguel Batres
3 months ago
f7aa320f
1e715061
+25
1 changed file
expand all
collapse all
unified
split
src
Data
Responses
EmptyResponse.php
+25
src/Data/Responses/EmptyResponse.php
···
1
1
+
<?php
2
2
+
3
3
+
namespace SocialDept\AtpClient\Data\Responses;
4
4
+
5
5
+
use Illuminate\Contracts\Support\Arrayable;
6
6
+
7
7
+
/**
8
8
+
* Response class for endpoints that return empty objects.
9
9
+
*
10
10
+
* @implements Arrayable<string, mixed>
11
11
+
*/
12
12
+
class EmptyResponse implements Arrayable
13
13
+
{
14
14
+
public function __construct() {}
15
15
+
16
16
+
public static function fromArray(array $data): self
17
17
+
{
18
18
+
return new self;
19
19
+
}
20
20
+
21
21
+
public function toArray(): array
22
22
+
{
23
23
+
return [];
24
24
+
}
25
25
+
}