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(); |
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 | |
/** | |
* 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
# Install it as a yum package instead of throgh pip (will save you from lots of hassle) | |
# first get epel | |
sudo amazon-linux-extras install epel | |
# then install supervisor | |
sudo yum install supervisor |
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 | |
/** | |
* Create new shipment barcode | |
* | |
* $param Request $request | |
* @return void | |
**/ | |
public function createShipmentBarcode(Request $request) | |
{ | |
// validate required fields |
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 | |
namespace Weengs\Services\Merchant\Onboarding\RequestPhoneCall; | |
use Weengs\Exceptions\BusinessException; | |
use Weengs\Models\User\Onboarding; | |
use Weengs\Models\User\User; | |
use Weengs\Services\Common\BaseService; | |
use Weengs\Services\Common\RequestInterface; | |
use Weengs\Services\Common\ResponseInterface; |
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 | |
namespace Weengs\Services\Merchant\Onboarding\RequestPhoneCall; | |
use Weengs\Exceptions\ValidationException; | |
use Weengs\Services\Common\BaseServiceRequest; | |
class Request extends BaseServiceRequest | |
{ | |
/** |
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 | |
namespace Weengs\Services\Merchant\Onboarding\RequestPhoneCall; | |
use Weengs\Models\User\User; | |
use Weengs\Services\Common\BaseServiceResponse; | |
class Response extends BaseServiceResponse | |
{ | |
/** |
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 | |
/** | |
* Requests a call from the sales team | |
* | |
* @method PUT | |
* @param Request $request | |
* @param int $userId | |
* @param RequestPhoneCall\Service $requestCall | |
* |
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 | |
namespace Weengs\DataFetcher\Collections\Admin; | |
use Weengs\DataFetcher\DataFetcherInterface; | |
use Weengs\Models\WmsUser\App; | |
class ListApps implements DataFetcherInterface | |
{ | |
/** |
OlderNewer