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 | |
$timezones = []; | |
foreach(DateTimeZone::listIdentifiers() as $timezone) | |
{ | |
$timezoneWithContinent = explode('/', $timezone); | |
if (count($timezoneWithContinent) == 1) { | |
// skip UTC | |
continue; |
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 | |
interface Command | |
{ | |
public function handle(); | |
} | |
class CommandBus | |
{ | |
protected $events; |
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 | |
// placeholder | |
class Response | |
{ | |
} | |
class ApiError extends \Exception | |
{ | |
protected static $errorCodes = [ |
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 | |
interface Flow | |
{ | |
public function execute(); | |
} | |
class PaymentCheckout implements Flow | |
{ | |
public function __construct($manadtoryParameters) |
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 | |
trait Pool | |
{ | |
/** @var array **/ | |
protected static $aPool = []; | |
public static function addToPool($key, $val) | |
{ | |
self::$aPool[$key] = $val; |
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 | |
class TranslationMissing extends \Exception | |
{ | |
public function __construct($lang, $trans) | |
{ | |
parent::__construct("translation missing of $trans in language $lang"); | |
} | |
} |
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 | |
interface ApiOutputStrategy | |
{ | |
public function handle(): string; | |
} | |
class JsonOutput implements ApiOutputStrategy | |
{ | |
public function __construct($data) |
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 | |
class clonable | |
{ | |
public function __construct(...$args) | |
{ | |
$this->args = func_get_args(); | |
} | |
public function __clone() |
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 | |
interface ServiceProvider | |
{ | |
public function register($container); | |
} | |
class UserServiceProvider implements ServiceProvider | |
{ | |
public function register($container) |
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 | |
trait Dictionary | |
{ | |
public function __call($method, $args = []) | |
{ | |
if (empty($args)) { | |
return $this->{$method}; | |
} | |