44use gossi \docblock \Docblock ;
55use Symfony \Component \OptionsResolver \Options ;
66
7+ /**
8+ * Configuration for code file generation
9+ *
10+ * @author Thomas Gossmann
11+ */
712class CodeFileGeneratorConfig extends CodeGeneratorConfig {
813
14+ /**
15+ * @inheritDoc
16+ */
917 protected function getOptionalOptions () {
1018 return array_merge ([
1119 'headerComment ' , 'headerDocblock ' , 'blankLineAtEnd ' , 'declareStrictTypes '
1220 ], parent ::getOptionalOptions ());
1321 }
1422
23+ /**
24+ * @inheritDoc
25+ */
1526 protected function getDefaultOptions () {
1627 return array_merge (
1728 parent ::getDefaultOptions (), [
@@ -28,6 +39,9 @@ protected function getDefaultOptions() {
2839 ]);
2940 }
3041
42+ /**
43+ * @inheritDoc
44+ */
3145 protected function getAllowedOptionTypes () {
3246 return array_merge ([
3347 'headerComment ' => 'string ' ,
@@ -39,7 +53,7 @@ protected function getAllowedOptionTypes() {
3953
4054 /**
4155 * Returns the file header comment
42- *
56+ *
4357 * @return string the header comment
4458 */
4559 public function getHeaderComment () {
@@ -48,7 +62,7 @@ public function getHeaderComment() {
4862
4963 /**
5064 * Sets the file header comment
51- *
65+ *
5266 * @param string $comment the header comment
5367 * @return $this
5468 */
@@ -59,7 +73,7 @@ public function setHeaderComment($comment) {
5973
6074 /**
6175 * Returns the file header docblock
62- *
76+ *
6377 * @return Docblock the docblock
6478 */
6579 public function getHeaderDocblock () {
@@ -68,7 +82,7 @@ public function getHeaderDocblock() {
6882
6983 /**
7084 * Sets the file header docblock
71- *
85+ *
7286 * @param Docblock $docblock the docblock
7387 * @return $this
7488 */
@@ -79,7 +93,7 @@ public function setHeaderDocblock(Docblock $docblock) {
7993
8094 /**
8195 * Returns whether a blank line should be generated at the end of the file
82- *
96+ *
8397 * @return bool `true` if it will be generated and `false` if not
8498 */
8599 public function getBlankLineAtEnd () {
@@ -88,7 +102,7 @@ public function getBlankLineAtEnd() {
88102
89103 /**
90104 * Sets whether a blank line should be generated at the end of the file
91- *
105+ *
92106 * @param bool $show `true` if it will be generated and `false` if not
93107 * @return $this
94108 */
@@ -98,19 +112,19 @@ public function setBlankLineAtEnd($show) {
98112 }
99113
100114 /**
101- * Returns whether a `declare(strict_types=1);` statement should be printed
115+ * Returns whether a `declare(strict_types=1);` statement should be printed
102116 * below the header comments (PHP 7)
103- *
117+ *
104118 * @return bool `true` if it will be printed and `false` if not
105119 */
106120 public function getDeclareStrictTypes () {
107121 return $ this ->options ['declareStrictTypes ' ];
108122 }
109123
110124 /**
111- * Sets whether a `declare(strict_types=1);` statement should be printed
125+ * Sets whether a `declare(strict_types=1);` statement should be printed
112126 * below the header comments (PHP 7)
113- *
127+ *
114128 * @param bool $strict `true` if it will be printed and `false` if not
115129 * @return $this
116130 */
0 commit comments