@@ -12,17 +12,17 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * Exception handling. |
| 14 | 14 | */ |
| 15 | -set_exception_handler( [ \App\App::class, 'exceptionHandler' ] ); |
|
| 15 | +set_exception_handler([\App\App::class, 'exceptionHandler']); |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Configuration file. When testing, the tests/config.php file is used. |
| 19 | 19 | */ |
| 20 | -if (substr(basename($_SERVER['PHP_SELF']), 0, 7)==='phpunit') { |
|
| 20 | +if (substr(basename($_SERVER['PHP_SELF']), 0, 7) === 'phpunit') { |
|
| 21 | 21 | define('CONFIG_FILE', __DIR__ . '/tests/config.php'); |
| 22 | 22 | } else { |
| 23 | 23 | define('CONFIG_FILE', __DIR__ . '/config.php'); |
| 24 | 24 | } |
| 25 | 25 | if (!file_exists(CONFIG_FILE)) { |
| 26 | - echo "Please copy <code>config.example.php</code> to <code>".CONFIG_FILE."</code> and edit the values therein"; |
|
| 26 | + echo "Please copy <code>config.example.php</code> to <code>" . CONFIG_FILE . "</code> and edit the values therein"; |
|
| 27 | 27 | exit(1); |
| 28 | 28 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | return $manager; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public static function exceptionHandler( Exception $exception) |
|
| 59 | + public static function exceptionHandler(Exception $exception) |
|
| 60 | 60 | { |
| 61 | 61 | $template = new Template('error.twig'); |
| 62 | 62 | $template->title = 'Error'; |
@@ -76,7 +76,6 @@ discard block |
||
| 76 | 76 | return false; |
| 77 | 77 | } |
| 78 | 78 | return is_file($path) ? |
| 79 | - @unlink($path) : |
|
| 80 | - array_map([__CLASS__, __FUNCTION__], glob($path . '/*')) == @rmdir($path); |
|
| 79 | + @unlink($path) : array_map([__CLASS__, __FUNCTION__], glob($path . '/*')) == @rmdir($path); |
|
| 81 | 80 | } |
| 82 | 81 | } |