Passed
Push — master ( 9de3df...49c81a )
by Richard
11:22 queued 11s
created

GeneratorConfig::loadPaths()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 3
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PWWEB\Artomator\Common;
4
5
use InfyOm\Generator\Common\CommandData as Data;
6
use InfyOm\Generator\Common\GeneratorConfig as Config;
7
8
class GeneratorConfig extends Config
9
{
10
    /* Path variables */
11
    public $pathGraphQL;
12
13
    public function loadPaths()
14
    {
15
        parent::loadPaths();
16
17
        $this->pathGraphQL = config('lighthouse.schema.register', base_path('graphql/schema.graphql'));
18
    }
19
20
    public function loadDynamicVariables(Data &$commandData)
21
    {
22
        parent::loadDynamicVariables($commandData);
23
        $commandData->addDynamicVariable('$LICENSE_PACKAGE$', config('pwweb.artomator.license.package'));
24
        $commandData->addDynamicVariable('$LICENSE_AUTHORS$', license_authors(config('pwweb.artomator.license.authors')));
25
        $commandData->addDynamicVariable('$LICENSE_COPYRIGHT$', config('pwweb.artomator.license.copyright'));
26
        $commandData->addDynamicVariable('$LICENSE$', config('pwweb.artomator.license.license'));
27
        $commandData->addDynamicVariable('$NAMESPACE_GRAPHQL_MODEL$', str_replace('\\', '\\\\', $this->nsModel));
28
29
        return $commandData;
30
    }
31
}
32