Completed
Push — master ( b5df5f...40ac5f )
by Guillaume
02:47
created

EntiteGenerator::generate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace Starkerxp\StructureBundle\Generator;
4
5
6
class EntiteGenerator extends AbstractGenerator
7
{
8
    public function generate($entite)
9
    {
10
        $bundle = $this->kernel->getBundle(explode(':', $entite)[0]);
11
        $libelle = ucfirst(explode(':', $entite)[1]);
12
        $parameters = $this->genererParameters("Entity", $entite);
13
        $this->traiterLesFichiers($bundle, $parameters, ["_nomEntity_"], [$libelle]);
14
    }
15
16
    public function getFichiers()
17
    {
18
        return [
19
            '/Resources/config/managers.yml',
20
            '/Entity/_nomEntity_.php',
21
            '/Manager/_nomEntity_Manager.php',
22
            '/Repository/_nomEntity_Repository.php',
23
            '/Tests/Manager/_nomEntity_ManagerTest.php',
24
            '/Tests/DataFixtures/_nomEntity_Manager/_nomEntity_Manager.yml',
25
            '/Tests/DataFixtures/_nomEntity_Manager/Default_nomEntity_.yml',
26
        ];
27
    }
28
29
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
30