Completed
Pull Request — master (#29)
by
unknown
06:10
created

MutationTypeConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 28
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __get() 0 8 2
1
<?php
2
3
namespace Softonic\GraphQL\Config;
4
5
use Softonic\GraphQL\Traits\JsonPathAccessor;
6
7
class MutationTypeConfig
8
{
9
    use JsonPathAccessor;
10
11
    /**
12
     * @var string
13
     */
14
    public $type;
15
16
    /**
17
     * @var string
18
     */
19
    public $linksTo;
20
21
    /**
22
     * @var array
23
     */
24
    public $children = [];
25
26
    public function __get(string $propertyName)
27
    {
28
        if (property_exists(static::class, $propertyName)) {
29
            return $this->{$propertyName};
30
        }
31
32
        return $this->children[$propertyName];
33
    }
34
}
35