1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-07 00:56:34 +02:00

refactor: prepare for PSR2 (#2859)

This commit is contained in:
Dag
2022-06-24 18:29:35 +02:00
committed by GitHub
parent d2313bddcc
commit 5076d09de6
24 changed files with 140 additions and 146 deletions

View File

@@ -14,10 +14,9 @@ if (isset($argv)) {
}
try {
$actionFac = new ActionFactory();
$actionFac = new \ActionFactory();
if(array_key_exists('action', $params)) {
if (array_key_exists('action', $params)) {
$action = $actionFac->create($params['action']);
$action->userData = $params;
$action->execute();
@@ -25,8 +24,9 @@ try {
$showInactive = filter_input(INPUT_GET, 'show_inactive', FILTER_VALIDATE_BOOLEAN);
echo BridgeList::create($showInactive);
}
} catch(\Throwable $e) {
} catch (\Throwable $e) {
error_log($e);
$code = $e->getCode();
if ($code !== -1) {
header('Content-Type: text/plain', true, $code);