ConstraintViolationParameter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 44
c 0
b 0
f 0
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getValue() 0 3 1
A getName() 0 3 1
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Model;
12
13
use Ynlo\GraphQLBundle\Annotation as GraphQL;
14
15
/**
16
 * @GraphQL\ObjectType()
17
 */
18
class ConstraintViolationParameter
19
{
20
    /**
21
     * @var string
22
     *
23
     * @GraphQL\Field(type="string!",
24
     *     description="Parameter name to use as placeholder in ConstraintViolation.messageTemplate")
25
     */
26
    protected $name;
27
28
    /**
29
     * @var string
30
     *
31
     * @GraphQL\Field(type="string!",
32
     *     description="Parameter value to replace")
33
     */
34
    protected $value;
35
36
    /**
37
     * ConstraintViolationParameter constructor.
38
     *
39
     * @param string $name
40
     * @param string $value
41
     */
42
    public function __construct($name, $value)
43
    {
44
        $this->name = $name;
45
        $this->value = $value;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getName(): string
52
    {
53
        return $this->name;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getValue(): string
60
    {
61
        return $this->value;
62
    }
63
}
64