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.

Code Duplication    Length = 17-17 lines in 4 locations

src/Service/JobValidator/PropertyValidator/IsArray.php 1 location

@@ 18-34 (lines=17) @@
15
use Chapi\Entity\Chronos\JobEntity;
16
use Chapi\Service\JobValidator\PropertyValidatorInterface;
17
18
class IsArray extends AbstractPropertyValidator implements PropertyValidatorInterface
19
{
20
    const DIC_NAME = 'IsArrayValidator';
21
    const MESSAGE_TEMPLATE = '"%s" is not an array';
22
23
    /**
24
     * @inheritDoc
25
     */
26
    public function isValid($sProperty, JobEntity $oJobEntity)
27
    {
28
        return $this->returnIsValidHelper(
29
            is_array($oJobEntity->{$sProperty}),
30
            $sProperty,
31
            self::MESSAGE_TEMPLATE
32
        );
33
    }
34
}

src/Service/JobValidator/PropertyValidator/IsBoolean.php 1 location

@@ 17-33 (lines=17) @@
14
use Chapi\Entity\Chronos\JobEntity;
15
use Chapi\Service\JobValidator\PropertyValidatorInterface;
16
17
class IsBoolean extends AbstractPropertyValidator implements PropertyValidatorInterface
18
{
19
    const DIC_NAME = 'BooleanValidator';
20
    const MESSAGE_TEMPLATE = '"%s" is not boolean';
21
22
    /**
23
     * @inheritDoc
24
     */
25
    public function isValid($sProperty, JobEntity $oJobEntity)
26
    {
27
        return $this->returnIsValidHelper(
28
            is_bool($oJobEntity->{$sProperty}),
29
            $sProperty,
30
            self::MESSAGE_TEMPLATE
31
        );
32
    }
33
}

src/Service/JobValidator/PropertyValidator/NotEmpty.php 1 location

@@ 16-32 (lines=17) @@
13
use Chapi\Entity\Chronos\JobEntity;
14
use Chapi\Service\JobValidator\PropertyValidatorInterface;
15
16
class NotEmpty extends AbstractPropertyValidator implements PropertyValidatorInterface
17
{
18
    const DIC_NAME = 'NotEmptyValidator';
19
    const MESSAGE_TEMPLATE = '"%s" is empty';
20
    
21
    /**
22
     * @inheritDoc
23
     */
24
    public function isValid($sProperty, JobEntity $oJobEntity)
25
    {
26
        return $this->returnIsValidHelper(
27
            !empty($oJobEntity->{$sProperty}),
28
            $sProperty,
29
            self::MESSAGE_TEMPLATE
30
        );
31
    }
32
}

src/Service/JobValidator/PropertyValidator/Retries.php 1 location

@@ 16-32 (lines=17) @@
13
use Chapi\Entity\Chronos\JobEntity;
14
use Chapi\Service\JobValidator\PropertyValidatorInterface;
15
16
class Retries extends AbstractPropertyValidator implements PropertyValidatorInterface
17
{
18
    const DIC_NAME = 'RetriesValidator';
19
    const MESSAGE_TEMPLATE = '"%s" is not numeric or greater than or equal 0';
20
21
    /**
22
     * @inheritDoc
23
     */
24
    public function isValid($sProperty, JobEntity $oJobEntity)
25
    {
26
        return $this->returnIsValidHelper(
27
            (is_numeric($oJobEntity->{$sProperty}) && $oJobEntity->{$sProperty} >= 0),
28
            $sProperty,
29
            self::MESSAGE_TEMPLATE
30
        );
31
    }
32
}