Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 57.14% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class DeleteRows implements ShouldQueue |
||
14 | { |
||
15 | use Dispatchable, Queueable; |
||
16 | |||
17 | private string $apiKey; |
||
18 | private string $baseId; |
||
19 | private string $tableName; |
||
20 | private array $ids; |
||
21 | |||
22 | 2 | public function __construct(array $ids |
|
23 | , string $apiKey, string $baseId, string $tableName) |
||
24 | { |
||
25 | 2 | $this->apiKey = $apiKey; |
|
26 | 2 | $this->baseId = $baseId; |
|
27 | 2 | $this->tableName = $tableName; |
|
28 | 2 | $this->ids = $ids; |
|
29 | 2 | } |
|
30 | |||
31 | public function middleware() |
||
32 | { |
||
33 | $rateLimitedMiddleware = (new RateLimited()) |
||
34 | ->key('airtable') |
||
35 | ->allow(1) |
||
36 | ->everySeconds(1) |
||
37 | ->releaseAfterSeconds(3); |
||
38 | |||
39 | return [$rateLimitedMiddleware]; |
||
40 | } |
||
41 | |||
42 | 1 | public function handle(AirTable $airTable) |
|
48 | 1 | } |
|
49 | |||
50 | public function retryUntil() : \DateTime |
||
53 | } |
||
54 | } |