1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for static analysis

This commit is contained in:
David Bomba 2023-08-09 07:44:34 +10:00
parent 45ed89d18a
commit d16328d611
2 changed files with 9 additions and 3 deletions

View File

@ -56,7 +56,11 @@ class BaseDriver extends AbstractPaymentDriver
/* The Invitation */
public $invitation;
/* The client */
/**
* The Client
*
* @var \App\Models\Client|null $client
*/
public $client;
/* Gateway capabilities */

View File

@ -891,9 +891,11 @@ class StripePaymentDriver extends BaseDriver
return Account::all();
}
public function setClientFromCustomer($customer)
public function setClientFromCustomer($customer): self
{
$this->client = ClientGatewayToken::query()->where('gateway_customer_reference', $customer)->client;
$this->client = ClientGatewayToken::query()->where('gateway_customer_reference', $customer)->first()->client;
return $this;
}
/**