mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 17:57:09 +00:00
Various code fixes
This commit is contained in:
@@ -236,84 +236,6 @@ class DebugController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all possible routes.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function routes(): string
|
||||
{
|
||||
$set = RouteFacade::getRoutes();
|
||||
$ignore = [
|
||||
'chart.',
|
||||
'javascript.',
|
||||
'json.',
|
||||
'report-data.',
|
||||
'popup.',
|
||||
'debugbar.',
|
||||
'attachments.download',
|
||||
'attachments.preview',
|
||||
'bills.rescan',
|
||||
'budgets.income',
|
||||
'currencies.def',
|
||||
'error',
|
||||
'flush',
|
||||
'help.show',
|
||||
'login',
|
||||
'logout',
|
||||
'password.reset',
|
||||
'profile.confirm-email-change',
|
||||
'profile.undo-email-change',
|
||||
'register',
|
||||
'report.options',
|
||||
'routes',
|
||||
'rule-groups.down',
|
||||
'rule-groups.up',
|
||||
'rules.up',
|
||||
'rules.down',
|
||||
'rules.select',
|
||||
'search.search',
|
||||
'test-flash',
|
||||
'transactions.link.delete',
|
||||
'transactions.link.switch',
|
||||
'two-factor.lost',
|
||||
'reports.options',
|
||||
'debug',
|
||||
'preferences.delete-code',
|
||||
'rules.test-triggers',
|
||||
'piggy-banks.remove-money',
|
||||
'piggy-banks.add-money',
|
||||
'accounts.reconcile.transactions',
|
||||
'accounts.reconcile.overview',
|
||||
'transactions.clone',
|
||||
'two-factor.index',
|
||||
'api.v1',
|
||||
'installer.',
|
||||
'attachments.view',
|
||||
'recurring.events',
|
||||
'recurring.suggest',
|
||||
];
|
||||
$return = ' ';
|
||||
/** @var Route $route */
|
||||
foreach ($set as $route) {
|
||||
$name = (string)$route->getName();
|
||||
if (in_array('GET', $route->methods(), true)) {
|
||||
$found = false;
|
||||
foreach ($ignore as $string) {
|
||||
if (false !== stripos($name, $string)) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (false === $found) {
|
||||
$return .= 'touch '.$route->getName().'.md;';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flash all types of messages.
|
||||
*
|
||||
|
Reference in New Issue
Block a user