Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -22,6 +22,7 @@
declare(strict_types=1);
namespace FireflyIII\Repositories\Category;
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;

View File

@@ -22,6 +22,7 @@
declare(strict_types=1);
namespace FireflyIII\Repositories\Category;
use Carbon\Carbon;
use FireflyIII\User;
use Illuminate\Support\Collection;

View File

@@ -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'],