mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
* 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]>
25 lines
567 B
PHP
25 lines
567 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
|
|
|
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
|
|
|
class CustomCasterWithParam implements CastsAttributes
|
|
{
|
|
public function __construct(string $param)
|
|
{
|
|
}
|
|
|
|
public function get($model, string $key, $value, array $attributes): CastedProperty
|
|
{
|
|
return new CastedProperty();
|
|
}
|
|
|
|
public function set($model, string $key, $value, array $attributes)
|
|
{
|
|
// TODO: Implement set() method.
|
|
}
|
|
}
|