diff --git a/app/Livewire/Flow2/ProcessPayment.php b/app/Livewire/Flow2/ProcessPayment.php index 175092a98ca7..a761b8440dab 100644 --- a/app/Livewire/Flow2/ProcessPayment.php +++ b/app/Livewire/Flow2/ProcessPayment.php @@ -59,7 +59,7 @@ class ProcessPayment extends Component } $driver = $company_gateway - ->driver($invitation->contact->client) + ->driver($invitation->contact->client) // @phpstan-ignore-line ->setPaymentMethod($data['payment_method_id']) ->setPaymentHash($responder_data['payload']['ph']); diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index dece6ea475e3..749b4c32e2e9 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -31,7 +31,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio * @package App\Models * @property-read mixed $hashed_id * @property string $number - * @property object|null $e_invoice + * @property object|array|null $e_invoice * @property int $company_id * @property int $id * @property int $user_id diff --git a/app/Services/ClientPortal/LivewireInstantPayment.php b/app/Services/ClientPortal/LivewireInstantPayment.php index 83b0a5e540b0..e08a61759eb9 100644 --- a/app/Services/ClientPortal/LivewireInstantPayment.php +++ b/app/Services/ClientPortal/LivewireInstantPayment.php @@ -109,11 +109,10 @@ class LivewireInstantPayment $client = $invoices->first()->client; /* pop non payable invoice from the $payable_invoices array */ - $payable_invoices = $payable_invoices->filter(function ($payable_invoice) use ($invoices) { + $payable_invoices = $payable_invoices->filter(function ($payable_invoice) use ($invoices) { // @phpstan-ignore-line return $invoices->where('hashed_id', $payable_invoice['invoice_id'])->first(); }); - //$payable_invoices = $payable_invoices->map(function ($payable_invoice) use ($invoices, $settings) { $payable_invoice_collection = collect(); foreach ($payable_invoices as $payable_invoice) { diff --git a/app/Services/EDocument/Gateway/Storecove/Storecove.php b/app/Services/EDocument/Gateway/Storecove/Storecove.php index b1734df5f11d..335012f473dc 100644 --- a/app/Services/EDocument/Gateway/Storecove/Storecove.php +++ b/app/Services/EDocument/Gateway/Storecove/Storecove.php @@ -30,10 +30,10 @@ enum HttpVerb: string class Storecove { - /** @var mixed $base_url */ + /** @var string $base_url */ private string $base_url = 'https://api.storecove.com/api/v2/'; - /** @var mixed $peppol_discovery */ + /** @var array $peppol_discovery */ private array $peppol_discovery = [ "documentTypes" => ["invoice"], "network" => "peppol", @@ -42,7 +42,7 @@ class Storecove "identifier" => "DE:VAT" ]; - /** @var mixed $dbn_discovery */ + /** @var array $dbn_discovery */ private array $dbn_discovery = [ "documentTypes" => ["invoice"], "network" => "dbnalliance", @@ -88,7 +88,7 @@ class Storecove * Unused as yet * * @param mixed $document - * @return void + * @return string|bool */ public function sendJsonDocument($document) { @@ -125,9 +125,9 @@ class Storecove * @param int $routing_id * @param array $override_payload * - * @return string|null + * @return string|\Illuminate\Http\Client\Response */ - public function sendDocument(string $document, int $routing_id, array $override_payload = []): ?string + public function sendDocument(string $document, int $routing_id, array $override_payload = []) { $payload = [ @@ -162,7 +162,7 @@ class Storecove return $r->json()['guid']; } - return null; + return $r; } @@ -261,7 +261,7 @@ class Storecove * * @param int $id * @param array $data - * @return void + * @return array */ public function updateLegalEntity(int $id, array $data) { @@ -335,7 +335,16 @@ class Storecove ], $headers); } - + + /** + * httpClient + * + * @param string $uri + * @param string $verb + * @param array $data + * @param array $headers + * @return \Illuminate\Http\Client\Response + */ private function httpClient(string $uri, string $verb, array $data, ?array $headers = []) { @@ -356,7 +365,7 @@ class Storecove nlog("Request error: {$e->getCode()}: " . $e->getMessage()); } - return $r; + return $r; // @phpstan-ignore-line } }