Code cleaning stuff.

This commit is contained in:
James Cole
2019-02-13 17:38:41 +01:00
parent 9a461fc7b7
commit 71fb9d8fa5
141 changed files with 495 additions and 482 deletions

View File

@@ -38,6 +38,9 @@ class BillFactory
{
use BillServiceTrait;
/** @var User */
private $user;
/**
* Constructor.
*/
@@ -48,9 +51,6 @@ class BillFactory
}
}
/** @var User */
private $user;
/**
* @param array $data
*
@@ -63,7 +63,7 @@ class BillFactory
/** @var TransactionCurrency $currency */
$currency = $factory->find((int)($data['currency_id'] ?? null), (string)($data['currency_code'] ?? null));
if(null === $currency) {
if (null === $currency) {
// use default currency:
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
}
@@ -111,7 +111,7 @@ class BillFactory
}
// then find by name:
if (null === $bill && \strlen($billName) > 0) {
if (null === $bill && '' !== $billName) {
$bill = $this->findByName($billName);
}