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

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)
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB