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
<?php | |
/** | |
* Tips from The Pragmatic Programmer | |
* @var array | |
*/ | |
$tips = [ | |
[ | |
'title' => 'Care About Your Craft', | |
'message' => 'Why spend your life developing software unless you care about doing it well?' |
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
<?php | |
/** | |
* The implementation will know how to deal with RoyalMail, DHL, DPD etc... | |
*/ | |
interface CarrierServices | |
{ | |
/** | |
* @param LabelRequest $labelRequest | |
* @return LabelResponse | |
* @throws CarrierException |
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
<?php | |
$reducers = [ | |
'create' => [ | |
'1.0' => function (array $currentState, array $actionData): ?array { | |
# Calculate new state in here. | |
# Things you should never do inside a reducer: | |
# - Mutate its arguments; | |
# - Perform side effects like API calls and routing transitions; | |
# - Call non-pure functions, e.g. $object->method(); |
NewerOlder