Suppose I have a Macro registered in my package ServiceProvider and I am writing documentation for my package.
\Laravel\Dusk\Browser::macro('scrollToElement', function ($element = null) {
$this->script("$('html, body').animate({ scrollTop: $('$element').offset().top }, 0);");
return $this;
});
Now how do I document the variable $this in the Closure?