Code clean up [skip ci]

This commit is contained in:
James Cole
2016-09-16 12:07:45 +02:00
parent a07799cfa4
commit f38984398d
60 changed files with 111 additions and 152 deletions

View File

@@ -34,7 +34,7 @@ class AccountList implements BinderInterface
public static function routeBinder($value, $route): Collection
{
if (Auth::check()) {
if (auth()->check()) {
$ids = explode(',', $value);
// filter ids:

View File

@@ -33,7 +33,7 @@ class BudgetList implements BinderInterface
*/
public static function routeBinder($value, $route): Collection
{
if (Auth::check()) {
if (auth()->check()) {
$ids = explode(',', $value);
/** @var \Illuminate\Support\Collection $object */
$object = Budget::where('active', 1)

View File

@@ -32,7 +32,7 @@ class CategoryList implements BinderInterface
*/
public static function routeBinder($value, $route): Collection
{
if (Auth::check()) {
if (auth()->check()) {
$ids = explode(',', $value);
/** @var \Illuminate\Support\Collection $object */
$object = Category::whereIn('id', $ids)

View File

@@ -32,7 +32,7 @@ class JournalList implements BinderInterface
*/
public static function routeBinder($value, $route): Collection
{
if (Auth::check()) {
if (auth()->check()) {
$ids = explode(',', $value);
/** @var \Illuminate\Support\Collection $object */
$object = TransactionJournal::whereIn('transaction_journals.id', $ids)

View File

@@ -32,7 +32,7 @@ class UnfinishedJournal implements BinderInterface
*/
public static function routeBinder($value, $route): TransactionJournal
{
if (Auth::check()) {
if (auth()->check()) {
$object = TransactionJournal::where('transaction_journals.id', $value)
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->where('completed', 0)

View File

@@ -38,7 +38,7 @@ class CacheProperties
public function __construct()
{
$this->properties = new Collection;
if (Auth::check()) {
if (auth()->check()) {
$this->addProperty(Auth::user()->id);
$this->addProperty(Prefs::lastActivity());
}