From c712bc3dc953f5bdb532115502e69b0d08ce8c2c Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 10 Jan 2017 23:39:45 +0100 Subject: [PATCH 1/2] 0.7.2-beta release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea7dba8..50a9ff1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alltube", "description": "HTML GUI for youtube-dl", - "version": "0.7.1", + "version": "0.7.2-beta", "author": "Pierre Rudloff", "bugs": "https://github.com/Rudloff/alltube/issues", "dependencies": { From 3a1d0c4bc7496983047b112d07b3af1a75e28176 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 10 Jan 2017 23:39:58 +0100 Subject: [PATCH 2/2] Lint --- classes/Config.php | 3 ++- classes/UglyRouter.php | 15 ++++++++------- controllers/FrontController.php | 6 +++--- index.php | 2 +- tests/UglyRouterTest.php | 10 ++++++---- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index a66955c..a4ff93d 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -77,7 +77,8 @@ class Config /** * Disable URL rewriting. - * @var boolean + * + * @var bool */ public $uglyUrls = false; diff --git a/classes/UglyRouter.php b/classes/UglyRouter.php index a81471b..c574480 100644 --- a/classes/UglyRouter.php +++ b/classes/UglyRouter.php @@ -2,10 +2,11 @@ /** * UglyRouter class. */ + namespace Alltube; -use Slim\Router; use Psr\Http\Message\ServerRequestInterface; +use Slim\Router; /** * Extend Slim's router class in order to disable URL rewriting. @@ -13,9 +14,9 @@ use Psr\Http\Message\ServerRequestInterface; class UglyRouter extends Router { /** - * Dispatch router for HTTP request + * Dispatch router for HTTP request. * - * @param ServerRequestInterface $request The current HTTP request object + * @param ServerRequestInterface $request The current HTTP request object * * @return array * @@ -36,23 +37,23 @@ class UglyRouter extends Router } /** - * Build the path for a named route including the base path + * Build the path for a named route including the base path. * * @param string $name Route name * @param array $data Named argument replacement data * @param array $queryParams Optional query string parameters * - * @return string - * * @throws \RuntimeException If named route does not exist * @throws \InvalidArgumentException If required data not provided + * + * @return string */ public function pathFor($name, array $data = [], array $queryParams = []) { $url = str_replace('/', '/?page=', $this->relativePathFor($name, $data, $queryParams)); if ($this->basePath) { - $url = $this->basePath . $url; + $url = $this->basePath.$url; } return $url; diff --git a/controllers/FrontController.php b/controllers/FrontController.php index c4421fe..04734da 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -84,10 +84,10 @@ class FrontController $response, 'index.tpl', [ - 'convert' => $this->config->convert, + 'convert' => $this->config->convert, 'uglyUrls' => $this->config->uglyUrls, - 'class' => 'index', - 'description' => 'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.', + 'class' => 'index', + 'description' => 'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.', ] ); } diff --git a/index.php b/index.php index feca012..fad0bb0 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,8 @@ router->setBasePath('/bar'); $this->assertEquals( '/bar/?page=foo',