Skip to content

Commit

Permalink
Codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu authored and lchrusciel committed Jan 3, 2019
1 parent cb4a6ed commit 65d9b44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/Controller/Checkout/CompleteOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function __construct(
CommandBus $bus,
LoggedInUserProviderInterface $loggedInUserProvider
) {
$this->viewHandler = $viewHandler;
$this->bus = $bus;
$this->viewHandler = $viewHandler;
$this->bus = $bus;
$this->loggedInUserProvider = $loggedInUserProvider;
}

Expand Down Expand Up @@ -60,5 +60,4 @@ public function __invoke(Request $request): Response

return $this->viewHandler->handle(View::create(null, Response::HTTP_NO_CONTENT));
}

}
3 changes: 2 additions & 1 deletion src/Handler/CompleteOrderHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ private function getCustomer(string $emailAddress): CustomerInterface
$loggedInUser = $this->loggedInUserProvider->provide();

if ($emailAddress !== '') {
throw new \InvalidArgumentException($emailAddress.' has to be empty');
throw new \InvalidArgumentException($emailAddress . ' has to be empty');

throw new \InvalidArgumentException('Can not have a logged in user and an email address');
}

Expand Down
4 changes: 2 additions & 2 deletions src/Provider/LoggedInUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ public function __construct(TokenStorageInterface $tokenStorage)
public function provide(): ShopUserInterface
{
$token = $this->tokenStorage->getToken();
if($token === null) {
if ($token === null) {
throw new TokenNotFoundException('No token found');
}

/** @var ShopUserInterface|null $user */
$user = $token->getUser();
$user = $token->getUser();

if (!$user instanceof ShopUserInterface) {
throw new TokenNotFoundException('No logged in user');
Expand Down

0 comments on commit 65d9b44

Please sign in to comment.