Completed
Push — master ( 993468...5fd9a9 )
by Markus
12s queued 10s
created

FactoryClassGenerator::getTemplateName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Jellyfish\Transfer\Generator;
4
5
use Jellyfish\Transfer\Definition\ClassDefinition;
6
use Jellyfish\Transfer\Definition\ClassDefinitionInterface;
7
8
class FactoryClassGenerator extends AbstractClassGenerator
9
{
10
    protected const TEMPLATE_NAME = 'factory-class.twig';
11
12
    /**
13
     * @param \Jellyfish\Transfer\Definition\ClassDefinitionInterface $classDefinition
14
     *
15
     * @return string
16
     */
17
    protected function getFile(ClassDefinitionInterface $classDefinition): string
18
    {
19
        return $classDefinition->getName() . ClassDefinition::FACTORY_NAME_SUFFIX . static::FILE_EXTENSION;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    protected function getTemplateName(): string
26
    {
27
        return static::TEMPLATE_NAME;
28
    }
29
}
30