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.
Completed
Pull Request — master (#154)
by joseph
34:48
created

TemplateEntityIsValidConstraint::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 declare(strict_types=1);
2
3
namespace TemplateNamespace\Validation\Constraints;
4
5
use Symfony\Component\Validator\Constraint;
6
7
/**
8
 * This is a template Entity constraint.
9
 *
10
 * The Constraint does very little other than specify a message and imply a
11
 * ConstraintValidator with the same FQN as this class, but with `Validator` appended.
12
 *
13
 * @see https://symfony.com/doc/2.6/cookbook/validation/custom_constraint.html
14
 *
15
 * Suggest using the `./bin/doctrine dsm:override:create` command to create a new
16
 * override straight after you generate the file.
17
 *
18
 * Then you can edit it and update your override as required using
19
 * `./bin/doctrine dsm:overrides:update -a fromProject`
20
 *
21
 * And then reapply after a new build using
22
 * `./bin/doctrine dsm:overrides:update -a toProject`
23
 *
24
 */
25
class TemplateEntityIsValidConstraint extends Constraint
26
{
27
    public const VALUE_TYPE = 'TemplateEntity';
28
29
    public const MESSAGE = 'The value {{ string }} is not a valid ' . self::VALUE_TYPE;
30
31
    public $message = self::MESSAGE;
32
33
34
    /**
35
     * Returns whether the constraint can be put onto classes, properties or
36
     * both.
37
     *
38
     * This method should return one or more of the constants
39
     * self::CLASS_CONSTRAINT and self::PROPERTY_CONSTRAINT.
40
     *
41
     * @return string|array One or more constant values
42
     */
43
    public function getTargets(): string
44
    {
45
        return self::CLASS_CONSTRAINT;
46
    }
47
48
    public function validatedBy(): string
49
    {
50
        return TemplateEntityIsValidConstraintValidator::class;
51
    }
52
}