@@ -146,6 +146,4 @@ |
||
146 | 146 | */ |
147 | 147 | protected function getUsesContent(): string |
148 | 148 | { |
149 | - return $this->getUsesTemplate($this->eventClass); |
|
150 | - } |
|
151 | -} |
|
149 | + return $this->getUsesTemplate($this->eventClass |
|
152 | 150 | \ No newline at end of file |
@@ -257,6 +257,4 @@ |
||
257 | 257 | { |
258 | 258 | $paramName = basename($this->paramClass); |
259 | 259 | |
260 | - return str_replace('%param_class%', $paramName, $content); |
|
261 | - } |
|
262 | -} |
|
260 | + return str_replace('%param_class%', $paramName, $content |
|
263 | 261 | \ No newline at end of file |
@@ -120,36 +120,3 @@ |
||
120 | 120 | public function getClassTemplate(): string |
121 | 121 | { |
122 | 122 | return <<<EOF |
123 | - <?php |
|
124 | - |
|
125 | - declare(strict_types=1); |
|
126 | - |
|
127 | - namespace %namespace%; |
|
128 | - |
|
129 | - use Platine\Http\Handler\RequestHandlerInterface; |
|
130 | - use Platine\Http\ResponseInterface; |
|
131 | - use Platine\Http\ServerRequestInterface; |
|
132 | - %uses% |
|
133 | - |
|
134 | - /** |
|
135 | - * @class %classname% |
|
136 | - * @package %namespace% |
|
137 | - */ |
|
138 | - class %classname% implements RequestHandlerInterface |
|
139 | - { |
|
140 | - |
|
141 | - %properties% |
|
142 | - |
|
143 | - %constructor% |
|
144 | - |
|
145 | - /** |
|
146 | - * {@inheritdoc} |
|
147 | - */ |
|
148 | - public function handle(ServerRequestInterface \$request): ResponseInterface |
|
149 | - { |
|
150 | - } |
|
151 | - } |
|
152 | - |
|
153 | - EOF; |
|
154 | - } |
|
155 | -} |
@@ -82,44 +82,3 @@ |
||
82 | 82 | public function getClassTemplate(): string |
83 | 83 | { |
84 | 84 | return <<<EOF |
85 | - <?php |
|
86 | - |
|
87 | - declare(strict_types=1); |
|
88 | - |
|
89 | - namespace %namespace%; |
|
90 | - |
|
91 | - use Platine\Http\Handler\MiddlewareInterface; |
|
92 | - use Platine\Http\Handler\RequestHandlerInterface; |
|
93 | - use Platine\Http\ResponseInterface; |
|
94 | - use Platine\Http\ServerRequestInterface; |
|
95 | - %uses% |
|
96 | - |
|
97 | - /** |
|
98 | - * @class %classname% |
|
99 | - * @package %namespace% |
|
100 | - */ |
|
101 | - class %classname% implements MiddlewareInterface |
|
102 | - { |
|
103 | - /** |
|
104 | - * {@inheritdoc} |
|
105 | - */ |
|
106 | - public function process( |
|
107 | - ServerRequestInterface \$request, |
|
108 | - RequestHandlerInterface \$handler |
|
109 | - ): ResponseInterface { |
|
110 | - |
|
111 | - return \$handler->handle(\$request); |
|
112 | - } |
|
113 | - } |
|
114 | - |
|
115 | - EOF; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * {@inheritdoc} |
|
120 | - */ |
|
121 | - protected function getUsesContent(): string |
|
122 | - { |
|
123 | - return ''; |
|
124 | - } |
|
125 | -} |
@@ -203,13 +203,4 @@ |
||
203 | 203 | */ |
204 | 204 | protected function getUsesContent(): string |
205 | 205 | { |
206 | - if (!$this->addRoutes) { |
|
207 | - return ''; |
|
208 | - } |
|
209 | - |
|
210 | - return <<<EOF |
|
211 | - use Platine\Route\Router; |
|
212 | - |
|
213 | - EOF; |
|
214 | - } |
|
215 | -} |
|
206 | + if (!$this->addRoutes |
|
216 | 207 | \ No newline at end of file |
@@ -186,6 +186,4 @@ |
||
186 | 186 | EOF; |
187 | 187 | } |
188 | 188 | |
189 | - return str_replace('%mapper_body%', $result, $content); |
|
190 | - } |
|
191 | -} |
|
189 | + return str_replace('%mapper_body%', $result, $content |
|
192 | 190 | \ No newline at end of file |
@@ -82,39 +82,3 @@ |
||
82 | 82 | public function getClassTemplate(): string |
83 | 83 | { |
84 | 84 | return <<<EOF |
85 | - <?php |
|
86 | - |
|
87 | - declare(strict_types=1); |
|
88 | - |
|
89 | - namespace %namespace%; |
|
90 | - |
|
91 | - use Platine\Event\Event; |
|
92 | - %uses% |
|
93 | - |
|
94 | - /** |
|
95 | - * @class %classname% |
|
96 | - * @package %namespace% |
|
97 | - */ |
|
98 | - class %classname% extends Event |
|
99 | - { |
|
100 | - /** |
|
101 | - * Create new instance |
|
102 | - */ |
|
103 | - public function __construct() |
|
104 | - { |
|
105 | - parent::__construct(__CLASS__, []); |
|
106 | - |
|
107 | - } |
|
108 | - } |
|
109 | - |
|
110 | - EOF; |
|
111 | - } |
|
112 | - |
|
113 | - /** |
|
114 | - * {@inheritdoc} |
|
115 | - */ |
|
116 | - protected function getUsesContent(): string |
|
117 | - { |
|
118 | - return ''; |
|
119 | - } |
|
120 | -} |
@@ -330,13 +330,4 @@ |
||
330 | 330 | */ |
331 | 331 | protected function getUsesContent(): string |
332 | 332 | { |
333 | - if (!$this->createInstanceFormEntity) { |
|
334 | - return ''; |
|
335 | - } |
|
336 | - |
|
337 | - return <<<EOF |
|
338 | - use Platine\Orm\Entity; |
|
339 | - |
|
340 | - EOF; |
|
341 | - } |
|
342 | -} |
|
333 | + if (!$this->createInstanceFormEntity |
|
343 | 334 | \ No newline at end of file |
@@ -165,6 +165,4 @@ |
||
165 | 165 | { |
166 | 166 | $entityName = basename($this->entityClass) . '::class'; |
167 | 167 | |
168 | - return str_replace('%entity_class%', $entityName, $content); |
|
169 | - } |
|
170 | -} |
|
168 | + return str_replace('%entity_class%', $entityName, $content |
|
171 | 169 | \ No newline at end of file |