mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Various code cleanup.
This commit is contained in:
@@ -72,8 +72,6 @@ class VerifyDatabase extends Command
|
|||||||
$this->reportObject('category');
|
$this->reportObject('category');
|
||||||
$this->reportObject('tag');
|
$this->reportObject('tag');
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
// accounts with no transactions.
|
// accounts with no transactions.
|
||||||
$this->reportAccounts();
|
$this->reportAccounts();
|
||||||
// budgets with no limits
|
// budgets with no limits
|
||||||
@@ -269,8 +267,7 @@ class VerifyDatabase extends Command
|
|||||||
$plural = str_plural($name);
|
$plural = str_plural($name);
|
||||||
$class = sprintf('FireflyIII\Models\%s', ucfirst($name));
|
$class = sprintf('FireflyIII\Models\%s', ucfirst($name));
|
||||||
$field = $name == 'tag' ? 'tag' : 'name';
|
$field = $name == 'tag' ? 'tag' : 'name';
|
||||||
$set = $class
|
$set = $class::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
|
||||||
::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
|
|
||||||
->leftJoin('users', $plural . '.user_id', '=', 'users.id')
|
->leftJoin('users', $plural . '.user_id', '=', 'users.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->whereNull($name . '_transaction_journal.' . $name . '_id')
|
->whereNull($name . '_transaction_journal.' . $name . '_id')
|
||||||
@@ -284,7 +281,7 @@ class VerifyDatabase extends Command
|
|||||||
try {
|
try {
|
||||||
$objName = Crypt::decrypt($objName);
|
$objName = Crypt::decrypt($objName);
|
||||||
} catch (DecryptException $e) {
|
} catch (DecryptException $e) {
|
||||||
|
// it probably was not encrypted.
|
||||||
}
|
}
|
||||||
|
|
||||||
$line = sprintf(
|
$line = sprintf(
|
||||||
@@ -317,8 +314,7 @@ class VerifyDatabase extends Command
|
|||||||
*/
|
*/
|
||||||
private function reportTransactions()
|
private function reportTransactions()
|
||||||
{
|
{
|
||||||
$set = Transaction
|
$set = Transaction::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||||
::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
|
||||||
->whereNotNull('transactions.deleted_at')
|
->whereNotNull('transactions.deleted_at')
|
||||||
->whereNull('transaction_journals.deleted_at')
|
->whereNull('transaction_journals.deleted_at')
|
||||||
->get(
|
->get(
|
||||||
|
@@ -57,13 +57,13 @@ class Range
|
|||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param Closure $theNext
|
* @param Closure $next
|
||||||
* @param string|null $guard
|
* @param string|null $guard
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @internal param Closure $next
|
* @internal param Closure $next
|
||||||
*/
|
*/
|
||||||
public function handle(Request $request, Closure $theNext, $guard = null)
|
public function handle(Request $request, Closure $next, $guard = null)
|
||||||
{
|
{
|
||||||
if (!Auth::guard($guard)->guest()) {
|
if (!Auth::guard($guard)->guest()) {
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class Range
|
|||||||
$this->configureList();
|
$this->configureList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $theNext($request);
|
return $next($request);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
{% extends "./layout/default" %}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
No longer used.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
@@ -1,5 +0,0 @@
|
|||||||
{% extends "./layout/default" %}
|
|
||||||
<p>
|
|
||||||
No longer used.
|
|
||||||
</p>
|
|
||||||
{% endblock %}
|
|
Reference in New Issue
Block a user