Completed
Push — develop ( b5dddc...8dd5aa )
by Freddie
04:50
created

FkRequestBuilder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPathTemplate() 0 3 1
A __construct() 0 6 1
A getFileTemplate() 0 3 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of FlexPHP.
4
 *
5
 * (c) Freddie Gar <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace FlexPHP\Generator\Domain\Builders\Message;
11
12
use FlexPHP\Generator\Domain\Builders\AbstractBuilder;
13
14
final class FkRequestBuilder extends AbstractBuilder
15
{
16
    public function __construct(string $pkEntity, string $fkEntity)
17
    {
18
        $pkEntity = $this->getPascalCase($this->getSingularize($pkEntity));
19
        $fkEntity = $this->getPascalCase($this->getSingularize($fkEntity));
20
21
        parent::__construct(\compact('pkEntity', 'fkEntity'));
22
    }
23
24
    protected function getFileTemplate(): string
25
    {
26
        return 'FkRequest.php.twig';
27
    }
28
29
    protected function getPathTemplate(): string
30
    {
31
        return \sprintf('%1$s/FlexPHP/Message', parent::getPathTemplate());
32
    }
33
}
34