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