User can submit new journal through API.

This commit is contained in:
James Cole
2019-03-31 13:36:49 +02:00
parent c07ef3658b
commit b692cccdfb
30 changed files with 1461 additions and 711 deletions

View File

@@ -89,21 +89,13 @@ class BillRepository implements BillRepositoryInterface
/**
* Find bill by parameters.
*
* @param Bill|null $bill
* @param int|null $billId
* @param string|null $billName
*
* @return Bill|null
*/
public function findBill(?Bill $bill, ?int $billId, ?string $billName): ?Bill
public function findBill( ?int $billId, ?string $billName): ?Bill
{
Log::debug('Searching for bill information.');
if ($bill instanceof Bill && $bill->user_id === $this->user->id) {
Log::debug(sprintf('Bill object in parameters, will return Bill #%d', $bill->id));
return $bill;
}
if (null !== $billId) {
$searchResult = $this->find((int)$billId);
if (null !== $searchResult) {