mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Is now capable of updating transactions over the API.
This commit is contained in:
@@ -253,25 +253,16 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Category|null $category
|
||||
* @param int|null $categoryId
|
||||
* @param string|null $categoryName
|
||||
* @param int|null $categoryId
|
||||
* @param string|null $categoryName
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function findCategory(?Category $category, ?int $categoryId, ?string $categoryName): ?Category
|
||||
public function findCategory(?int $categoryId, ?string $categoryName): ?Category
|
||||
{
|
||||
Log::debug('Now in findCategory()');
|
||||
$result = null;
|
||||
if (null !== $category) {
|
||||
Log::debug(sprintf('Parameters contain category #%d, will return this.', $category->id));
|
||||
$result = $category;
|
||||
}
|
||||
|
||||
if (null === $result) {
|
||||
Log::debug(sprintf('Searching for category with ID #%d...', $categoryId));
|
||||
$result = $this->findNull((int)$categoryId);
|
||||
}
|
||||
Log::debug(sprintf('Searching for category with ID #%d...', $categoryId));
|
||||
$result = $this->findNull((int)$categoryId);
|
||||
if (null === $result) {
|
||||
Log::debug(sprintf('Searching for category with name %s...', $categoryName));
|
||||
$result = $this->findByName((string)$categoryName);
|
||||
|
||||
@@ -34,13 +34,12 @@ interface CategoryRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Category|null $category
|
||||
* @param int|null $categoryId
|
||||
* @param string|null $categoryName
|
||||
*
|
||||
* @return Category|null
|
||||
*/
|
||||
public function findCategory(?Category $category, ?int $categoryId, ?string $categoryName): ?Category;
|
||||
public function findCategory( ?int $categoryId, ?string $categoryName): ?Category;
|
||||
|
||||
/**
|
||||
* @param Category $category
|
||||
|
||||
Reference in New Issue
Block a user