Total Complexity | 1 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | abstract class AbstractHandler |
||
14 | { |
||
15 | use RetriesHttpRequests; |
||
|
|||
16 | |||
17 | /** |
||
18 | * The APIs configuration. |
||
19 | * |
||
20 | * @var Config |
||
21 | */ |
||
22 | protected $config; |
||
23 | |||
24 | /** |
||
25 | * Instantiate the class. |
||
26 | * |
||
27 | * @param Config $config |
||
28 | */ |
||
29 | 14 | public function __construct(Config $config) |
|
32 | 14 | } |
|
33 | |||
34 | /** |
||
35 | * Determine whether the handler can handle the APIs configuration |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | abstract public function matches(): bool; |
||
40 | |||
41 | /** |
||
42 | * Handle the APIs configuration |
||
43 | * |
||
44 | * @return Traversable |
||
45 | */ |
||
46 | abstract public function handle(): Traversable; |
||
47 | } |
||
48 |