11<?php
2+
23declare (strict_types=1 );
34
5+ /*
6+ * This file is part of the Symfony MakerBundle package.
7+ *
8+ * (c) Fabien Potencier <[email protected] > 9+ *
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
12+ */
13+
414namespace Symfony \Bundle \MakerBundle \Util ;
515
616final class NamespacesHelper
@@ -79,71 +89,141 @@ public function __construct(
7989 $ this ->validator = $ validator ?? 'Validator \\' ;
8090 }
8191
92+ /**
93+ * Get command namespace.
94+ *
95+ * @return string
96+ */
8297 public function getCommandNamespace (): string
8398 {
8499 return $ this ->trim ($ this ->command );
85100 }
86101
102+ /**
103+ * Get controller namespace.
104+ *
105+ * @return string
106+ */
87107 public function getControllerNamespace (): string
88108 {
89109 return $ this ->trim ($ this ->controller );
90110 }
91111
112+ /**
113+ * Get entity namespace.
114+ *
115+ * @return string
116+ */
92117 public function getEntityNamespace (): string
93118 {
94119 return $ this ->trim ($ this ->entity );
95120 }
96121
122+ /**
123+ * Get fixtures namespace.
124+ *
125+ * @return string
126+ */
97127 public function getFixturesNamespace (): string
98128 {
99129 return $ this ->trim ($ this ->fixtures );
100130 }
101131
132+ /**
133+ * Get form namespace.
134+ *
135+ * @return string
136+ */
102137 public function getFormNamespace (): string
103138 {
104139 return $ this ->trim ($ this ->form );
105140 }
106141
142+ /**
143+ * Get functional_test namespace.
144+ *
145+ * @return string
146+ */
107147 public function getFunctionalTestNamespace (): string
108148 {
109149 return $ this ->trim ($ this ->functionalTest );
110150 }
111151
152+ /**
153+ * Get repository namespace.
154+ *
155+ * @return string
156+ */
112157 public function getRepositoryNamespace (): string
113158 {
114159 return $ this ->trim ($ this ->repository );
115160 }
116161
162+ /**
163+ * Get root namespace.
164+ *
165+ * @return string
166+ */
117167 public function getRootNamespace (): string
118168 {
119169 return $ this ->trim ($ this ->root );
120170 }
121171
172+ /**
173+ * Get security namespace.
174+ *
175+ * @return string
176+ */
122177 public function getSecurityNamespace (): string
123178 {
124179 return $ this ->trim ($ this ->security );
125180 }
126181
182+ /**
183+ * Get serializer namespace.
184+ *
185+ * @return string
186+ */
127187 public function getSerializerNamespace (): string
128188 {
129189 return $ this ->trim ($ this ->serializer );
130190 }
131191
192+ /**
193+ * Get subscriber namespace.
194+ *
195+ * @return string
196+ */
132197 public function getSubscriberNamespace (): string
133198 {
134199 return $ this ->trim ($ this ->subscriber );
135200 }
136201
202+ /**
203+ * Get twig namespace.
204+ *
205+ * @return string
206+ */
137207 public function getTwigNamespace (): string
138208 {
139209 return $ this ->trim ($ this ->twig );
140210 }
141211
212+ /**
213+ * Get unit_test namespace.
214+ *
215+ * @return string
216+ */
142217 public function getUnitTestNamespace (): string
143218 {
144219 return $ this ->trim ($ this ->unitTest );
145220 }
146221
222+ /**
223+ * Get validator namespace.
224+ *
225+ * @return string
226+ */
147227 public function getValidatorNamespace (): string
148228 {
149229 return $ this ->trim ($ this ->validator );
@@ -158,6 +238,6 @@ public function getValidatorNamespace(): string
158238 */
159239 private function trim (string $ namespace ): string
160240 {
161- return \ trim ($ namespace , '\\' );
241+ return trim ($ namespace , '\\' );
162242 }
163243}
0 commit comments