phpstan 1

This commit is contained in:
2025-03-10 15:55:22 +05:00
parent 6712e63a91
commit e59edfaeb9
5 changed files with 21 additions and 22 deletions

View File

@@ -5,7 +5,6 @@ namespace App\Http\Controllers;
use App\Http\Requests\OnlinePaymentStoreRequest; use App\Http\Requests\OnlinePaymentStoreRequest;
use App\Models\Payment\OnlinePaymentHistory; use App\Models\Payment\OnlinePaymentHistory;
use App\Repos\Payment\OnlinePaymentRepo; use App\Repos\Payment\OnlinePaymentRepo;
use GuzzleHttp\Psr7\Request;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;

View File

@@ -32,7 +32,7 @@ class VisaMasterMonthlyPaid extends Lens
*/ */
public function name(): string public function name(): string
{ {
return Carbon::create(date('Y').'-'.$this->month.'-01')->monthName ?? 'Ýanwar'; return Carbon::parse(date('Y').'-'.$this->month.'-01')->monthName ?? 'Ýanwar';
} }
/** /**

View File

@@ -8,16 +8,16 @@ trait HandlesBillingSyncing
{ {
$curl = curl_init(); $curl = curl_init();
curl_setopt_array($curl, array( curl_setopt_array($curl, [
CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new', CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new',
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '', CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10, CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0, CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true, CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{ CURLOPT_POSTFIELDS => '{
"ecomId" : "12345-12345-12345-12345", "ecomId" : "12345-12345-12345-12345",
"agentId" : "1304", "agentId" : "1304",
"eposId" : "30401238", "eposId" : "30401238",
@@ -26,15 +26,16 @@ curl_setopt_array($curl, array(
"amount" : 895.46, "amount" : 895.46,
"payPurpose" : "Mart 2025" "payPurpose" : "Mart 2025"
}', }',
CURLOPT_HTTPHEADER => array( CURLOPT_HTTPHEADER => [
'Authorization: Basic YWRtaW46UUFad3N4MTIz', 'Authorization: Basic YWRtaW46UUFad3N4MTIz',
'Content-Type: application/json' 'Content-Type: application/json',
), ],
)); ]);
$response = curl_exec($curl); $response = curl_exec($curl);
curl_close($curl); curl_close($curl);
return $response;
return $response;
} }
} }

View File

@@ -13,9 +13,9 @@ use Laravel\Nova\Makeable;
class OnlinePaymentRepo class OnlinePaymentRepo
{ {
use HandlesBillingSyncing;
use HandlesSberPeyments; use HandlesSberPeyments;
use HandlesVisaMasterPayments; use HandlesVisaMasterPayments;
use HandlesBillingSyncing;
use Makeable; use Makeable;
/** /**

View File

@@ -8,7 +8,6 @@ use App\Http\Controllers\OnlinePaymentController;
use App\Http\Controllers\PasswordChangeController; use App\Http\Controllers\PasswordChangeController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::middleware(['guest', 'setLocale'])->group(function () { Route::middleware(['guest', 'setLocale'])->group(function () {
Route::get('locale/{locale}', LocaleController::class)->name('locale.set'); Route::get('locale/{locale}', LocaleController::class)->name('locale.set');