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
Pull Request — master (#170)
by Ross
21:43 queued 18:45
created

JsonData::getTargets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Validation\Constraints\FieldConstraints;
4
5
use Symfony\Component\Validator\Constraint;
6
7
/**
8
 * This is a template constraint. The Constraint does very little other than specify a message and imply a
9
 * ConstraintValidator with the same FQN as this class, but with `Validator` appended.
10
 *
11
 * @see https://symfony.com/doc/2.6/cookbook/validation/custom_constraint.html
12
 *
13
 * Suggest using the `./bin/doctrine dsm:override:create` command to create a new
14
 * override straight after you generate the file.
15
 *
16
 * Then you can edit it and update your override as required using
17
 * `./bin/doctrine dsm:overrides:update -a fromProject`
18
 *
19
 * And then reapply after a new build using
20
 * `./bin/doctrine dsm:overrides:update -a toProject`
21
 *
22
 */
23
class JsonData extends Constraint
24
{
25
    public const VALUE_TYPE = '(template value type)';
26
27
    public const MESSAGE = 'The value {{ string }} is not a valid JSON. Got the following error {{ error }} ' .
28
                           self::VALUE_TYPE;
29
30
    public $payload = self::MESSAGE;
31
32
33
    /**
34
     * Returns whether the constraint can be put onto classes, properties or
35
     * both.
36
     *
37
     * This method should return one or more of the constants
38
     * self::CLASS_CONSTRAINT and self::PROPERTY_CONSTRAINT.
39
     *
40
     * @return string One or more constant values
41
     */
42
    public function getTargets(): string
43
    {
44
        return self::PROPERTY_CONSTRAINT;
45
    }
46
}