Conditions | 2 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public static function getSerializedNameAttribute(\ReflectionProperty $rProperty): SerializedName |
||
15 | { |
||
16 | $attributes = array_map( |
||
17 | static fn (\ReflectionAttribute $a) => $a->newInstance(), |
||
18 | $rProperty->getAttributes(SerializedName::class), |
||
19 | ); |
||
20 | |||
21 | return current($attributes) ?: new SerializedName($rProperty->getName()); |
||
22 | } |
||
24 |