Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public static function setUpProperties($properties, JsonBasicSchema $ownerSchema) |
||
29 | { |
||
30 | $properties->name = JsonBasicSchema::string(); |
||
31 | $properties->description = JsonBasicSchema::string(); |
||
32 | $properties->externalDocs = ExternalDocs::schema(); |
||
33 | $ownerSchema->type = 'object'; |
||
|
|||
34 | $ownerSchema->additionalProperties = false; |
||
35 | $ownerSchema->patternProperties['^x-'] = new JsonBasicSchema(); |
||
36 | $ownerSchema->patternProperties['^x-']->description = 'Any property starting with x- is valid.'; |
||
37 | $ownerSchema->required = array ( |
||
38 | 0 => 'name', |
||
39 | ); |
||
40 | } |
||
41 | } |
||
43 |
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..