Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public static function setUpProperties($properties, JsonBasicSchema $ownerSchema) |
||
35 | { |
||
36 | $properties->type = JsonBasicSchema::string(); |
||
37 | $properties->type->enum = array ( |
||
38 | 0 => 'oauth2', |
||
39 | ); |
||
40 | $properties->flow = JsonBasicSchema::string(); |
||
41 | $properties->flow->enum = array ( |
||
42 | 0 => 'application', |
||
43 | ); |
||
44 | $properties->scopes = JsonBasicSchema::object(); |
||
45 | $properties->scopes->additionalProperties = JsonBasicSchema::string(); |
||
46 | $properties->tokenUrl = JsonBasicSchema::string(); |
||
47 | $properties->tokenUrl->format = 'uri'; |
||
48 | $properties->description = JsonBasicSchema::string(); |
||
49 | $ownerSchema->type = 'object'; |
||
|
|||
50 | $ownerSchema->additionalProperties = false; |
||
51 | $ownerSchema->patternProperties['^x-'] = new JsonBasicSchema(); |
||
52 | $ownerSchema->patternProperties['^x-']->description = 'Any property starting with x- is valid.'; |
||
53 | $ownerSchema->required = array ( |
||
54 | 0 => 'type', |
||
55 | 1 => 'flow', |
||
56 | 2 => 'tokenUrl', |
||
57 | ); |
||
58 | } |
||
59 | } |
||
61 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..