GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 8b8261...ca491d )
by Christian
02:27
created

DateAfter::validatedBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
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 Core23\FormExtensions\Validator\Constraints;
13
14
use Symfony\Component\Validator\Constraint;
15
use Symfony\Component\Validator\Exception\InvalidArgumentException;
16
use Symfony\Component\Validator\Exception\MissingOptionsException;
17
18
final class DateAfter extends Constraint
19
{
20
    /**
21
     * @var string
22
     */
23
    public $firstField;
24
25
    /**
26
     * @var string
27
     */
28
    public $secondField;
29
30
    /**
31
     * @var string
32
     */
33
    public $message = 'error.second_date_before_first';
34
35
    /**
36
     * @var string
37
     */
38
    public $emptyMessage = 'error.date_part_empty';
39
40
    /**
41
     * @var bool
42
     */
43
    public $required = true;
44
45
    /**
46
     * @param array $options
47
     */
48
    public function __construct($options = null)
49
    {
50
        parent::__construct($options);
51
52
        if (null === $this->firstField || null === $this->secondField) {
53
            throw new MissingOptionsException('The options "firstField" and "secondField" must be given for constraint '.__CLASS__, ['firstField', 'secondField']);
54
        } elseif ($this->firstField === $this->secondField) {
55
            throw new InvalidArgumentException('The options "firstField" and "secondField" can not be the same for constraint '.__CLASS__);
56
        }
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getTargets()
63
    {
64
        return self::CLASS_CONSTRAINT;
65
    }
66
}
67