mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01: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
|
||||
{
|
||||
private $invoice;
|
||||
public $invoice;
|
||||
|
||||
private $balance_adjustment;
|
||||
public $balance_adjustment;
|
||||
|
||||
public function __construct($invoice, $balance_adjustment)
|
||||
{
|
||||
@ -29,7 +29,7 @@ class UpdateBalance extends AbstractService
|
||||
public function run()
|
||||
{
|
||||
if ($this->invoice->is_deleted) {
|
||||
return;
|
||||
return $this->invoice;
|
||||
}
|
||||
|
||||
$this->invoice->balance += floatval($this->balance_adjustment);
|
||||
|
Loading…
Reference in New Issue
Block a user