for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
if (! function_exists('payments')) {
/**
* Return Payments interface.
*
* @param string|null $gateway
* @return \Nxmad\Larapay\Contracts\Payments|\Nxmad\Larapay\Abstracts\Gateway
*/
function payments(string $gateway = null)
{
$payments = app(\Nxmad\Larapay\Contracts\Payments::class);
app
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$payments = /** @scrutinizer ignore-call */ app(\Nxmad\Larapay\Contracts\Payments::class);
if (is_null($gateway)) {
return $payments;
}
return $payments->gateway($gateway);