|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace InShore\Bookwhen\Resources; |
|
6
|
|
|
|
|
7
|
|
|
use InShore\Bookwhen\Contracts\Resources\ClassPassesContract; |
|
8
|
|
|
use InShore\Bookwhen\Responses\ClassPasses\ListResponse; |
|
|
|
|
|
|
9
|
|
|
use InShore\Bookwhen\Responses\ClassPasses\RetrieveResponse; |
|
|
|
|
|
|
10
|
|
|
use InShore\Bookwhen\ValueObjects\Transporter\Payload; |
|
11
|
|
|
|
|
12
|
|
|
final class ClassPasses implements ClassPassesContract |
|
13
|
|
|
{ |
|
14
|
|
|
use Concerns\Transportable; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Returns a list of files that belong to the user's organization. |
|
18
|
|
|
* |
|
19
|
|
|
* @see https://beta.openai.com/docs/api-reference/files/list |
|
20
|
|
|
*/ |
|
21
|
|
|
public function list(): ListResponse |
|
22
|
|
|
{ |
|
23
|
|
|
$payload = Payload::list('classPasses'); |
|
24
|
|
|
|
|
25
|
|
|
/** @var array{object: string, data: array<int, array{id: string, object: string, created_at: int, bytes: int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null}>} $result */ |
|
26
|
|
|
$result = $this->transporter->requestObject($payload); |
|
27
|
|
|
|
|
28
|
|
|
return ListResponse::from($result); |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* Returns information about a specific file. |
|
33
|
|
|
* |
|
34
|
|
|
* @see https://beta.openai.com/docs/api-reference/files/retrieve |
|
35
|
|
|
*/ |
|
36
|
|
|
public function retrieve(string $classPassId): RetrieveResponse |
|
37
|
|
|
{ |
|
38
|
|
|
$payload = Payload::retrieve('classPasses', $classPassId); |
|
39
|
|
|
|
|
40
|
|
|
/** @var array{id: string, object: string, created_at: int, bytes: int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null} $result */ |
|
41
|
|
|
$result = $this->transporter->requestObject($payload)['data']; |
|
42
|
|
|
|
|
43
|
|
|
return RetrieveResponse::from($result); |
|
44
|
|
|
} |
|
45
|
|
|
} |
|
46
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths