Total Complexity | 8 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
12 | abstract class BaseGenerator implements GeneratorInterface |
||
13 | { |
||
14 | use GeneratorNameTrait; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $stubDir = null; |
||
20 | |||
21 | /** |
||
22 | * @var Parser |
||
23 | */ |
||
24 | protected $parser = null; |
||
25 | |||
26 | /** |
||
27 | * @var Type |
||
28 | */ |
||
29 | protected $type = null; |
||
30 | |||
31 | /** |
||
32 | * @param Parser $parser |
||
33 | 27 | * @param string $name The target type name. |
|
34 | * @param Type|string $type |
||
35 | 27 | */ |
|
36 | 27 | public function __construct(Parser $parser, string $name, $type = null) |
|
47 | 10 | } |
|
48 | } |
||
49 | 10 | ||
50 | protected function phpHeader(): string |
||
57 | */ |
||
58 | |||
59 | EOF; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Gets the classname for a directive implementation interface class. |
||
64 | * |
||
65 | * @param string $directive The directive name. |
||
66 | * @param string $type |
||
67 | * @return string|null |
||
68 | */ |
||
69 | protected function getDirectiveClass( |
||
84 |