| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public static function setUpProperties($properties, JsonBasicSchema $ownerSchema) |
||
| 32 | { |
||
| 33 | $properties->type = JsonBasicSchema::string(); |
||
| 34 | $properties->type->enum = array ( |
||
| 35 | 0 => 'apiKey', |
||
| 36 | ); |
||
| 37 | $properties->name = JsonBasicSchema::string(); |
||
| 38 | $properties->in = JsonBasicSchema::string(); |
||
| 39 | $properties->in->enum = array ( |
||
| 40 | 0 => 'header', |
||
| 41 | 1 => 'query', |
||
| 42 | ); |
||
| 43 | $properties->description = JsonBasicSchema::string(); |
||
| 44 | $ownerSchema->type = 'object'; |
||
|
|
|||
| 45 | $ownerSchema->additionalProperties = false; |
||
| 46 | $ownerSchema->patternProperties['^x-'] = new JsonBasicSchema(); |
||
| 47 | $ownerSchema->patternProperties['^x-']->description = 'Any property starting with x- is valid.'; |
||
| 48 | $ownerSchema->required = array ( |
||
| 49 | 0 => 'type', |
||
| 50 | 1 => 'name', |
||
| 51 | 2 => 'in', |
||
| 52 | ); |
||
| 53 | } |
||
| 54 | } |
||
| 56 |
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..