ClassGeneratorFacadeDefault   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 30
ccs 9
cts 9
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createDefaultDependencyInjectionObject() 0 8 1
A __construct() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 *  This file is part of the Micro framework package.
7
 *
8
 *  (c) Stanislau Komar <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Micro\Library\DTO;
15
16
use Psr\Log\LoggerInterface;
17
18
class ClassGeneratorFacadeDefault extends GeneratorFacade
19
{
20
    /**
21
     * @param array<string>        $filesSchemeCollection
22
     * @param string               $outputPath
23
     * @param string               $namespaceGeneral
24
     * @param string               $classSuffix
25
     * @param LoggerInterface|null $logger
26
     */
27 6
    public function __construct(
28
        private array $filesSchemeCollection,
29
        private string $outputPath,
30
        private string $namespaceGeneral = '',
31
        private string $classSuffix = 'Transfer',
32
        private null|LoggerInterface $logger = null
33
    ) {
34 6
        parent::__construct($this->createDefaultDependencyInjectionObject());
35
    }
36
37
    /**
38
     * @return DependencyInjectionInterface
39
     */
40 6
    protected function createDefaultDependencyInjectionObject(): DependencyInjectionInterface
41
    {
42 6
        return new DependencyInjection(
43 6
            $this->filesSchemeCollection,
44 6
            $this->namespaceGeneral,
45 6
            $this->classSuffix,
46 6
            $this->outputPath,
47 6
            $this->logger
48 6
        );
49
    }
50
}
51