mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Return object not null if you have to return early!!
This commit is contained in:
parent
6681b4fbfe
commit
e56a37a718
@ -16,9 +16,9 @@ use App\Services\AbstractService;
|
|||||||
|
|
||||||
class UpdateBalance extends AbstractService
|
class UpdateBalance extends AbstractService
|
||||||
{
|
{
|
||||||
private $invoice;
|
public $invoice;
|
||||||
|
|
||||||
private $balance_adjustment;
|
public $balance_adjustment;
|
||||||
|
|
||||||
public function __construct($invoice, $balance_adjustment)
|
public function __construct($invoice, $balance_adjustment)
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ class UpdateBalance extends AbstractService
|
|||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
if ($this->invoice->is_deleted) {
|
if ($this->invoice->is_deleted) {
|
||||||
return;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->invoice->balance += floatval($this->balance_adjustment);
|
$this->invoice->balance += floatval($this->balance_adjustment);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user