From 525ec0345ceac205f43cdd83e16efe176e465158 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 10 Aug 2019 18:36:46 +0300 Subject: [PATCH] Flextype Core and Plugins: Doctrine Coding Standard #200 #186 - next round of code improvements --- flextype/core/Cache.php | 2 -- flextype/core/Controller.php | 2 -- flextype/core/Fieldsets.php | 2 -- flextype/core/Middleware.php | 2 -- flextype/core/Plugins.php | 2 -- flextype/core/Snippets.php | 2 -- flextype/core/Themes.php | 2 -- flextype/routes/web.php | 6 ++---- flextype/shortcodes/EntriesShortcode.php | 2 -- flextype/shortcodes/RegistryShortcode.php | 2 -- flextype/shortcodes/SnippetsShortcode.php | 2 -- flextype/twig/AssetsTwigExtension.php | 2 -- flextype/twig/CsrfTwigExtension.php | 2 -- flextype/twig/EmitterTwigExtension.php | 2 -- flextype/twig/EntriesTwigExtension.php | 2 -- flextype/twig/FilesystemTwigExtension.php | 2 -- flextype/twig/FlashTwigExtension.php | 2 -- flextype/twig/GlobalVarsTwigExtension.php | 2 -- flextype/twig/I18nTwigExtension.php | 2 -- flextype/twig/JsonParserTwigExtension.php | 2 -- flextype/twig/ShortcodesTwigExtension.php | 2 -- flextype/twig/SnippetsTwigExtension.php | 3 +-- 22 files changed, 3 insertions(+), 46 deletions(-) diff --git a/flextype/core/Cache.php b/flextype/core/Cache.php index 2d39876b..90b1f06e 100755 --- a/flextype/core/Cache.php +++ b/flextype/core/Cache.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Controller.php b/flextype/core/Controller.php index 21f4f951..2e8eeb3f 100644 --- a/flextype/core/Controller.php +++ b/flextype/core/Controller.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Fieldsets.php b/flextype/core/Fieldsets.php index 21ece621..58ec5381 100644 --- a/flextype/core/Fieldsets.php +++ b/flextype/core/Fieldsets.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Middleware.php b/flextype/core/Middleware.php index 38f79b58..02d81f13 100644 --- a/flextype/core/Middleware.php +++ b/flextype/core/Middleware.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Plugins.php b/flextype/core/Plugins.php index 58c18dbc..e589436f 100755 --- a/flextype/core/Plugins.php +++ b/flextype/core/Plugins.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Snippets.php b/flextype/core/Snippets.php index d1b25a0d..42cfee05 100644 --- a/flextype/core/Snippets.php +++ b/flextype/core/Snippets.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/core/Themes.php b/flextype/core/Themes.php index b44ebf16..54ebdb96 100644 --- a/flextype/core/Themes.php +++ b/flextype/core/Themes.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/routes/web.php b/flextype/routes/web.php index 59bb420e..b3acd9e0 100644 --- a/flextype/routes/web.php +++ b/flextype/routes/web.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; @@ -21,7 +19,7 @@ use Psr\Http\Message\ServerRequestInterface as Request; $app->get('/image/{path:.+}', function (Request $request, Response $response, array $args) use ($flextype) { if (Filesystem::has(PATH['entries'] . '/' . $args['path'])) { return $flextype['images']->getImageResponse($args['path'], $_GET); - } else { - return $response->withStatus(404); } + + return $response->withStatus(404); }); diff --git a/flextype/shortcodes/EntriesShortcode.php b/flextype/shortcodes/EntriesShortcode.php index a20ffb6a..151f826d 100644 --- a/flextype/shortcodes/EntriesShortcode.php +++ b/flextype/shortcodes/EntriesShortcode.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/shortcodes/RegistryShortcode.php b/flextype/shortcodes/RegistryShortcode.php index b33e3078..e87551fc 100644 --- a/flextype/shortcodes/RegistryShortcode.php +++ b/flextype/shortcodes/RegistryShortcode.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/shortcodes/SnippetsShortcode.php b/flextype/shortcodes/SnippetsShortcode.php index 06c2e7b8..f5813829 100644 --- a/flextype/shortcodes/SnippetsShortcode.php +++ b/flextype/shortcodes/SnippetsShortcode.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/AssetsTwigExtension.php b/flextype/twig/AssetsTwigExtension.php index f92a0951..24bccef7 100644 --- a/flextype/twig/AssetsTwigExtension.php +++ b/flextype/twig/AssetsTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/CsrfTwigExtension.php b/flextype/twig/CsrfTwigExtension.php index 55aa5ed9..43e99183 100644 --- a/flextype/twig/CsrfTwigExtension.php +++ b/flextype/twig/CsrfTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/EmitterTwigExtension.php b/flextype/twig/EmitterTwigExtension.php index c262f414..7a76b02f 100644 --- a/flextype/twig/EmitterTwigExtension.php +++ b/flextype/twig/EmitterTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/EntriesTwigExtension.php b/flextype/twig/EntriesTwigExtension.php index c4166949..b4602780 100644 --- a/flextype/twig/EntriesTwigExtension.php +++ b/flextype/twig/EntriesTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/FilesystemTwigExtension.php b/flextype/twig/FilesystemTwigExtension.php index d35a7c53..ede2a8fb 100644 --- a/flextype/twig/FilesystemTwigExtension.php +++ b/flextype/twig/FilesystemTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/FlashTwigExtension.php b/flextype/twig/FlashTwigExtension.php index 5f045315..d9b7974e 100644 --- a/flextype/twig/FlashTwigExtension.php +++ b/flextype/twig/FlashTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/GlobalVarsTwigExtension.php b/flextype/twig/GlobalVarsTwigExtension.php index e92f1464..a08d261d 100644 --- a/flextype/twig/GlobalVarsTwigExtension.php +++ b/flextype/twig/GlobalVarsTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/I18nTwigExtension.php b/flextype/twig/I18nTwigExtension.php index 8b40a7de..02004365 100644 --- a/flextype/twig/I18nTwigExtension.php +++ b/flextype/twig/I18nTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/JsonParserTwigExtension.php b/flextype/twig/JsonParserTwigExtension.php index 3adee261..93955333 100644 --- a/flextype/twig/JsonParserTwigExtension.php +++ b/flextype/twig/JsonParserTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/ShortcodesTwigExtension.php b/flextype/twig/ShortcodesTwigExtension.php index 4328aae6..47b05dac 100644 --- a/flextype/twig/ShortcodesTwigExtension.php +++ b/flextype/twig/ShortcodesTwigExtension.php @@ -5,8 +5,6 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ namespace Flextype; diff --git a/flextype/twig/SnippetsTwigExtension.php b/flextype/twig/SnippetsTwigExtension.php index 46cf5344..aec2b298 100644 --- a/flextype/twig/SnippetsTwigExtension.php +++ b/flextype/twig/SnippetsTwigExtension.php @@ -5,9 +5,8 @@ declare(strict_types=1); /** * Flextype (http://flextype.org) * Founded by Sergey Romanenko and maintained Flextype Community. - * - * @license https://github.com/flextype/flextype/blob/master/LICENSE.txt (MIT License) */ + namespace Flextype; use Twig_Extension;