Total Complexity | 7 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | abstract class Resolver |
||
19 | { |
||
20 | private $app; |
||
21 | |||
22 | 101 | public function __construct(Container $app) |
|
23 | { |
||
24 | 101 | $this->app = $app; |
|
25 | 101 | } |
|
26 | |||
27 | abstract protected function authorizer(): string; |
||
28 | |||
29 | 101 | public function configure() |
|
30 | { |
||
31 | 101 | $this->container()->singleton(AuthorizerContract::class, $this->authorizer()); |
|
32 | 101 | $this->configureEvents(); |
|
33 | 101 | } |
|
34 | |||
35 | 12 | protected function listens(): array |
|
38 | } |
||
39 | |||
40 | 101 | protected function container(): Container |
|
41 | { |
||
42 | 101 | return $this->app; |
|
43 | } |
||
44 | |||
45 | 101 | private function configureEvents(): void |
|
50 | } |
||
51 | } |
||
52 | 101 | } |
|
53 | } |
||
54 |