mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Static Analysis
This commit is contained in:
parent
8c2b97dce5
commit
73ed01a9bc
@ -59,7 +59,7 @@ class ProcessPayment extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
$driver = $company_gateway
|
$driver = $company_gateway
|
||||||
->driver($invitation->contact->client)
|
->driver($invitation->contact->client) // @phpstan-ignore-line
|
||||||
->setPaymentMethod($data['payment_method_id'])
|
->setPaymentMethod($data['payment_method_id'])
|
||||||
->setPaymentHash($responder_data['payload']['ph']);
|
->setPaymentHash($responder_data['payload']['ph']);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
|
|||||||
* @package App\Models
|
* @package App\Models
|
||||||
* @property-read mixed $hashed_id
|
* @property-read mixed $hashed_id
|
||||||
* @property string $number
|
* @property string $number
|
||||||
* @property object|null $e_invoice
|
* @property object|array|null $e_invoice
|
||||||
* @property int $company_id
|
* @property int $company_id
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int $user_id
|
* @property int $user_id
|
||||||
|
@ -109,11 +109,10 @@ class LivewireInstantPayment
|
|||||||
$client = $invoices->first()->client;
|
$client = $invoices->first()->client;
|
||||||
|
|
||||||
/* pop non payable invoice from the $payable_invoices array */
|
/* 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();
|
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();
|
$payable_invoice_collection = collect();
|
||||||
|
|
||||||
foreach ($payable_invoices as $payable_invoice) {
|
foreach ($payable_invoices as $payable_invoice) {
|
||||||
|
@ -30,10 +30,10 @@ enum HttpVerb: string
|
|||||||
|
|
||||||
class Storecove
|
class Storecove
|
||||||
{
|
{
|
||||||
/** @var mixed $base_url */
|
/** @var string $base_url */
|
||||||
private string $base_url = 'https://api.storecove.com/api/v2/';
|
private string $base_url = 'https://api.storecove.com/api/v2/';
|
||||||
|
|
||||||
/** @var mixed $peppol_discovery */
|
/** @var array $peppol_discovery */
|
||||||
private array $peppol_discovery = [
|
private array $peppol_discovery = [
|
||||||
"documentTypes" => ["invoice"],
|
"documentTypes" => ["invoice"],
|
||||||
"network" => "peppol",
|
"network" => "peppol",
|
||||||
@ -42,7 +42,7 @@ class Storecove
|
|||||||
"identifier" => "DE:VAT"
|
"identifier" => "DE:VAT"
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var mixed $dbn_discovery */
|
/** @var array $dbn_discovery */
|
||||||
private array $dbn_discovery = [
|
private array $dbn_discovery = [
|
||||||
"documentTypes" => ["invoice"],
|
"documentTypes" => ["invoice"],
|
||||||
"network" => "dbnalliance",
|
"network" => "dbnalliance",
|
||||||
@ -88,7 +88,7 @@ class Storecove
|
|||||||
* Unused as yet
|
* Unused as yet
|
||||||
*
|
*
|
||||||
* @param mixed $document
|
* @param mixed $document
|
||||||
* @return void
|
* @return string|bool
|
||||||
*/
|
*/
|
||||||
public function sendJsonDocument($document)
|
public function sendJsonDocument($document)
|
||||||
{
|
{
|
||||||
@ -125,9 +125,9 @@ class Storecove
|
|||||||
* @param int $routing_id
|
* @param int $routing_id
|
||||||
* @param array $override_payload
|
* @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 = [
|
$payload = [
|
||||||
@ -162,7 +162,7 @@ class Storecove
|
|||||||
return $r->json()['guid'];
|
return $r->json()['guid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return $r;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ class Storecove
|
|||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return void
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function updateLegalEntity(int $id, array $data)
|
public function updateLegalEntity(int $id, array $data)
|
||||||
{
|
{
|
||||||
@ -336,6 +336,15 @@ class Storecove
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 = [])
|
private function httpClient(string $uri, string $verb, array $data, ?array $headers = [])
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -356,7 +365,7 @@ class Storecove
|
|||||||
nlog("Request error: {$e->getCode()}: " . $e->getMessage());
|
nlog("Request error: {$e->getCode()}: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $r;
|
return $r; // @phpstan-ignore-line
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user