Completed
Push — symfony3-wololo-packages ( fecf70...6bf04d )
by Kamil
28:46 queued 11:35
created

HasAllPricesDefined   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 4 1
A getTargets() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Bundle\CoreBundle\Validator\Constraints;
13
14
use Symfony\Component\Validator\Constraint;
15
16
/**
17
 * @author Mateusz Zalewski <[email protected]>
18
 */
19
final class HasAllPricesDefined extends Constraint
20
{
21
    /**
22
     * @var string
23
     */
24
    public $message = 'You must define price for every channel.';
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function validatedBy()
30
    {
31
        return 'sylius_has_all_prices_defined';
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getTargets()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
38
    {
39
        return Constraint::CLASS_CONSTRAINT;
40
    }
41
}
42