Welcome Guest, Not a member yet? Register   Sign In
Using ::class in Model's $returnType instead of string - bad?
#8

(06-16-2022, 04:35 AM)MGatner Wrote: Thanks for the discussion and contribution! I use ::class any time I have a class string. You can also use the special phpdoc block type `class-string` to narrow types for IDE and static analysis (e.g. https://phpstan.org/writing-php-code/php...ass-string)

Cool. phpstan is next on my to-do-list to start using.
Reply


Messages In This Thread
RE: Using ::class in Model's $returnType instead of string - bad? - by tgix - 06-16-2022, 04:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB