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

ClassGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplateName() 0 3 1
A getFile() 0 3 1
1
<?php
2
3
namespace Jellyfish\Transfer\Generator;
4
5
use Jellyfish\Transfer\Definition\ClassDefinition;
6
use Jellyfish\Transfer\Definition\ClassDefinitionInterface;
7
8
class ClassGenerator extends AbstractClassGenerator
9
{
10
    protected const TEMPLATE_NAME = '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() . static::FILE_EXTENSION;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    protected function getTemplateName(): string
26
    {
27
        return static::TEMPLATE_NAME;
28
    }
29
}
30