CommandData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 2
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace PWWEB\Artomator\Common;
4
5
use Illuminate\Console\Command;
6
use InfyOm\Generator\Common\CommandData as Data;
7
use InfyOm\Generator\Common\TemplatesManager;
8
9
class CommandData extends Data
10
{
11
    /**
12
     * Command type graphql.
13
     *
14
     * @var string
15
     */
16
    public static $COMMAND_TYPE_GRAPHQL = 'graphql';
17
    /**
18
     * Command type graphql_scaffold.
19
     *
20
     * @var string
21
     */
22
    public static $COMMAND_TYPE_GRAPHQL_SCAFFOLD = 'graphql_scaffold';
23
24
    /**
25
     * Constructor.
26
     *
27
     * @param Command          $commandObj       Command object.
28
     * @param string|string[]  $commandType      Commant type.
29
     * @param TemplatesManager $templatesManager Template Manager.
30
     */
31
    public function __construct(Command $commandObj, $commandType, TemplatesManager $templatesManager = null)
32
    {
33
        parent::__construct($commandObj, $commandType, $templatesManager);
0 ignored issues
show
Bug introduced by
It seems like $commandType can also be of type string[]; however, parameter $commandType of InfyOm\Generator\Common\CommandData::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

33
        parent::__construct($commandObj, /** @scrutinizer ignore-type */ $commandType, $templatesManager);
Loading history...
34
35
        $this->config = new GeneratorConfig();
36
    }
37
}
38