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

SkillsQuantity   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 6
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 3 1
A __construct() 0 4 1
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