mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Code reordering and reformatting. I should really start employing style CI.
This commit is contained in:
@@ -78,6 +78,18 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a category or return NULL
|
||||
*
|
||||
* @param int $categoryId
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function find(int $categoryId): ?Category
|
||||
{
|
||||
return $this->user->categories()->find($categoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a category.
|
||||
*
|
||||
@@ -118,18 +130,6 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a category or return NULL
|
||||
*
|
||||
* @param int $categoryId
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function find(int $categoryId): ?Category
|
||||
{
|
||||
return $this->user->categories()->find($categoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Category $category
|
||||
*
|
||||
|
||||
@@ -46,6 +46,15 @@ interface CategoryRepositoryInterface
|
||||
*/
|
||||
public function destroyAll(): void;
|
||||
|
||||
/**
|
||||
* Find a category or return NULL
|
||||
*
|
||||
* @param int $categoryId
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function find(int $categoryId): ?Category;
|
||||
|
||||
/**
|
||||
* Find a category.
|
||||
*
|
||||
@@ -63,15 +72,6 @@ interface CategoryRepositoryInterface
|
||||
*/
|
||||
public function findCategory(?int $categoryId, ?string $categoryName): ?Category;
|
||||
|
||||
/**
|
||||
* Find a category or return NULL
|
||||
*
|
||||
* @param int $categoryId
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function find(int $categoryId): ?Category;
|
||||
|
||||
/**
|
||||
* @param Category $category
|
||||
*
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\Category;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\Category;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\Category;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -98,7 +99,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
// add journal to array:
|
||||
// only a subset of the fields.
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$array[$currencyId]['categories'][$categoryId]['transaction_journals'][$journalId] = [
|
||||
'amount' => app('steam')->negative($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
@@ -175,7 +176,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
// add journal to array:
|
||||
// only a subset of the fields.
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$array[$currencyId]['categories'][$categoryId]['transaction_journals'][$journalId] = [
|
||||
'amount' => app('steam')->positive($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
|
||||
Reference in New Issue
Block a user