From 4483ed287369c6184af71095709f6ad2d05ba501 Mon Sep 17 00:00:00 2001 From: Fritsjan Bakker Date: Mon, 18 Aug 2014 17:00:24 +0200 Subject: [PATCH] Clean up Application.php --- .../Qandidate/Phystrix/Async/Demo/Application.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php b/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php index 66de6e9..0a9d76e 100644 --- a/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php +++ b/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php @@ -3,16 +3,15 @@ namespace Qandidate\Phystrix\Async\Demo; use Clue\React\Buzz\Browser; -use Odesk\Phystrix\AbstractCommand; +use Odesk\Phystrix\AbstractAsyncCommand; use Odesk\Phystrix\ApcStateStorage; use Odesk\Phystrix\CircuitBreakerFactory; use Odesk\Phystrix\CommandMetricsFactory; use Odesk\Phystrix\CommandFactory; +use Qandidate\Phystrix\Async\Demo\GetCatalogueCommand; +use Qandidate\Phystrix\Async\Demo\GetInventoryStatusCommand; use Zend\Config\Config; -// custom -use Odesk\Phystrix\AbstractAsyncCommand; - class Application { private $client; @@ -30,14 +29,14 @@ public function __construct(Browser $client, TimeoutFactory $timeoutFactory) public function getCatalogue() { - $command = $this->phystrix->getCommand('Qandidate\\Phystrix\\Async\\Demo\\GetCatalogueCommand', $this->client, $this->timeoutFactory); + $command = $this->phystrix->getCommand(GetCatalogueCommand::class, $this->client, $this->timeoutFactory); return $command->execute(); } public function getInventoryStatus() { - $command = $this->phystrix->getCommand('Qandidate\\Phystrix\\Async\\Demo\\GetInventoryStatusCommand', $this->client, $this->timeoutFactory); + $command = $this->phystrix->getCommand(GetInventoryStatusCommand::class, $this->client, $this->timeoutFactory); return $command->execute(); }