Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function mapOrderStatusToLabel(Order $order): string
{
if ($order->isComplete()) {
return 'Completed';
} elseif ($order->isPending()) {
return 'In transport';
} else {
return 'New';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment