Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public static function setUpProperties($properties, JsonBasicSchema $ownerSchema) |
||
26 | { |
||
27 | $properties->name = JsonBasicSchema::string(); |
||
28 | $properties->name->description = 'The name of the license type. It\'s encouraged to use an OSI compatible license.'; |
||
|
|||
29 | $properties->url = JsonBasicSchema::string(); |
||
30 | $properties->url->description = 'The URL pointing to the license.'; |
||
31 | $properties->url->format = 'uri'; |
||
32 | $ownerSchema->type = 'object'; |
||
33 | $ownerSchema->additionalProperties = false; |
||
34 | $ownerSchema->patternProperties['^x-'] = new JsonBasicSchema(); |
||
35 | $ownerSchema->patternProperties['^x-']->description = 'Any property starting with x- is valid.'; |
||
36 | $ownerSchema->required = array ( |
||
37 | 0 => 'name', |
||
38 | ); |
||
39 | } |
||
40 | } |
||
42 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.