| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public static function new(string $name, PropertyMetadata ...$properties) : self |
||
| 17 | { |
||
| 18 | return new self( |
||
| 19 | sprintf( |
||
| 20 | 'The annotation "%s" can only have at most one default property, currently has %d: "%s".', |
||
| 21 | $name, |
||
| 22 | count($properties), |
||
| 23 | implode( |
||
| 24 | '", "', |
||
| 25 | array_map( |
||
| 26 | static function (PropertyMetadata $property) : string { |
||
| 27 | return $property->getName(); |
||
| 28 | }, |
||
| 29 | $properties |
||
| 30 | ) |
||
| 36 |