|
@@ 581-590 (lines=10) @@
|
| 578 |
|
// Evaluate type |
| 579 |
|
switch (true) { |
| 580 |
|
// Checks if the property has array<type> |
| 581 |
|
case (false !== $pos = strpos($type, '<')): |
| 582 |
|
$arrayType = substr($type, $pos + 1, -1); |
| 583 |
|
$type = 'array'; |
| 584 |
|
|
| 585 |
|
if (isset(self::$typeMap[$arrayType])) { |
| 586 |
|
$arrayType = self::$typeMap[$arrayType]; |
| 587 |
|
} |
| 588 |
|
|
| 589 |
|
$metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; |
| 590 |
|
break; |
| 591 |
|
|
| 592 |
|
// Checks if the property has type[] |
| 593 |
|
case (false !== $pos = strrpos($type, '[')): |
|
@@ 593-602 (lines=10) @@
|
| 590 |
|
break; |
| 591 |
|
|
| 592 |
|
// Checks if the property has type[] |
| 593 |
|
case (false !== $pos = strrpos($type, '[')): |
| 594 |
|
$arrayType = substr($type, 0, $pos); |
| 595 |
|
$type = 'array'; |
| 596 |
|
|
| 597 |
|
if (isset(self::$typeMap[$arrayType])) { |
| 598 |
|
$arrayType = self::$typeMap[$arrayType]; |
| 599 |
|
} |
| 600 |
|
|
| 601 |
|
$metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; |
| 602 |
|
break; |
| 603 |
|
} |
| 604 |
|
|
| 605 |
|
$metadata['attribute_types'][$attribute->name]['type'] = $type; |