ClassGenerator   A
last analyzed

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
declare(strict_types=1);
4
5
namespace Jellyfish\Transfer\Generator;
6
7
use Jellyfish\Transfer\Definition\ClassDefinitionInterface;
8
9
class ClassGenerator extends AbstractClassGenerator
10
{
11
    protected const TEMPLATE_NAME = 'class.twig';
12
13
    /**
14
     * @param \Jellyfish\Transfer\Definition\ClassDefinitionInterface $classDefinition
15
     *
16
     * @return string
17
     */
18
    protected function getFile(ClassDefinitionInterface $classDefinition): string
19
    {
20
        return $classDefinition->getName() . static::FILE_EXTENSION;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    protected function getTemplateName(): string
27
    {
28
        return static::TEMPLATE_NAME;
29
    }
30
}
31