@@ -10,7 +10,7 @@ |
||
10 | 10 | final class CFT extends TipologiaCampo |
11 | 11 | { |
12 | 12 | /** |
13 | - * @return BitPrepared\Bundle\FormazioneBundle\Domain\ValueObject\TipologiaCampo\CFT |
|
13 | + * @return CFT |
|
14 | 14 | */ |
15 | 15 | final public static function instance() |
16 | 16 | { |
@@ -18,7 +18,6 @@ |
||
18 | 18 | * @param string $className class name |
19 | 19 | * @param string $directoryOutput output directory to compare from |
20 | 20 | * @param bool $createIfNotExist generate file if not exist equals on genereted one |
21 | - * @param ClassGenerator $g class generator object to test |
|
22 | 21 | */ |
23 | 22 | private function compareClassPhp($resourcesDir, $namespace, $className, $directoryOutput, $createIfNotExist = false) |
24 | 23 | { |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | * with this source code in the file LICENSE. |
12 | 12 | */ |
13 | 13 | |
14 | - use Arrayzy\ArrayImitator as A; |
|
15 | - use Symfony\Component\Yaml\Exception\ParseException; |
|
16 | - use Symfony\Component\Yaml\Parser; |
|
17 | - use Yoghi\Bundle\MaddaBundle\Exception\MaddaException; |
|
14 | + use Arrayzy\ArrayImitator as A; |
|
15 | + use Symfony\Component\Yaml\Exception\ParseException; |
|
16 | + use Symfony\Component\Yaml\Parser; |
|
17 | + use Yoghi\Bundle\MaddaBundle\Exception\MaddaException; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @author Stefano Tamagnini <> |
|
21 | - */ |
|
19 | + /** |
|
20 | + * @author Stefano Tamagnini <> |
|
21 | + */ |
|
22 | 22 | class Reader |
23 | 23 | { |
24 | 24 | /** |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | public function __construct() |
32 | 32 | { |
33 | 33 | $specListArray = [ |
34 | - 'ddd' => [], |
|
35 | - 'classes' => [], |
|
34 | + 'ddd' => [], |
|
35 | + 'classes' => [], |
|
36 | 36 | ]; |
37 | 37 | $this->specList = new A($specListArray); |
38 | 38 | } |
@@ -88,9 +88,9 @@ |
||
88 | 88 | $fixer = new \Symfony\CS\Console\Command\FixCommand(); |
89 | 89 | |
90 | 90 | $input = new ArrayInput([ |
91 | - 'path' => $directoryOutput, |
|
92 | - '--level' => 'psr2', |
|
93 | - '--fixers' => 'eof_ending,strict_param,short_array_syntax,trailing_spaces,indentation,line_after_namespace,php_closing_tag', |
|
91 | + 'path' => $directoryOutput, |
|
92 | + '--level' => 'psr2', |
|
93 | + '--fixers' => 'eof_ending,strict_param,short_array_syntax,trailing_spaces,indentation,line_after_namespace,php_closing_tag', |
|
94 | 94 | ]); |
95 | 95 | |
96 | 96 | $output = new BufferedOutput(); |
@@ -46,6 +46,6 @@ |
||
46 | 46 | $checker = new SecurityChecker(); |
47 | 47 | $alerts = $checker->check('composer.lock'); |
48 | 48 | |
49 | - count($alerts) > 0 ? $io->error($alerts) : $io->success('security checked!'); |
|
49 | + count($alerts) > 0 ? $io->error($alerts) : $io->success('security checked!'); |
|
50 | 50 | } |
51 | 51 | } |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $gClassgen->setLogger($this->logger); |
52 | 52 | $config = new ClassConfig(); |
53 | 53 | $properties = [ |
54 | - 'extend' => 'ExtendClass', |
|
55 | - 'implements' => 'IClass', |
|
54 | + 'extend' => 'ExtendClass', |
|
55 | + 'implements' => 'IClass', |
|
56 | 56 | ]; |
57 | 57 | $typesReferenceArray = []; |
58 | 58 | $typesDescArray = []; |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $gClassgen->setLogger($this->logger); |
73 | 73 | $config = new ClassConfig(); |
74 | 74 | $properties = [ |
75 | - 'extend' => 'ExtendClass', |
|
76 | - 'implements' => "NS\IClass", |
|
77 | - 'traits' => 'TraitsClass', |
|
75 | + 'extend' => 'ExtendClass', |
|
76 | + 'implements' => "NS\IClass", |
|
77 | + 'traits' => 'TraitsClass', |
|
78 | 78 | ]; |
79 | 79 | $typesReferenceArray = [ |
80 | - 'TraitsClass' => 'TraitNamespace', |
|
80 | + 'TraitsClass' => 'TraitNamespace', |
|
81 | 81 | ]; |
82 | 82 | $typesDescArray = []; |
83 | 83 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | $gClassgenClassgen->setLogger($this->logger); |
95 | 95 | $config = new ClassConfig(); |
96 | 96 | $properties = [ |
97 | - 'extend' => 'ExtendClass', |
|
98 | - 'implements' => "NS\IClass", |
|
99 | - 'traits' => ['TraitsClass', 'TraitsClass2'], |
|
97 | + 'extend' => 'ExtendClass', |
|
98 | + 'implements' => "NS\IClass", |
|
99 | + 'traits' => ['TraitsClass', 'TraitsClass2'], |
|
100 | 100 | ]; |
101 | 101 | $typesReferenceArray = [ |
102 | - 'TraitsClass' => 'TraitNamespace', |
|
103 | - 'TraitsClass2' => 'TestNamespace', |
|
102 | + 'TraitsClass' => 'TraitNamespace', |
|
103 | + 'TraitsClass2' => 'TestNamespace', |
|
104 | 104 | ]; |
105 | 105 | $typesDescArray = []; |
106 | 106 | $gClassgenClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | $gClassgenClassgen->setLogger($this->logger); |
118 | 118 | $config = new ClassConfig(); |
119 | 119 | $properties = [ |
120 | - 'extend' => 'ExtendClass', |
|
121 | - 'implements' => "NS\IClass", |
|
120 | + 'extend' => 'ExtendClass', |
|
121 | + 'implements' => "NS\IClass", |
|
122 | 122 | ]; |
123 | 123 | $typesReferenceArray = []; |
124 | 124 | $typesDescArray = []; |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | $gClassgenClassgen->setLogger($this->logger); |
137 | 137 | $config = new ClassConfig(); |
138 | 138 | $properties = [ |
139 | - 'extend' => 'ExtendClass', |
|
140 | - 'implements' => [ |
|
139 | + 'extend' => 'ExtendClass', |
|
140 | + 'implements' => [ |
|
141 | 141 | "NS\IClass", |
142 | 142 | "NS\IClass2", |
143 | - ], |
|
143 | + ], |
|
144 | 144 | ]; |
145 | 145 | $typesReferenceArray = []; |
146 | 146 | $typesDescArray = []; |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | $config = new ClassConfig(); |
160 | 160 | $config->haveConstructor = true; |
161 | 161 | $properties = [ |
162 | - 'extend' => 'ExtendClass', |
|
163 | - 'implements' => "NS\IClass", |
|
164 | - 'fields' => [ |
|
162 | + 'extend' => 'ExtendClass', |
|
163 | + 'implements' => "NS\IClass", |
|
164 | + 'fields' => [ |
|
165 | 165 | 'prova' => [ |
166 | - 'primitive' => 'int', |
|
167 | - 'description' => 'identificativo univoco della sessione', |
|
166 | + 'primitive' => 'int', |
|
167 | + 'description' => 'identificativo univoco della sessione', |
|
168 | + ], |
|
168 | 169 | ], |
169 | - ], |
|
170 | 170 | ]; |
171 | 171 | $typesReferenceArray = []; |
172 | 172 | $typesDescArray = []; |
@@ -185,15 +185,15 @@ discard block |
||
185 | 185 | $config = new ClassConfig(); |
186 | 186 | $config->haveConstructor = true; |
187 | 187 | $properties = [ |
188 | - 'extend' => 'ExtendClass', |
|
189 | - 'implements' => "NS\IClass", |
|
190 | - 'fields' => [ |
|
188 | + 'extend' => 'ExtendClass', |
|
189 | + 'implements' => "NS\IClass", |
|
190 | + 'fields' => [ |
|
191 | 191 | 'prova' => [ |
192 | - 'primitive' => 'int', |
|
193 | - 'description' => 'identificativo univoco della sessione', |
|
194 | - 'static' => true, |
|
192 | + 'primitive' => 'int', |
|
193 | + 'description' => 'identificativo univoco della sessione', |
|
194 | + 'static' => true, |
|
195 | + ], |
|
195 | 196 | ], |
196 | - ], |
|
197 | 197 | ]; |
198 | 198 | $typesReferenceArray = []; |
199 | 199 | $typesDescArray = []; |
@@ -212,23 +212,23 @@ discard block |
||
212 | 212 | $config = new ClassConfig(); |
213 | 213 | $config->haveConstructor = true; |
214 | 214 | $properties = [ |
215 | - 'extend' => 'ExtendClass', |
|
216 | - 'implements' => "NS\IClass", |
|
217 | - 'fields' => [ |
|
215 | + 'extend' => 'ExtendClass', |
|
216 | + 'implements' => "NS\IClass", |
|
217 | + 'fields' => [ |
|
218 | 218 | 'prova' => [ |
219 | - 'primitive' => 'int', |
|
220 | - 'description' => 'session unique identifier', |
|
219 | + 'primitive' => 'int', |
|
220 | + 'description' => 'session unique identifier', |
|
221 | 221 | ], |
222 | 222 | 'dependency' => [ |
223 | - 'class' => 'ClassDep', |
|
223 | + 'class' => 'ClassDep', |
|
224 | + ], |
|
224 | 225 | ], |
225 | - ], |
|
226 | 226 | ]; |
227 | 227 | $typesReferenceArray = [ |
228 | - 'ClassDep' => 'NamespaceDep', |
|
228 | + 'ClassDep' => 'NamespaceDep', |
|
229 | 229 | ]; |
230 | 230 | $typesDescArray = [ |
231 | - 'ClassDep' => 'comment ClassDep', |
|
231 | + 'ClassDep' => 'comment ClassDep', |
|
232 | 232 | ]; |
233 | 233 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
234 | 234 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -245,25 +245,25 @@ discard block |
||
245 | 245 | $config = new ClassConfig(); |
246 | 246 | $config->haveConstructor = true; |
247 | 247 | $properties = [ |
248 | - 'extend' => 'ExtendClass', |
|
249 | - 'implements' => "NS\IClass", |
|
250 | - 'fields' => [ |
|
248 | + 'extend' => 'ExtendClass', |
|
249 | + 'implements' => "NS\IClass", |
|
250 | + 'fields' => [ |
|
251 | 251 | 'prova' => [ |
252 | - 'primitive' => 'int', |
|
253 | - 'description' => 'session unique identifier', |
|
254 | - 'autoinizialize' => true, |
|
255 | - 'default' => 0, |
|
252 | + 'primitive' => 'int', |
|
253 | + 'description' => 'session unique identifier', |
|
254 | + 'autoinizialize' => true, |
|
255 | + 'default' => 0, |
|
256 | 256 | ], |
257 | 257 | 'dependency' => [ |
258 | - 'class' => 'ClassDep', |
|
258 | + 'class' => 'ClassDep', |
|
259 | + ], |
|
259 | 260 | ], |
260 | - ], |
|
261 | 261 | ]; |
262 | 262 | $typesReferenceArray = [ |
263 | - 'ClassDep' => 'NamespaceDep', |
|
263 | + 'ClassDep' => 'NamespaceDep', |
|
264 | 264 | ]; |
265 | 265 | $typesDescArray = [ |
266 | - 'ClassDep' => 'comment ClassDep', |
|
266 | + 'ClassDep' => 'comment ClassDep', |
|
267 | 267 | ]; |
268 | 268 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
269 | 269 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -280,25 +280,25 @@ discard block |
||
280 | 280 | $config = new ClassConfig(); |
281 | 281 | $config->haveConstructor = true; |
282 | 282 | $properties = [ |
283 | - 'extend' => 'ExtendClass', |
|
284 | - 'implements' => "NS\IClass", |
|
285 | - 'fields' => [ |
|
283 | + 'extend' => 'ExtendClass', |
|
284 | + 'implements' => "NS\IClass", |
|
285 | + 'fields' => [ |
|
286 | 286 | 'prova' => [ |
287 | - 'primitive' => 'int', |
|
288 | - 'description' => 'session unique identifier', |
|
287 | + 'primitive' => 'int', |
|
288 | + 'description' => 'session unique identifier', |
|
289 | 289 | ], |
290 | 290 | 'dependency' => [ |
291 | - 'class' => 'ClassDep', |
|
292 | - 'autoinizialize' => true, |
|
293 | - 'default' => 'new ClassDep();', |
|
291 | + 'class' => 'ClassDep', |
|
292 | + 'autoinizialize' => true, |
|
293 | + 'default' => 'new ClassDep();', |
|
294 | + ], |
|
294 | 295 | ], |
295 | - ], |
|
296 | 296 | ]; |
297 | 297 | $typesReferenceArray = [ |
298 | - 'ClassDep' => 'NamespaceDep', |
|
298 | + 'ClassDep' => 'NamespaceDep', |
|
299 | 299 | ]; |
300 | 300 | $typesDescArray = [ |
301 | - 'ClassDep' => 'comment ClassDep', |
|
301 | + 'ClassDep' => 'comment ClassDep', |
|
302 | 302 | ]; |
303 | 303 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
304 | 304 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -315,24 +315,24 @@ discard block |
||
315 | 315 | $config = new ClassConfig(); |
316 | 316 | $config->haveConstructor = true; |
317 | 317 | $properties = [ |
318 | - 'extend' => 'ExtendClass', |
|
319 | - 'implements' => "NS\IClass", |
|
320 | - 'fields' => [ |
|
318 | + 'extend' => 'ExtendClass', |
|
319 | + 'implements' => "NS\IClass", |
|
320 | + 'fields' => [ |
|
321 | 321 | 'prova' => [ |
322 | - 'primitive' => 'int', |
|
323 | - 'description' => 'session unique identifier', |
|
324 | - 'getter' => true, |
|
322 | + 'primitive' => 'int', |
|
323 | + 'description' => 'session unique identifier', |
|
324 | + 'getter' => true, |
|
325 | 325 | ], |
326 | 326 | 'dependency' => [ |
327 | - 'class' => 'ClassDep', |
|
328 | - 'autoinizialize' => true, |
|
329 | - 'default' => 'new ClassDep()', |
|
327 | + 'class' => 'ClassDep', |
|
328 | + 'autoinizialize' => true, |
|
329 | + 'default' => 'new ClassDep()', |
|
330 | + ], |
|
330 | 331 | ], |
331 | - ], |
|
332 | 332 | ]; |
333 | 333 | $typesReferenceArray = []; |
334 | 334 | $typesDescArray = [ |
335 | - 'ClassDep' => 'comment ClassDep', |
|
335 | + 'ClassDep' => 'comment ClassDep', |
|
336 | 336 | ]; |
337 | 337 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
338 | 338 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -350,25 +350,25 @@ discard block |
||
350 | 350 | $config->haveConstructor = true; |
351 | 351 | $config->haveGetter = true; |
352 | 352 | $properties = [ |
353 | - 'extend' => 'ExtendClass', |
|
354 | - 'implements' => "NS\IClass", |
|
355 | - 'fields' => [ |
|
353 | + 'extend' => 'ExtendClass', |
|
354 | + 'implements' => "NS\IClass", |
|
355 | + 'fields' => [ |
|
356 | 356 | 'prova' => [ |
357 | - 'primitive' => 'int', |
|
358 | - 'description' => 'session unique identifier', |
|
357 | + 'primitive' => 'int', |
|
358 | + 'description' => 'session unique identifier', |
|
359 | 359 | ], |
360 | 360 | 'dependency' => [ |
361 | - 'class' => 'ClassDep', |
|
362 | - 'autoinizialize' => true, |
|
363 | - 'default' => 'new ClassDep()', |
|
361 | + 'class' => 'ClassDep', |
|
362 | + 'autoinizialize' => true, |
|
363 | + 'default' => 'new ClassDep()', |
|
364 | + ], |
|
364 | 365 | ], |
365 | - ], |
|
366 | 366 | ]; |
367 | 367 | $typesReferenceArray = [ |
368 | - 'ClassDep' => 'NamespaceDep', |
|
368 | + 'ClassDep' => 'NamespaceDep', |
|
369 | 369 | ]; |
370 | 370 | $typesDescArray = [ |
371 | - 'ClassDep' => 'comment ClassDep', |
|
371 | + 'ClassDep' => 'comment ClassDep', |
|
372 | 372 | ]; |
373 | 373 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
374 | 374 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -387,25 +387,25 @@ discard block |
||
387 | 387 | $config->haveGetter = true; |
388 | 388 | $config->haveSetter = true; |
389 | 389 | $properties = [ |
390 | - 'extend' => 'ExtendClass', |
|
391 | - 'implements' => "NS\IClass", |
|
392 | - 'fields' => [ |
|
390 | + 'extend' => 'ExtendClass', |
|
391 | + 'implements' => "NS\IClass", |
|
392 | + 'fields' => [ |
|
393 | 393 | 'prova' => [ |
394 | - 'primitive' => 'int', |
|
395 | - 'description' => 'session unique identifier', |
|
394 | + 'primitive' => 'int', |
|
395 | + 'description' => 'session unique identifier', |
|
396 | 396 | ], |
397 | 397 | 'dependency' => [ |
398 | - 'class' => 'ClassDep', |
|
399 | - 'autoinizialize' => false, |
|
400 | - 'default' => 'new ClassDep()', |
|
398 | + 'class' => 'ClassDep', |
|
399 | + 'autoinizialize' => false, |
|
400 | + 'default' => 'new ClassDep()', |
|
401 | + ], |
|
401 | 402 | ], |
402 | - ], |
|
403 | 403 | ]; |
404 | 404 | $typesReferenceArray = [ |
405 | - 'ClassDep' => 'NamespaceDep', |
|
405 | + 'ClassDep' => 'NamespaceDep', |
|
406 | 406 | ]; |
407 | 407 | $typesDescArray = [ |
408 | - 'ClassDep' => 'comment ClassDep', |
|
408 | + 'ClassDep' => 'comment ClassDep', |
|
409 | 409 | ]; |
410 | 410 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
411 | 411 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -422,31 +422,31 @@ discard block |
||
422 | 422 | $config = new ClassConfig(); |
423 | 423 | $config->haveConstructor = true; |
424 | 424 | $properties = [ |
425 | - 'extend' => 'ExtendClass', |
|
426 | - 'implements' => "NS\IClass", |
|
427 | - 'fields' => [ |
|
425 | + 'extend' => 'ExtendClass', |
|
426 | + 'implements' => "NS\IClass", |
|
427 | + 'fields' => [ |
|
428 | 428 | 'prova' => [ |
429 | - 'primitive' => 'int', |
|
430 | - 'description' => 'session unique identifier', |
|
431 | - 'static' => true, |
|
432 | - 'getter' => true, |
|
433 | - 'setter' => true, |
|
429 | + 'primitive' => 'int', |
|
430 | + 'description' => 'session unique identifier', |
|
431 | + 'static' => true, |
|
432 | + 'getter' => true, |
|
433 | + 'setter' => true, |
|
434 | 434 | ], |
435 | 435 | 'dependency' => [ |
436 | - 'class' => 'ClassDep', |
|
437 | - 'autoinizialize' => true, |
|
438 | - 'default' => 'new ClassDep()', |
|
439 | - 'static' => true, |
|
440 | - 'getter' => true, |
|
441 | - 'setter' => true, |
|
436 | + 'class' => 'ClassDep', |
|
437 | + 'autoinizialize' => true, |
|
438 | + 'default' => 'new ClassDep()', |
|
439 | + 'static' => true, |
|
440 | + 'getter' => true, |
|
441 | + 'setter' => true, |
|
442 | + ], |
|
442 | 443 | ], |
443 | - ], |
|
444 | 444 | ]; |
445 | 445 | $typesReferenceArray = [ |
446 | - 'ClassDep' => 'NamespaceDep', |
|
446 | + 'ClassDep' => 'NamespaceDep', |
|
447 | 447 | ]; |
448 | 448 | $typesDescArray = [ |
449 | - 'ClassDep' => 'comment ClassDep', |
|
449 | + 'ClassDep' => 'comment ClassDep', |
|
450 | 450 | ]; |
451 | 451 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
452 | 452 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -465,27 +465,27 @@ discard block |
||
465 | 465 | $config->haveGetter = true; |
466 | 466 | $config->haveSetter = true; |
467 | 467 | $properties = [ |
468 | - 'extend' => 'ExtendClass', |
|
469 | - 'implements' => "NS\IClass", |
|
470 | - 'fields' => [ |
|
468 | + 'extend' => 'ExtendClass', |
|
469 | + 'implements' => "NS\IClass", |
|
470 | + 'fields' => [ |
|
471 | 471 | 'prova' => [ |
472 | - 'primitive' => 'int', |
|
473 | - 'description' => 'session unique identifier', |
|
474 | - 'static' => true, |
|
472 | + 'primitive' => 'int', |
|
473 | + 'description' => 'session unique identifier', |
|
474 | + 'static' => true, |
|
475 | 475 | ], |
476 | 476 | 'dependency' => [ |
477 | - 'class' => 'ClassDep', |
|
478 | - 'autoinizialize' => true, |
|
479 | - 'default' => 'new ClassDep()', |
|
480 | - 'static' => true, |
|
477 | + 'class' => 'ClassDep', |
|
478 | + 'autoinizialize' => true, |
|
479 | + 'default' => 'new ClassDep()', |
|
480 | + 'static' => true, |
|
481 | + ], |
|
481 | 482 | ], |
482 | - ], |
|
483 | 483 | ]; |
484 | 484 | $typesReferenceArray = [ |
485 | - 'ClassDep' => 'NamespaceDep', |
|
485 | + 'ClassDep' => 'NamespaceDep', |
|
486 | 486 | ]; |
487 | 487 | $typesDescArray = [ |
488 | - 'ClassDep' => 'comment ClassDep', |
|
488 | + 'ClassDep' => 'comment ClassDep', |
|
489 | 489 | ]; |
490 | 490 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
491 | 491 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -504,27 +504,27 @@ discard block |
||
504 | 504 | $config->haveGetter = true; |
505 | 505 | $config->haveSetter = true; |
506 | 506 | $properties = [ |
507 | - 'extend' => 'ExtendClass', |
|
508 | - 'implements' => "NS\IClass", |
|
509 | - 'fields' => [ |
|
507 | + 'extend' => 'ExtendClass', |
|
508 | + 'implements' => "NS\IClass", |
|
509 | + 'fields' => [ |
|
510 | 510 | 'prova' => [ |
511 | - 'primitive' => 'int', |
|
512 | - 'autoinizialize' => true, |
|
513 | - 'default' => 0, |
|
514 | - 'description' => 'session unique identifier', |
|
511 | + 'primitive' => 'int', |
|
512 | + 'autoinizialize' => true, |
|
513 | + 'default' => 0, |
|
514 | + 'description' => 'session unique identifier', |
|
515 | 515 | ], |
516 | 516 | 'dependency' => [ |
517 | - 'class' => 'ClassDep', |
|
518 | - 'autoinizialize' => true, |
|
519 | - 'default' => 'new ClassDep()', |
|
517 | + 'class' => 'ClassDep', |
|
518 | + 'autoinizialize' => true, |
|
519 | + 'default' => 'new ClassDep()', |
|
520 | + ], |
|
520 | 521 | ], |
521 | - ], |
|
522 | 522 | ]; |
523 | 523 | $typesReferenceArray = [ |
524 | - 'ClassDep' => 'TestNamespace', |
|
524 | + 'ClassDep' => 'TestNamespace', |
|
525 | 525 | ]; |
526 | 526 | $typesDescArray = [ |
527 | - 'ClassDep' => 'comment ClassDep', |
|
527 | + 'ClassDep' => 'comment ClassDep', |
|
528 | 528 | ]; |
529 | 529 | $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config); |
530 | 530 | $resourcesDir = __DIR__.'/../Resources/php'; |
@@ -541,13 +541,13 @@ discard block |
||
541 | 541 | $config = new ClassConfig(); |
542 | 542 | $config->isEnum = true; |
543 | 543 | $properties = [ |
544 | - 'fields' => [ |
|
544 | + 'fields' => [ |
|
545 | 545 | 'name' => [ |
546 | - 'primitive' => 'string', |
|
547 | - 'description' => 'nome esplicativo della enum', |
|
548 | - 'getter' => true, |
|
546 | + 'primitive' => 'string', |
|
547 | + 'description' => 'nome esplicativo della enum', |
|
548 | + 'getter' => true, |
|
549 | + ], |
|
549 | 550 | ], |
550 | - ], |
|
551 | 551 | ]; |
552 | 552 | $typesReferenceArray = []; |
553 | 553 | $typesDescArray = []; |
@@ -584,12 +584,12 @@ discard block |
||
584 | 584 | $config->haveConstructor = true; |
585 | 585 | $config->isInterface = true; |
586 | 586 | $properties = [ |
587 | - 'fields' => [ |
|
587 | + 'fields' => [ |
|
588 | 588 | 'prova' => [ |
589 | - 'primitive' => 'int', |
|
590 | - 'description' => 'session unique identifier', |
|
589 | + 'primitive' => 'int', |
|
590 | + 'description' => 'session unique identifier', |
|
591 | + ], |
|
591 | 592 | ], |
592 | - ], |
|
593 | 593 | ]; |
594 | 594 | $typesReferenceArray = []; |
595 | 595 | $typesDescArray = []; |
@@ -609,12 +609,12 @@ discard block |
||
609 | 609 | $config->haveGetter = true; |
610 | 610 | $config->isInterface = true; |
611 | 611 | $properties = [ |
612 | - 'fields' => [ |
|
612 | + 'fields' => [ |
|
613 | 613 | 'prova' => [ |
614 | - 'primitive' => 'int', |
|
615 | - 'description' => 'session unique identifier', |
|
614 | + 'primitive' => 'int', |
|
615 | + 'description' => 'session unique identifier', |
|
616 | + ], |
|
616 | 617 | ], |
617 | - ], |
|
618 | 618 | ]; |
619 | 619 | $typesReferenceArray = []; |
620 | 620 | $typesDescArray = []; |
@@ -631,22 +631,22 @@ discard block |
||
631 | 631 | $gClassgen->setLogger($this->logger); |
632 | 632 | $config = new ClassConfig(); |
633 | 633 | $properties = [ |
634 | - 'extend' => 'ExtendClass', |
|
635 | - 'implements' => 'IClass', |
|
636 | - 'methods' => [ |
|
634 | + 'extend' => 'ExtendClass', |
|
635 | + 'implements' => 'IClass', |
|
636 | + 'methods' => [ |
|
637 | 637 | 'methodName' => [ |
638 | - 'params' => [ |
|
638 | + 'params' => [ |
|
639 | 639 | 'prova' => [ |
640 | - 'primitive' => 'int', |
|
641 | - 'description' => 'session unique identifier', |
|
640 | + 'primitive' => 'int', |
|
641 | + 'description' => 'session unique identifier', |
|
642 | 642 | ], |
643 | 643 | 'prova2' => [ |
644 | - 'primitive' => 'string', |
|
645 | - 'description' => 'campo generico', |
|
644 | + 'primitive' => 'string', |
|
645 | + 'description' => 'campo generico', |
|
646 | 646 | ], |
647 | - ], |
|
647 | + ], |
|
648 | + ], |
|
648 | 649 | ], |
649 | - ], |
|
650 | 650 | ]; |
651 | 651 | $typesReferenceArray = []; |
652 | 652 | $typesDescArray = []; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | public static function setupErrorHandling() |
31 | 31 | { |
32 | - set_exception_handler(function ($exception) { |
|
32 | + set_exception_handler(function($exception) { |
|
33 | 33 | self::generateCallTrace($exception); |
34 | 34 | }); |
35 | 35 | } |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | $rym->readYaml($baseDirectory.'/'.$fileName); |
36 | 36 | $prop = $rym->getProperties(); |
37 | 37 | $propExpected = [ |
38 | - 'ddd' => [], |
|
39 | - 'classes' => [], |
|
38 | + 'ddd' => [], |
|
39 | + 'classes' => [], |
|
40 | 40 | ]; |
41 | 41 | $this->assertEquals($propExpected, $prop, 'corretta lettura yml'); |
42 | 42 | } |
@@ -63,23 +63,23 @@ discard block |
||
63 | 63 | $rym->readYaml($baseDirectory.'/'.$fileName); |
64 | 64 | $prop = $rym->getProperties(); |
65 | 65 | $propExpected = [ |
66 | - 'ddd' => [ |
|
66 | + 'ddd' => [ |
|
67 | 67 | 'vo' => [ |
68 | - 'package' => "Yoghi\Bundle\Madda\Domain\ValueObject", |
|
69 | - 'getter' => 1, |
|
68 | + 'package' => "Yoghi\Bundle\Madda\Domain\ValueObject", |
|
69 | + 'getter' => 1, |
|
70 | 70 | ], |
71 | - ], |
|
72 | - 'classes' => [ |
|
71 | + ], |
|
72 | + 'classes' => [ |
|
73 | 73 | 'TestEnum' => [ |
74 | - 'ddd' => ['type' => 'vo'], |
|
75 | - 'name' => 'TestEnum', |
|
76 | - 'description' => 'Test Enum', |
|
77 | - 'namespace' => 'Yoghi\Bundle\Madda\Domain\ValueObject', |
|
78 | - 'enum' => [ |
|
74 | + 'ddd' => ['type' => 'vo'], |
|
75 | + 'name' => 'TestEnum', |
|
76 | + 'description' => 'Test Enum', |
|
77 | + 'namespace' => 'Yoghi\Bundle\Madda\Domain\ValueObject', |
|
78 | + 'enum' => [ |
|
79 | 79 | 'TEST', |
80 | - ], |
|
80 | + ], |
|
81 | + ], |
|
81 | 82 | ], |
82 | - ], |
|
83 | 83 | ]; |
84 | 84 | $this->assertEquals($propExpected, $prop, 'corretta lettura yml'); |
85 | 85 | } |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | $prop = $rym->getClassesDefinition(); |
104 | 104 | $propExpected = [ |
105 | 105 | 'TestEnum' => [ |
106 | - 'ddd' => ['type' => 'vo'], |
|
107 | - 'name' => 'TestEnum', |
|
108 | - 'description' => 'Test Enum', |
|
109 | - 'namespace' => 'Yoghi\Bundle\Madda\Domain\ValueObject', |
|
110 | - 'enum' => ['TEST'], |
|
111 | - ], |
|
106 | + 'ddd' => ['type' => 'vo'], |
|
107 | + 'name' => 'TestEnum', |
|
108 | + 'description' => 'Test Enum', |
|
109 | + 'namespace' => 'Yoghi\Bundle\Madda\Domain\ValueObject', |
|
110 | + 'enum' => ['TEST'], |
|
111 | + ], |
|
112 | 112 | ]; |
113 | 113 | $this->assertEquals($propExpected, $prop, 'corretta lettura yml'); |
114 | 114 | } |