mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
* Fixed #565 by using the imported class name if present. Fixed a bug where cast type was not properly added when the return type was found via phpdoc. * Fixed errors with phpdocumentor/type-resolver:1.0
26 lines
1.7 KiB
PHP
26 lines
1.7 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Models;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturn;
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturnFqn;
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithNullablePrimitiveReturn;
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithoutReturnType;
|
|
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 Illuminate\Database\Eloquent\Model;
|
|
|
|
class CustomCast extends Model
|
|
{
|
|
protected $casts = [
|
|
'casted_property_with_return_type' => CustomCasterWithReturnType::class,
|
|
'casted_property_with_return_docblock' => CustomCasterWithDocblockReturn::class,
|
|
'casted_property_with_return_docblock_fqn' => CustomCasterWithDocblockReturnFqn::class,
|
|
'casted_property_with_return_primitive' => CustomCasterWithPrimitiveReturn::class,
|
|
'casted_property_with_return_primitive_docblock' => CustomCasterWithPrimitiveDocblockReturn::class,
|
|
'casted_property_with_return_nullable_primitive' => CustomCasterWithNullablePrimitiveReturn::class,
|
|
'casted_property_without_return' => CustomCasterWithoutReturnType::class,
|
|
];
|
|
}
|