Created
September 29, 2017 03:23
-
-
Save oomusou/c13d3573bc7717dd8ceec6873b31783f 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
$formattedList = collect($list) | |
->map(function ($item) { | |
return $this->formatTimestamp($item, 'createDate', self::PATTERN_TIME); | |
}) | |
->map(function ($item) { | |
return $this->formatTimestamp($item, 'activeDate', self::PATTERN_DATE); | |
}) | |
->map(function ($item) { | |
return $this->formatNumber($item, self::ACTIVE_AMOUNT); | |
}) | |
->map(function ($item) { | |
return $this->formatNumber($item, self::INACTIVE_AMOUNT); | |
}) | |
->map(function ($item) { | |
return $this->transformZero($item, self::ACTIVE_AMOUNT); | |
}) | |
->map(function ($item) { | |
return $this->transformZero($item, self::INACTIVE_AMOUNT); | |
}) | |
->toArray(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment