From bba2087a55e1e555ef4f5cb4faf49f743cb03018 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 22 Apr 2019 17:04:59 +0200 Subject: [PATCH] style(styleci): Lint --- classes/SessionManager.php | 2 +- controllers/BaseController.php | 1 - controllers/FrontController.php | 2 -- index.php | 3 +-- tests/ControllerTest.php | 2 -- tests/DownloadControllerTest.php | 8 -------- tests/FrontControllerTest.php | 5 ----- tests/JsonControllerTest.php | 9 --------- 8 files changed, 2 insertions(+), 30 deletions(-) diff --git a/classes/SessionManager.php b/classes/SessionManager.php index b461fa3..0ecd586 100644 --- a/classes/SessionManager.php +++ b/classes/SessionManager.php @@ -13,7 +13,6 @@ use Aura\Session\SessionFactory; */ class SessionManager { - /** * Current session. * @@ -32,6 +31,7 @@ class SessionManager $session_factory = new SessionFactory(); self::$session = $session_factory->newInstance($_COOKIE); } + return self::$session; } } diff --git a/controllers/BaseController.php b/controllers/BaseController.php index a51eaa2..f96842e 100644 --- a/controllers/BaseController.php +++ b/controllers/BaseController.php @@ -11,7 +11,6 @@ use Alltube\Video; use Aura\Session\Segment; use Psr\Container\ContainerInterface; use Slim\Http\Request; -use Slim\Http\Response; /** * Abstract class used by every controller. diff --git a/controllers/FrontController.php b/controllers/FrontController.php index c577a7d..51b0d8c 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -6,7 +6,6 @@ namespace Alltube\Controller; use Alltube\Config; -use Alltube\EmptyUrlException; use Alltube\Locale; use Alltube\LocaleManager; use Alltube\PasswordException; @@ -16,7 +15,6 @@ use Psr\Container\ContainerInterface; use Slim\Container; use Slim\Http\Request; use Slim\Http\Response; -use Slim\Http\Stream; use Slim\Views\Smarty; /** diff --git a/index.php b/index.php index 4b46f74..78ee2dd 100644 --- a/index.php +++ b/index.php @@ -2,9 +2,9 @@ require_once __DIR__.'/vendor/autoload.php'; use Alltube\Config; +use Alltube\Controller\DownloadController; use Alltube\Controller\FrontController; use Alltube\Controller\JsonController; -use Alltube\Controller\DownloadController; use Alltube\LocaleManager; use Alltube\LocaleMiddleware; use Alltube\UglyRouter; @@ -74,7 +74,6 @@ $app->get( [$frontController, 'locale'] )->setName('locale'); - $app->get( '/json', [$jsonController, 'json'] diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index d11af57..bad16a5 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -5,13 +5,11 @@ namespace Alltube\Test; -use Alltube\Config; use Alltube\Controller\BaseController; use Alltube\Controller\DownloadController; use Alltube\Controller\FrontController; use Alltube\LocaleManager; use Alltube\ViewFactory; -use Exception; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; diff --git a/tests/DownloadControllerTest.php b/tests/DownloadControllerTest.php index 1e1bb93..99587ac 100644 --- a/tests/DownloadControllerTest.php +++ b/tests/DownloadControllerTest.php @@ -7,20 +7,12 @@ namespace Alltube\Test; use Alltube\Config; use Alltube\Controller\DownloadController; -use Alltube\LocaleManager; -use Alltube\ViewFactory; -use Exception; -use Slim\Container; -use Slim\Http\Environment; -use Slim\Http\Request; -use Slim\Http\Response; /** * Unit tests for the FrontController class. */ class DownloadControllerTest extends ControllerTest { - /** * Prepare tests. */ diff --git a/tests/FrontControllerTest.php b/tests/FrontControllerTest.php index edc7e58..2c95290 100644 --- a/tests/FrontControllerTest.php +++ b/tests/FrontControllerTest.php @@ -7,20 +7,15 @@ namespace Alltube\Test; use Alltube\Config; use Alltube\Controller\FrontController; -use Alltube\LocaleManager; -use Alltube\ViewFactory; use Exception; -use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; -use Slim\Http\Response; /** * Unit tests for the FrontController class. */ class FrontControllerTest extends ControllerTest { - /** * Controller instance used in tests. * diff --git a/tests/JsonControllerTest.php b/tests/JsonControllerTest.php index 05003f5..caefccb 100644 --- a/tests/JsonControllerTest.php +++ b/tests/JsonControllerTest.php @@ -5,22 +5,13 @@ namespace Alltube\Test; -use Alltube\Config; use Alltube\Controller\JsonController; -use Alltube\LocaleManager; -use Alltube\ViewFactory; -use Exception; -use Slim\Container; -use Slim\Http\Environment; -use Slim\Http\Request; -use Slim\Http\Response; /** * Unit tests for the FrontController class. */ class JsonControllerTest extends ControllerTest { - /** * Prepare tests. */