Completed
Branch v1.x-dev (5c2708)
by Benjamin
04:14
created

SkillsQuantity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Obblm\Core\Validator\Constraints\Team;
4
5
use Obblm\Core\Contracts\RuleHelperInterface;
6
use Symfony\Component\Validator\Constraint;
7
8
class SkillsQuantity extends Constraint
9
{
10
    public $limitMessage = 'obblm.constraints.skills.quantity.violation';
11
    public $limitByTypeMessage = 'obblm.constraints.skills.quantity_type.violation';
12
    public $limitByPlayerMessage = 'obblm.constraints.skills.quantity_player.violation';
13
14
    public $helper;
15
    public $context;
16
17
    public function __construct($context = ['single', 'double'], $options = null)
18
    {
19
        parent::__construct($options);
20
        $this->context = $context;
21
    }
22
23
    public function validatedBy()
24
    {
25
        return get_class($this).'Validator';
26
    }
27
}
28