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

GeneratorConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 5
b 0
f 0
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadPaths() 0 5 1
A loadDynamicVariables() 0 10 1
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