Code Duplication    Length = 26-26 lines in 2 locations

Builder/Admin/EditBuilder.php 1 location

@@ 12-37 (lines=26) @@
9
 * @author Piotr Gołębiewski <[email protected]>
10
 * @author Stéphane Escandell <[email protected]>
11
 */
12
class EditBuilder extends BaseBuilder
13
{
14
    /**
15
     * (non-PHPdoc)
16
     * @see Admingenerator\GeneratorBundle\Builder.BaseBuilder::getYamlKey()
17
     */
18
    public function getYamlKey()
19
    {
20
        return 'edit';
21
    }
22
23
    /**
24
     * Retrieve the FQCN formType used by this builder
25
     *
26
     * @return string
27
     */
28
    public function getFormType()
29
    {
30
        return sprintf(
31
            '%s%s\\Form\Type\\%s\\EditType',
32
            $this->getVariable('namespace_prefix') ? $this->getVariable('namespace_prefix') . '\\' : '',
33
            $this->getVariable('bundle_name'),
34
            $this->getBaseGeneratorName()
35
        );
36
    }
37
}
38

Builder/Admin/NewBuilder.php 1 location

@@ 12-37 (lines=26) @@
9
 * @author Piotr Gołębiewski <[email protected]>
10
 * @author Stéphane Escandell <[email protected]>
11
 */
12
class NewBuilder extends BaseBuilder
13
{
14
    /**
15
     * (non-PHPdoc)
16
     * @see Admingenerator\GeneratorBundle\Builder.BaseBuilder::getYamlKey()
17
     */
18
    public function getYamlKey()
19
    {
20
        return 'new';
21
    }
22
23
    /**
24
     * Retrieve the FQCN formType used by this builder
25
     *
26
     * @return string
27
     */
28
    public function getFormType()
29
    {
30
        return sprintf(
31
            '%s%s\\Form\Type\\%s\\NewType',
32
            $this->getVariable('namespace_prefix') ? $this->getVariable('namespace_prefix') . '\\' : '',
33
            $this->getVariable('bundle_name'),
34
            $this->getBaseGeneratorName()
35
        );
36
    }
37
}
38