I use `match` like this a lot now, often with PHP 8.1's enums[1]. It makes it easy to write clean dynamic accessors, without all the extra blocks required with multiple `if` branches:
/** Check the status of this Task instance. */
public function status(): Status
{
return match (true) {
$this->inProgress() || $this->isInReview() => Status::Started,
$this->isApproved() || $this->isRejected() => Status::Finished,
default => Status::Planned,
};
}