Description
Consider the following code:
class Booking
{
public function getFreeCancellationDeadline(): ?\DateTimeImmutable
{
// ....
}
}
Then, you'd like to have a closure:
fn (Booking $b): ?\DateTimeImmutable => $b->getFreeCancellationDeadline();
It would be much neater to have it like this:
Booking::getFreeCancellationDeadline(...);
This is the exact form in which PhpStorm IDE copies the method reference ("Copy Reference" on the method - Ctrl+Alt+Sft+C).
Description
Consider the following code:
Then, you'd like to have a closure:
It would be much neater to have it like this:
Booking::getFreeCancellationDeadline(...);This is the exact form in which PhpStorm IDE copies the method reference ("Copy Reference" on the method - Ctrl+Alt+Sft+C).