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.

Schema::__construct()   A
last analyzed

Complexity

Conditions 4
Paths 6

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 11
cts 11
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 7
nc 6
nop 2
crap 4
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\Images\v2\Models;
4
5
use JsonSchema\Validator;
6
7
class Schema extends \OpenStack\Common\JsonSchema\Schema
8
{
9 2
    public function __construct($data, Validator $validator = null)
10
    {
11 2
        if (!isset($data->type)) {
12 2
            $data->type = 'object';
13 2
        }
14
15 2
        foreach ($data->properties as $propertyName => &$property) {
16 2
            if (strpos($property->description, 'READ-ONLY') !== false) {
17 2
                $property->readOnly = true;
18 2
            }
19 2
        }
20
21 2
        parent::__construct($data, $validator);
22 2
    }
23
}
24