Various code cleanup.

This commit is contained in:
James Cole 2016-11-26 13:02:44 +01:00
parent 0e66939408
commit 43c32abfe8
4 changed files with 6 additions and 22 deletions

View File

@ -72,8 +72,6 @@ class VerifyDatabase extends Command
$this->reportObject('category');
$this->reportObject('tag');
return;
// accounts with no transactions.
$this->reportAccounts();
// budgets with no limits
@ -269,8 +267,7 @@ class VerifyDatabase extends Command
$plural = str_plural($name);
$class = sprintf('FireflyIII\Models\%s', ucfirst($name));
$field = $name == 'tag' ? 'tag' : 'name';
$set = $class
::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
$set = $class::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
->leftJoin('users', $plural . '.user_id', '=', 'users.id')
->distinct()
->whereNull($name . '_transaction_journal.' . $name . '_id')
@ -284,7 +281,7 @@ class VerifyDatabase extends Command
try {
$objName = Crypt::decrypt($objName);
} catch (DecryptException $e) {
// it probably was not encrypted.
}
$line = sprintf(
@ -317,8 +314,7 @@ class VerifyDatabase extends Command
*/
private function reportTransactions()
{
$set = Transaction
::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
$set = Transaction::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->whereNotNull('transactions.deleted_at')
->whereNull('transaction_journals.deleted_at')
->get(

View File

@ -57,13 +57,13 @@ class Range
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param Closure $theNext
* @param Closure $next
* @param string|null $guard
*
* @return mixed
* @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()) {
@ -80,7 +80,7 @@ class Range
$this->configureList();
}
return $theNext($request);
return $next($request);
}

View File

@ -1,7 +0,0 @@
{% extends "./layout/default" %}
<p>
No longer used.
</p>
{% endblock %}

View File

@ -1,5 +0,0 @@
{% extends "./layout/default" %}
<p>
No longer used.
</p>
{% endblock %}