mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Add static to isBuiltin() check in ide-helper:models (#1541)
* Add `\\static` as check For some reason, the `static` keyword as a return type, does not return `isBuiltin()` === true, so a `\\` is added. We need to manually add it to the built in check. * Update ModelsCommand.php * Add tests * Add CHANGELOG.md entry --------- Co-authored-by: Markus Podar <[email protected]> Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
co-authored by
Markus Podar
Barry vd. Heuvel
parent
f7a3dc8ff2
commit
f5759e2001
@@ -15,6 +15,7 @@ use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Cas
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithPrimitiveDocblockReturn;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithPrimitiveReturn;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithReturnType;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithStaticReturnType;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\ExtendedSelfCastingCasterWithStaticDocblockReturn;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\ExtendedSelfCastingCasterWithThisDocblockReturn;
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\InboundAttributeCaster;
|
||||
@@ -26,6 +27,7 @@ class CustomCast extends Model
|
||||
{
|
||||
protected $casts = [
|
||||
'casted_property_with_return_type' => CustomCasterWithReturnType::class,
|
||||
'casted_property_with_static_return_type' => CustomCasterWithStaticReturnType::class,
|
||||
'casted_property_with_return_docblock' => CustomCasterWithDocblockReturn::class,
|
||||
'casted_property_with_return_docblock_fqn' => CustomCasterWithDocblockReturnFqn::class,
|
||||
'casted_property_with_return_primitive' => CustomCasterWithPrimitiveReturn::class,
|
||||
|
||||
Reference in New Issue
Block a user