-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing properties if use docblocks can not work #59
Comments
Hi @JimChenWYU, This was a small bug that has been fixed in 2.1.1! We've also added a new syntax: class DateSettings extends Settings
{
/** @var \DateTime */
public $birth_date;
/** @var ?null */
public $a_nullable_int;
/** @var int|null */
public $another_nullable_int;
/** @var int[]|null */
public $an_array_of_ints_or_null;
public static function group(): string
{
return 'date';
}
} This one feels a bit more natural |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
README.md
an exampleOr you can use docblocks:
I always get an exception like:
when I try to look for the solution, I see the code and find this
when
$type
is?int
, or like other?float
,?bool
...self::reflectDocblock()
cannot be get actual type, alway callthrow CouldNotResolveDocblockType::create($type, $reflectionProperty);
The text was updated successfully, but these errors were encountered: