<?php


namespace Api\PhpUtils\Hystrix;


use Odesk\Phystrix\AbstractCommand;


class DemoCommand extends AbstractCommand
{


    private $b;
    private $a;

    public function __construct($a, $b)
    {
        $this->a = $a;
        $this->b = $b;
    }


    protected function run()
    {
        $arr = [0,1];
        shuffle($arr);
        $int = array_pop($arr);
        if($int){
            throw new \Exception();
        }
        return $this->a.$this->b;
    }


    protected function getFallback()
    {
        return "Fallback";
    }
}