Silvan Krähenbühl
a091b9c94a
Allow casts without property ( #1267 )
...
* Allow casts without property
* Update changelog
2021-10-25 13:45:30 +02:00
Barry vd. Heuvel
ff54a20d21
Fix CS
2020-12-04 09:22:58 +01:00
Matthew Hailwood
b3a79fe6c1
Allow casts with a return type of static or this to reference themselves ( #1103 )
...
* Allow casts with a return type of static or this to reference themselves
Supports
```php
/**
* @param $model
* @param string $key
* @param $value
* @param array $attributes
* @return static
*/
public function get($model, string $key, $value, array $attributes)
{
return new static($value);
}
```
or
```php
/**
* @param $model
* @param string $key
* @param $value
* @param array $attributes
* @return $this
*/
public function get($model, string $key, $value, array $attributes)
{
return new static($value);
}
```
* Update CHANGELOG.md
2020-12-04 07:33:45 +01:00
Artem Kryukov and Markus Podar
186340bedc
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] >
2020-09-07 22:39:35 +02:00
Markus Podar
ba95d18ef5
[PHPCS] Extend to check/fix all source code and turn GHA into auto-commit fixer ( #1003 )
...
* phpcs: enable also for config, resources and tests
* composer fix-style
* vendor/bin/phpunit -d --update-snapshots
* gha: instead of checking the style, fix and auto-commit it 💪
2020-08-10 10:22:48 +02:00
Gabriel Langer
6f20800eef
[Model] Simplify full namespaces for already included resources ( #954 )
...
* 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
2020-06-20 12:53:36 +02:00
belamov
cfa9a81d65
Added support for Laravel 7 custom casts ( #913 )
...
* added support for laravel 7 custom casts
* refactored tests; added test cases
* added test case
* resolved method dublication
2020-04-22 06:32:40 +02:00