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
+19
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CustomCasterWithStaticReturnType implements CastsAttributes
|
||||
{
|
||||
public function get(Model $model, string $key, mixed $value, array $attributes): static
|
||||
{
|
||||
// TODO: Implement get() method.
|
||||
}
|
||||
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): array
|
||||
{
|
||||
// TODO: Implement set() method.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user