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

EntiteGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generate() 0 7 1
A getFichiers() 0 12 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