Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Feb 27, 2017
1 parent c67a286 commit d9b8ba8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/AuraRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Middlewares;

use Middlewares\Utils\CallableHandler;
use Middlewares\Utils\Factory;
use Middlewares\Utils\CallableResolver\CallableResolverInterface;
use Middlewares\Utils\CallableResolver\ContainerResolver;
use Middlewares\Utils\CallableResolver\ReflectionResolver;
Expand Down Expand Up @@ -83,13 +85,13 @@ public function process(ServerRequestInterface $request, DelegateInterface $dele

switch ($failedRoute->failedRule) {
case 'Aura\Router\Rule\Allows':
return Utils\Factory::createResponse(405); // 405 METHOD NOT ALLOWED
return Factory::createResponse(405); // 405 METHOD NOT ALLOWED

case 'Aura\Router\Rule\Accepts':
return Utils\Factory::createResponse(406); // 406 NOT ACCEPTABLE
return Factory::createResponse(406); // 406 NOT ACCEPTABLE

default:
return Utils\Factory::createResponse(404); // 404 NOT FOUND
return Factory::createResponse(404); // 404 NOT FOUND
}
}

Expand All @@ -101,7 +103,7 @@ public function process(ServerRequestInterface $request, DelegateInterface $dele

$callable = $this->getResolver()->resolve($route->handler, $arguments);

return Utils\CallableHandler::execute($callable, $arguments);
return CallableHandler::execute($callable, $arguments);
}

/**
Expand Down

0 comments on commit d9b8ba8

Please sign in to comment.