mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Fix phpdoc generate for custom cast with parameter (#986)
* Fix phpdoc generate for custom cast with parameter * Add param for cast * Simplify cast class name normalizing Co-authored-by: Markus Podar <[email protected]> * Update changelog * composer fix-style Co-authored-by: Markus Podar <[email protected]>
This commit is contained in:
co-authored by
Markus Podar
parent
4aa2e6a576
commit
186340bedc
@@ -344,6 +344,9 @@ class ModelsCommand extends Command
|
||||
$realType = '\Illuminate\Support\Collection';
|
||||
break;
|
||||
default:
|
||||
// In case of an optional custom cast parameter , only evaluate
|
||||
// the `$type` until the `:`
|
||||
$type = strtok($type, ':');
|
||||
$realType = class_exists($type) ? ('\\' . $type) : 'mixed';
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user