1 | <?php |
||
15 | class CodeFileGeneratorConfig extends CodeGeneratorConfig { |
||
16 | |||
17 | 11 | protected function configureOptions(OptionsResolver $resolver): void { |
|
45 | |||
46 | /** |
||
47 | * |
||
48 | * @param mixed $value |
||
49 | * @return Docblock|null |
||
50 | */ |
||
51 | 11 | private function toDocblock($value): ?Docblock { |
|
58 | |||
59 | /** |
||
60 | * Returns the file header comment |
||
61 | * |
||
62 | * @return Docblock the header comment |
||
63 | */ |
||
64 | 8 | public function getHeaderComment(): ?Docblock { |
|
67 | |||
68 | /** |
||
69 | * Sets the file header comment |
||
70 | * |
||
71 | * @param Docblock $comment the header comment |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function setHeaderComment(Docblock $comment) { |
||
78 | |||
79 | /** |
||
80 | * Returns the file header docblock |
||
81 | * |
||
82 | * @return Docblock the docblock |
||
83 | */ |
||
84 | 9 | public function getHeaderDocblock(): ?Docblock { |
|
87 | |||
88 | /** |
||
89 | * Sets the file header docblock |
||
90 | * |
||
91 | * @param Docblock $docblock the docblock |
||
92 | * @return $this |
||
93 | */ |
||
94 | 1 | public function setHeaderDocblock(Docblock $docblock) { |
|
98 | |||
99 | /** |
||
100 | * Returns whether a blank line should be generated at the end of the file |
||
101 | * |
||
102 | * @return bool `true` if it will be generated and `false` if not |
||
103 | */ |
||
104 | 9 | public function getBlankLineAtEnd(): bool { |
|
107 | |||
108 | /** |
||
109 | * Sets whether a blank line should be generated at the end of the file |
||
110 | * |
||
111 | * @param bool $show `true` if it will be generated and `false` if not |
||
112 | * @return $this |
||
113 | */ |
||
114 | 1 | public function setBlankLineAtEnd(bool $show) { |
|
118 | |||
119 | /** |
||
120 | * Returns whether a `declare(strict_types=1);` statement should be printed |
||
121 | * below the header comments (PHP 7) |
||
122 | * |
||
123 | * @return bool `true` if it will be printed and `false` if not |
||
124 | */ |
||
125 | 10 | public function getDeclareStrictTypes(): bool { |
|
128 | |||
129 | /** |
||
130 | * Sets whether a `declare(strict_types=1);` statement should be printed |
||
131 | * below the header comments (PHP 7) |
||
132 | * |
||
133 | * @param bool $strict `true` if it will be printed and `false` if not |
||
134 | * @return $this |
||
135 | */ |
||
136 | 1 | public function setDeclareStrictTypes(bool $strict) { |
|
140 | } |
||
141 |