Closed
Description
The use of $this
inside a closure should be fine, due to automatic binding. I'm not sure why there is an example explicitly marking this as a warning.
Here's a simple example that should report no warnings.
class classWithClosure() {
public function test_get_source_information_from_theme() {
doSomething( function() {
return $this->thing;
} );
}
}