Skip to content

Instantly share code, notes, and snippets.

View aguimaraes's full-sized avatar

Alvaro Guimaraes aguimaraes

  • The Modern Milkman
  • Manchester, UK
  • 17:59 (UTC)
View GitHub Profile
<?php
namespace App\Domain;
class Checkout
{
private $orderValidation;
private $orderRepo;
private $featureToggle;
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class FeatureToggle extends Model
{
public $timestamps = true;
<?php
namespace App\Domain;
class Checkout
{
private $orderValidation;
private $orderRepo;
public function __construct(OrderValidation $orderValidation, OrderRepository $orderRepo)
<?php
abstract class Payment_Service_Command_Authorize implements Orderprocessing_Service_Interface_Command
{
/**
* @param Orderprocessing_Service_Interface_CommandParameter $parameter
*
* @see Orderprocessing_Service_Interface_Command::__invoke()
*/
public function __invoke(Orderprocessing_Service_Interface_CommandParameter $parameter)
export AUTOMATION_REPO_PATH="$HOME/Code/automation"
hf-deploy() {
env=$1
app=$2
ver=$3
if [ -z $1 -o -z $2 -o -z $3 ]
then
echo "Missing parameters."
<?php
$expectedLength = count(reset($values));
$diffLength = count(array_intersect_key(...$values));
if ($diffLength !== $expectedLength) {
throw new LengthException("Element size differs ({$diffLength} should be {$expectedLength})");
}
$items = array_map(function (...$items) {
return $items;
<?php
namespace phpgt\dom\test;
class Helper {
const HTML = "<!doctype html><html><body><h1>Hello!</h1></body></html>";
const HTML_MORE = <<<HTML
<!doctype html>
<html>
<head>
<?php
namespace phpgt\dom\test;
class Helper {
const HTML = "<!doctype html><html><body><h1>Hello!</h1></body></html>";
const HTML_MORE = <<<HTML
<!doctype html>
<html>
<head>
<?php
namespace phpgt\dom\test;
class Helper {
const HTML = "<!doctype html><html><body><h1>Hello!</h1></body></html>";
const HTML_MORE = <<<HTML
<!doctype html>
<html>
<head>
array:9 [
"bStat" => true
"versao" => "1.00"
"tpAmb" => "2"
"verAplic" => "RS20160520152620"
"cStat" => "104"
"xMotivo" => "Arquivo processado"
"nRec" => "359000002452757"
"cUF" => "2"
"aProt" => array:9 [