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 (#56)
by Arthur
02:31 queued 01:15
created

ValidateableDto::validateProperty()   A

Complexity

Conditions 4
Paths 2

Size

Total Lines 9

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
dl 9
loc 9
rs 9.9666
c 0
b 0
f 0
cc 4
nc 2
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: tony
5
 * Date: 27.03.19
6
 * Time: 13:37.
7
 */
8
9
namespace Spatie\DataTransferObject;
10
11
class ValidateableDto extends DataTransferObject
12
{
13
    /**
14
     * Check if property passes the basic conditions.
15
     * @param Property $property
16
     * @param array $parameters
17
     */
18 View Code Duplication
    protected function validateProperty($property, array $parameters): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
    {
20
        if (! array_key_exists($property->getName(), $parameters)
21
            && is_null($property->getDefault())
22
            && ! $property->isNullable()
23
        ) {
24
            throw DataTransferObjectError::uninitialized($property);
25
        }
26
    }
27
}
28