mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Use PSR-12 code style
This commit is contained in:
@@ -33,7 +33,6 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
trait AccountCollection
|
||||
{
|
||||
|
||||
/**
|
||||
* These accounts must not be included.
|
||||
*
|
||||
|
@@ -32,7 +32,6 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
*/
|
||||
trait AmountCollection
|
||||
{
|
||||
|
||||
/**
|
||||
* Get transactions with a specific amount.
|
||||
*
|
||||
|
@@ -855,7 +855,7 @@ trait MetaCollection
|
||||
$filter = function (int $index, array $object) use ($list): bool {
|
||||
foreach ($object['transactions'] as $transaction) {
|
||||
foreach ($transaction['tags'] as $tag) {
|
||||
if (in_array($tag['name'], $list)) {
|
||||
if (in_array($tag['name'], $list, true)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -100,7 +100,6 @@ trait TimeCollection
|
||||
$this->postFilters[] = $filter;
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -430,7 +429,6 @@ trait TimeCollection
|
||||
{
|
||||
$this->query->whereMonth('transaction_journals.date', '>=', $month);
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -441,7 +439,6 @@ trait TimeCollection
|
||||
{
|
||||
$this->query->whereMonth('transaction_journals.date', '<=', $month);
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -718,7 +715,6 @@ trait TimeCollection
|
||||
};
|
||||
$this->postFilters[] = $filter;
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -841,5 +837,4 @@ trait TimeCollection
|
||||
$this->query->whereYear('transaction_journals.date', '!=', $year);
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,7 +50,12 @@ use Log;
|
||||
*/
|
||||
class GroupCollector implements GroupCollectorInterface
|
||||
{
|
||||
use CollectorProperties, AccountCollection, AmountCollection, TimeCollection, MetaCollection, AttachmentCollection;
|
||||
use CollectorProperties;
|
||||
use AccountCollection;
|
||||
use AmountCollection;
|
||||
use TimeCollection;
|
||||
use MetaCollection;
|
||||
use AttachmentCollection;
|
||||
|
||||
/**
|
||||
* Group collector constructor.
|
||||
@@ -352,7 +357,6 @@ class GroupCollector implements GroupCollectorInterface
|
||||
*/
|
||||
public function excludeIds(array $groupIds): GroupCollectorInterface
|
||||
{
|
||||
|
||||
$this->query->whereNotIn('transaction_groups.id', $groupIds);
|
||||
|
||||
return $this;
|
||||
@@ -767,7 +771,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
* @var Closure $function
|
||||
*/
|
||||
foreach ($this->postFilters as $function) {
|
||||
$nextCollection = new Collection;
|
||||
$nextCollection = new Collection();
|
||||
// loop everything in the current collection
|
||||
// and save it (or not) in the new collection.
|
||||
// that new collection is the next current collection
|
||||
@@ -874,7 +878,6 @@ class GroupCollector implements GroupCollectorInterface
|
||||
*/
|
||||
public function setIds(array $groupIds): GroupCollectorInterface
|
||||
{
|
||||
|
||||
$this->query->whereIn('transaction_groups.id', $groupIds);
|
||||
|
||||
return $this;
|
||||
@@ -992,7 +995,6 @@ class GroupCollector implements GroupCollectorInterface
|
||||
if (null === $this->user) {
|
||||
$this->user = $user;
|
||||
$this->startQuery();
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@@ -1395,6 +1395,4 @@ interface GroupCollectorInterface
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearIsNot(string $year): GroupCollectorInterface;
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user