Is now capable of updating transactions over the API.

This commit is contained in:
James Cole
2019-04-06 08:10:50 +02:00
parent b692cccdfb
commit c519b4d0df
36 changed files with 1840 additions and 709 deletions

View File

@@ -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);

View File

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