X
Xon
Guest
Using
PHP:
Read more
Continue reading...
asVisitor
destroys the return type for phpstorm static analysis, but with phpdoc templates this can be fixed:PHP:
Code:
/**
* Temporarily take an action with the given user considered to be the visitor
*
* @template T
* @param User $user
* @param callable(): T $action
* @param bool $withLanguage If true, the action will be taken with the given user's language
* @return T
*
* @throws \Exception
*/
public static function asVisitor(User $user, callable $action, bool...
Read more
Continue reading...