style(phpcs): Switch to PSR-12

https://www.php-fig.org/psr/psr-12/
This commit is contained in:
Pierre Rudloff 2019-10-03 21:24:12 +02:00
parent f063f2ead4
commit 44bf858c35
35 changed files with 101 additions and 67 deletions

View file

@ -1,6 +1,6 @@
<?php
require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__ . '/vendor/autoload.php';
use Alltube\Config;
use Alltube\Controller\DownloadController;
use Alltube\Controller\FrontController;
@ -12,12 +12,12 @@ use Alltube\ViewFactory;
use Slim\App;
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
header('Location: '.str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
header('Location: ' . str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
die;
}
if (is_file(__DIR__.'/config/config.yml')) {
Config::setFile(__DIR__.'/config/config.yml');
if (is_file(__DIR__ . '/config/config.yml')) {
Config::setFile(__DIR__ . '/config/config.yml');
}
$app = new App();
@ -82,5 +82,5 @@ $app->get(
try {
$app->run();
} catch (SmartyException $e) {
die('Smarty could not compile the template file: '.$e->getMessage());
die('Smarty could not compile the template file: ' . $e->getMessage());
}