-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix phpdoc generate for custom cast with parameter (#986)
* 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]>
- Loading branch information
1 parent
89a1cb9
commit abd42e7
Showing
6 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/Console/ModelsCommand/LaravelCustomCasts/Casts/CustomCasterWithParam.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?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. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters