Completed
Push — master ( d898e2...4cc160 )
by Kamil
19:55
created

PromotionDateRange::validatedBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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\PromotionBundle\Validator\Constraints;
13
14
use Symfony\Component\Validator\Constraint;
15
16
/**
17
 * @author Łukasz Chruściel <[email protected]>
18
 */
19
class PromotionDateRange extends Constraint
20
{
21
    public $message = 'sylius.promotion.startsAt.end_date_cannot_be_set_prior_start_date';
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function getTargets()
27
    {
28
        return [self::CLASS_CONSTRAINT];
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function validatedBy()
35
    {
36
        return 'sylius_promotion_date_range_validator';
37
    }
38
}
39