This commit is contained in:
Barry vd. Heuvel
2020-12-04 09:22:58 +01:00
parent db53e8e2b5
commit ff54a20d21
4 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -1108,7 +1108,7 @@ class ModelsCommand extends Command
if ($reflectionType === null) { if ($reflectionType === null) {
$reflectionType = $this->getReturnTypeFromDocBlock($methodReflection); $reflectionType = $this->getReturnTypeFromDocBlock($methodReflection);
} }
if($reflectionType === 'static' || $reflectionType === '$this') { if($reflectionType === 'static' || $reflectionType === '$this') {
$reflectionType = $type; $reflectionType = $type;
} }
@@ -4,9 +4,6 @@ declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts; namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class ExtendedSelfCastingCasterWithStaticDocblockReturn extends SelfCastingCasterWithStaticDocblockReturn class ExtendedSelfCastingCasterWithStaticDocblockReturn extends SelfCastingCasterWithStaticDocblockReturn
{ {
} }
@@ -4,9 +4,6 @@ declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts; namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class ExtendedSelfCastingCasterWithThisDocblockReturn extends SelfCastingCasterWithStaticDocblockReturn class ExtendedSelfCastingCasterWithThisDocblockReturn extends SelfCastingCasterWithStaticDocblockReturn
{ {
} }
@@ -33,6 +33,6 @@ class CustomCast extends Model
'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class, 'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class,
'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class, 'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class,
'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class, 'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class,
'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class .':param', 'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class . ':param',
]; ];
} }