Created
December 26, 2015 04:39
-
-
Save dilab/46d3b18d8030f2557a56 to your computer and use it in GitHub Desktop.
This file contains 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
return array_map(function ($c, $serializedTicket) { | |
$ticket = unserialize($serializedTicket); | |
return [ | |
'id' => $ticket->get('id'), | |
'name' => $ticket->get('name'), | |
'amt' => $this->toDollarFormat($ticket->get('price')->toCent()), | |
'qty' => $c | |
]; | |
}, array_count_values( | |
array_map('serialize', $bill->getTickets()) | |
), array_keys(array_count_values( | |
array_map('serialize', $bill->getTickets()) | |
))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment