Last active
August 9, 2022 18:25
-
-
Save mikemix/e68c2c0e78e5d43983e480735736988e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mapOrderStatusToLabel(Order $order): string | |
{ | |
if ($order->isComplete()) { | |
return 'Completed'; | |
} | |
if ($order->isPending()) { | |
return 'In transport'; | |
} | |
return 'New'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment