ArgumentsAwareObjectTrait   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A addArgument() 0 4 1
A removeArgument() 0 4 1
A getArguments() 0 4 1
A getArgument() 0 4 1
A hasArgument() 0 4 1
A hasArguments() 0 4 1
1
<?php
2
/*
3
 * This file is a part of GraphQL project.
4
 *
5
 * @author Alexandr Viniychuk <[email protected]>
6
 * created: 5:07 PM 5/14/16
7
 */
8
9
namespace Youshido\GraphQL\Type\Traits;
10
11
12
use Youshido\GraphQL\Config\Traits\ConfigAwareTrait;
13
14
/**
15
 * Class ArgumentsAwareObjectTrait
16
 * @package    Youshido\GraphQL\Type\Traits
17
 * @codeCoverageIgnore
18
 *
19
 * @deprecated To be removed during the release optimization
20
 */
21
trait ArgumentsAwareObjectTrait
22
{
23
    use ConfigAwareTrait;
24
25
    public function addArgument($argument, $argumentInfo = null)
26
    {
27
        return $this->getConfig()->addArgument($argument, $argumentInfo);
28
    }
29
30
    public function removeArgument($argumentName)
31
    {
32
        return $this->getConfig()->removeArgument($argumentName);
33
    }
34
35
    public function getArguments()
36
    {
37
        return $this->getConfig()->getArguments();
38
    }
39
40
    public function getArgument($argumentName)
41
    {
42
        return $this->getConfig()->getArgument($argumentName);
43
    }
44
45
    public function hasArgument($argumentName)
46
    {
47
        return $this->getConfig()->hasArgument($argumentName);
48
    }
49
50
    public function hasArguments()
51
    {
52
        return $this->getConfig()->hasArguments();
53
    }
54
55
}
56