ClassGenerator::getFile()   A
last analyzed

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 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