diff --git a/src/Application.php b/src/Application.php index d20a27f8..56e49ff1 100644 --- a/src/Application.php +++ b/src/Application.php @@ -52,7 +52,7 @@ public function run() http_response_code($response->getStatusCode()); // Gets the selected route and sets it as the content. - if (! $response->getBody()) { + if ( ! $response->getBody() || $response->getBody() == '') { $response->getBody()->write($route); } diff --git a/src/Components.php b/src/Components.php index d9ff24d6..55027c96 100644 --- a/src/Components.php +++ b/src/Components.php @@ -4,9 +4,9 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use Interop\Container\ContainerInterface; +use Rougin\Slytherin\IoC\ContainerInterface; +use Rougin\Slytherin\Debug\DebuggerInterface; use Rougin\Slytherin\Dispatching\DispatcherInterface; -use Rougin\Slytherin\Debugger\DebuggerInterface; /** * Component Collection @@ -26,7 +26,7 @@ class Components /** * Gets an instance of the container. * - * @return \Interop\Container\ContainerInterface + * @return \Rougin\Slytherin\IoC\ContainerInterface */ public function getContainer() { @@ -36,7 +36,7 @@ public function getContainer() /** * Sets the container. * - * @param \Interop\Container\ContainerInterface $container + * @param \Rougin\Slytherin\IoC\ContainerInterface $container */ public function setContainer(ContainerInterface $container) { diff --git a/src/Debug/Debugger.php b/src/Debug/Debugger.php index 3849a401..238a1b81 100644 --- a/src/Debug/Debugger.php +++ b/src/Debug/Debugger.php @@ -2,8 +2,6 @@ namespace Rougin\Slytherin\Debug; -use Rougin\Slytherin\Debug\DebuggerInterface; - /** * Debugger * diff --git a/src/Debug/WhoopsDebugger.php b/src/Debug/WhoopsDebugger.php index 29a5b4ff..e551079e 100644 --- a/src/Debug/WhoopsDebugger.php +++ b/src/Debug/WhoopsDebugger.php @@ -4,7 +4,6 @@ use Whoops\Run; use Whoops\Handler\PrettyPageHandler; -use Rougin\Slytherin\Debug\DebuggerInterface; /** * Debugger diff --git a/src/Dispatching/Dispatcher.php b/src/Dispatching/Dispatcher.php index 7420fb12..d3d88ad2 100644 --- a/src/Dispatching/Dispatcher.php +++ b/src/Dispatching/Dispatcher.php @@ -4,7 +4,6 @@ use UnexpectedValueException; use Rougin\Slytherin\Dispatching\RouterInterface; -use Rougin\Slytherin\Dispatching\DispatcherInterface; /** * Dispatcher diff --git a/src/Dispatching/Router.php b/src/Dispatching/Router.php index 4d4ebf43..31b128a4 100644 --- a/src/Dispatching/Router.php +++ b/src/Dispatching/Router.php @@ -2,8 +2,6 @@ namespace Rougin\Slytherin\Dispatching; -use Rougin\Slytherin\Dispatching\RouterInterface; - /** * Dispatcher * diff --git a/src/IoC/Container.php b/src/IoC/Container.php index a3438123..a7ef85a0 100644 --- a/src/IoC/Container.php +++ b/src/IoC/Container.php @@ -3,7 +3,6 @@ namespace Rougin\Slytherin\IoC; use ReflectionClass; -use Rougin\Slytherin\IoC\ContainerInterface; use Rougin\Slytherin\IoC\Exception\NotFoundException; /** diff --git a/src/Template/Renderer.php b/src/Template/Renderer.php index e38a6c9b..482e43f0 100644 --- a/src/Template/Renderer.php +++ b/src/Template/Renderer.php @@ -6,7 +6,6 @@ use InvalidArgumentException; use RecursiveIteratorIterator; use RecursiveDirectoryIterator; -use Rougin\Slytherin\Template\RendererInterface; /** * Renderer diff --git a/src/Template/TwigRenderer.php b/src/Template/TwigRenderer.php index 28f5b5da..512511a6 100644 --- a/src/Template/TwigRenderer.php +++ b/src/Template/TwigRenderer.php @@ -3,7 +3,6 @@ namespace Rougin\Slytherin\Template; use Twig_Environment; -use Rougin\Slytherin\Template\RendererInterface; /** * Renderer