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
Push — master ( 354c7c...907f89 )
by Jamie
05:42
created

Schema   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10
ccs 11
cts 11
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 4
1
<?php
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
    }
23
}