1 | <?php |
||
13 | class CodeFileGeneratorConfig extends CodeGeneratorConfig { |
||
14 | |||
15 | 9 | protected function configureOptions(OptionsResolver $resolver) { |
|
44 | |||
45 | 9 | private function toDocblock($value) { |
|
52 | |||
53 | /** |
||
54 | * Returns the file header comment |
||
55 | * |
||
56 | * @return string the header comment |
||
57 | */ |
||
58 | 7 | public function getHeaderComment() { |
|
61 | |||
62 | /** |
||
63 | * Sets the file header comment |
||
64 | * |
||
65 | * @param string $comment the header comment |
||
66 | * @return $this |
||
67 | */ |
||
68 | 1 | public function setHeaderComment($comment) { |
|
72 | |||
73 | /** |
||
74 | * Returns the file header docblock |
||
75 | * |
||
76 | * @return Docblock the docblock |
||
77 | */ |
||
78 | 7 | public function getHeaderDocblock() { |
|
81 | |||
82 | /** |
||
83 | * Sets the file header docblock |
||
84 | * |
||
85 | * @param Docblock $docblock the docblock |
||
86 | * @return $this |
||
87 | */ |
||
88 | 1 | public function setHeaderDocblock(Docblock $docblock) { |
|
92 | |||
93 | /** |
||
94 | * Returns whether a blank line should be generated at the end of the file |
||
95 | * |
||
96 | * @return bool `true` if it will be generated and `false` if not |
||
97 | */ |
||
98 | 7 | public function getBlankLineAtEnd() { |
|
101 | |||
102 | /** |
||
103 | * Sets whether a blank line should be generated at the end of the file |
||
104 | * |
||
105 | * @param bool $show `true` if it will be generated and `false` if not |
||
106 | * @return $this |
||
107 | */ |
||
108 | 1 | public function setBlankLineAtEnd($show) { |
|
112 | |||
113 | /** |
||
114 | * Returns whether a `declare(strict_types=1);` statement should be printed |
||
115 | * below the header comments (PHP 7) |
||
116 | * |
||
117 | * @return bool `true` if it will be printed and `false` if not |
||
118 | */ |
||
119 | 8 | public function getDeclareStrictTypes() { |
|
122 | |||
123 | /** |
||
124 | * Sets whether a `declare(strict_types=1);` statement should be printed |
||
125 | * below the header comments (PHP 7) |
||
126 | * |
||
127 | * @param bool $strict `true` if it will be printed and `false` if not |
||
128 | * @return $this |
||
129 | */ |
||
130 | 1 | public function setDeclareStrictTypes($strict) { |
|
134 | } |
||
135 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.