Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Clean up Application.php #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down