From bf413d47b51fed624f93a9591d6e0d0234e791a1 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Tue, 26 Mar 2024 07:42:25 +0000 Subject: [PATCH] Apply fixes from StyleCI --- config/config.php | 14 +++---- resources/lang/en/errors.php | 26 ++++++------- resources/lang/tr/errors.php | 26 ++++++------- src/Balance/NetgsmAvailableCredit.php | 4 +- src/Balance/NetgsmPackages.php | 8 ++-- src/Iys/AbstractNetgsmIys.php | 14 +++---- src/Iys/Requests/Add.php | 18 ++++----- src/Iys/Requests/Search.php | 8 ++-- src/Netgsm.php | 4 +- src/NetgsmApiClient.php | 4 +- src/NetgsmServiceProvider.php | 2 +- src/Report/AbstractNetgsmReport.php | 8 ++-- src/Report/NetgsmSmsDetailReport.php | 20 +++++----- src/Report/NetgsmSmsReport.php | 42 ++++++++++----------- src/Sms/NetgsmOtpMessage.php | 18 ++++----- src/Sms/NetgsmSmsMessage.php | 8 ++-- tests/NetGsmChannelTest.php | 2 +- tests/NetGsmIysTest.php | 54 +++++++++++++-------------- tests/NetGsmReportDetailTest.php | 24 ++++++------ tests/NetGsmReportTest.php | 12 +++--- tests/NetGsmTest.php | 4 +- tests/NetgsmAvailableCreditTest.php | 4 +- tests/NetgsmAvailablePackagesTest.php | 4 +- 23 files changed, 164 insertions(+), 164 deletions(-) diff --git a/config/config.php b/config/config.php index 9eed397..cb8982a 100755 --- a/config/config.php +++ b/config/config.php @@ -3,14 +3,14 @@ return [ 'credentials' => [ 'user_code' => env('NETGSM_USERCODE'), - 'secret' => env('NETGSM_SECRET'), - 'brand_code'=> env('NETGSM_BRANDCODE'), + 'secret' => env('NETGSM_SECRET'), + 'brand_code' => env('NETGSM_BRANDCODE'), ], - 'defaults' => [ - 'language' => env('NETGSM_LANGUAGE', 'tr'), - 'header' => env('NETGSM_HEADER', null), + 'defaults' => [ + 'language' => env('NETGSM_LANGUAGE', 'tr'), + 'header' => env('NETGSM_HEADER', null), 'sms_sending_method' => env('NETGSM_SMS_SENDING_METHOD', 'get'), - 'base_uri' => env('NETGSM_BASE_URI', 'https://api.netgsm.com.tr'), - 'timeout' => env('NETGSM_TIMEOUT', 60), + 'base_uri' => env('NETGSM_BASE_URI', 'https://api.netgsm.com.tr'), + 'timeout' => env('NETGSM_TIMEOUT', 60), ], ]; diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index 6b1b89d..441f0f6 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -1,20 +1,20 @@ 'Message length limit exceeded.', - 'start_date_incorrect' => 'Invalid start date. Proceeded with system date.', - 'end_date_incorrect' => 'Invalid end date. Proceeded with system date.', - 'sender_incorrect' => 'Message title (sender name) is not defined in system', - 'credentials_incorrect' => 'Invalid username and password or user does not have API access', - 'parameters_incorrect' => 'invalid query. One of the parameters that you send is invalid or required parameters are missing.', - 'receiver_incorrect' => 'Invalid recipient.', + 'message_too_long' => 'Message length limit exceeded.', + 'start_date_incorrect' => 'Invalid start date. Proceeded with system date.', + 'end_date_incorrect' => 'Invalid end date. Proceeded with system date.', + 'sender_incorrect' => 'Message title (sender name) is not defined in system', + 'credentials_incorrect' => 'Invalid username and password or user does not have API access', + 'parameters_incorrect' => 'invalid query. One of the parameters that you send is invalid or required parameters are missing.', + 'receiver_incorrect' => 'Invalid recipient.', 'otp_account_not_defined' => 'There is no OTP SMS package in your account.', - 'query_limit_exceed' => 'Query limit exceeded.', - 'system_error' => 'system error.', - 'netgsm_general_error' => 'Netgsm responded an error :', - 'no_record' => 'No record', - 'job_id_not_found' => 'Job id not found', + 'query_limit_exceed' => 'Query limit exceeded.', + 'system_error' => 'system error.', + 'netgsm_general_error' => 'Netgsm responded an error :', + 'no_record' => 'No record', + 'job_id_not_found' => 'Job id not found', 'invalid_netgsm_message' => 'invalid netgsm message', - 'method_not_allowed' => ':method method is not allowed', + 'method_not_allowed' => ':method method is not allowed', ]; diff --git a/resources/lang/tr/errors.php b/resources/lang/tr/errors.php index 51bc439..353dbe7 100644 --- a/resources/lang/tr/errors.php +++ b/resources/lang/tr/errors.php @@ -1,20 +1,20 @@ 'Mesaj metnindeki bir problemden dolayı gönderilemedi veya standart maksimum mesaj karakter sayısını geçtiniz.', - 'start_date_incorrect' => 'Mesaj gönderim baslangıç tarihinde hata var. Sistem tarihi ile değiştirilip işleme alındı.', - 'end_date_incorrect' => 'Mesaj gönderim sonlandırılma tarihinde hata var. Sistem tarihi ile değiştirilip işleme alındı.Bitiş tarihi başlangıç tarihinden küçük girilmiş ise, sistem bitiş tarihine içinde bulunduğu tarihe 24 saat ekler.', - 'sender_incorrect' => 'Mesaj başlığınız (gönderici adınızın) sistemde tanımlı değil.', - 'credentials_incorrect' => 'Geçersiz kullanıcı adı, şifre veya kullanıcınızın API erişim izni yok.', - 'parameters_incorrect' => 'Hatalı sorgulama. Gönderdiğiniz parametrelerden birisi hatalı veya zorunlu alanlardan biri eksik.', - 'receiver_incorrect' => 'Gönderilen numara hatalı.', + 'message_too_long' => 'Mesaj metnindeki bir problemden dolayı gönderilemedi veya standart maksimum mesaj karakter sayısını geçtiniz.', + 'start_date_incorrect' => 'Mesaj gönderim baslangıç tarihinde hata var. Sistem tarihi ile değiştirilip işleme alındı.', + 'end_date_incorrect' => 'Mesaj gönderim sonlandırılma tarihinde hata var. Sistem tarihi ile değiştirilip işleme alındı.Bitiş tarihi başlangıç tarihinden küçük girilmiş ise, sistem bitiş tarihine içinde bulunduğu tarihe 24 saat ekler.', + 'sender_incorrect' => 'Mesaj başlığınız (gönderici adınızın) sistemde tanımlı değil.', + 'credentials_incorrect' => 'Geçersiz kullanıcı adı, şifre veya kullanıcınızın API erişim izni yok.', + 'parameters_incorrect' => 'Hatalı sorgulama. Gönderdiğiniz parametrelerden birisi hatalı veya zorunlu alanlardan biri eksik.', + 'receiver_incorrect' => 'Gönderilen numara hatalı.', 'otp_account_not_defined' => 'Hesabınızda OTP SMS Paketi tanımlı değildir.', - 'query_limit_exceed' => 'Hesabınızda OTP SMS Paketi tanımlı değildir.', - 'system_error' => 'Sistem hatası.', - 'netgsm_general_error' => 'Netgsm hatalı cevap döndü :', - 'no_record' => 'Kayıt yok', - 'job_id_not_found' => 'Job id bulunamadı', + 'query_limit_exceed' => 'Hesabınızda OTP SMS Paketi tanımlı değildir.', + 'system_error' => 'Sistem hatası.', + 'netgsm_general_error' => 'Netgsm hatalı cevap döndü :', + 'no_record' => 'Kayıt yok', + 'job_id_not_found' => 'Job id bulunamadı', 'invalid_netgsm_message' => 'Geçerli bir Netgsm mesajı değil', - 'method_not_allowed' => ':method metoduna izin verilmiyor', + 'method_not_allowed' => ':method metoduna izin verilmiyor', ]; diff --git a/src/Balance/NetgsmAvailableCredit.php b/src/Balance/NetgsmAvailableCredit.php index f00c1fc..80fdba9 100644 --- a/src/Balance/NetgsmAvailableCredit.php +++ b/src/Balance/NetgsmAvailableCredit.php @@ -30,8 +30,8 @@ class NetgsmAvailableCredit extends NetgsmApiClient * @var array */ protected $errorCodes = [ - '30' => NetgsmErrors::CREDENTIALS_INCORRECT, - '40' => NetgsmErrors::NO_RECORD, + '30' => NetgsmErrors::CREDENTIALS_INCORRECT, + '40' => NetgsmErrors::NO_RECORD, '100' => NetgsmErrors::SYSTEM_ERROR, ]; diff --git a/src/Balance/NetgsmPackages.php b/src/Balance/NetgsmPackages.php index 14b86d0..cdeb86f 100644 --- a/src/Balance/NetgsmPackages.php +++ b/src/Balance/NetgsmPackages.php @@ -23,8 +23,8 @@ class NetgsmPackages extends NetgsmApiClient * @var array */ protected $errorCodes = [ - '30' => NetgsmErrors::CREDENTIALS_INCORRECT, - '40' => NetgsmErrors::NO_RECORD, + '30' => NetgsmErrors::CREDENTIALS_INCORRECT, + '40' => NetgsmErrors::NO_RECORD, '100' => NetgsmErrors::SYSTEM_ERROR, ]; @@ -49,8 +49,8 @@ public function parseResponse(): array $columns = array_filter(explode('|', $row)); $columns = array_map('trim', $columns); $availablePackages[] = [ - 'amount' => (int) $columns[0], - 'amountType' => $columns[1] ?? null, + 'amount' => (int) $columns[0], + 'amountType' => $columns[1] ?? null, 'packageType' => $columns[2] ?? null, ]; } diff --git a/src/Iys/AbstractNetgsmIys.php b/src/Iys/AbstractNetgsmIys.php index c882f9c..5bc0ccb 100644 --- a/src/Iys/AbstractNetgsmIys.php +++ b/src/Iys/AbstractNetgsmIys.php @@ -20,17 +20,17 @@ abstract class AbstractNetgsmIys extends NetgsmApiClient public function send(): string { $response = $this->client->request($this->method, $this->url, [ - 'headers' => [ - 'Content-Type' => 'application/json', + 'headers' => [ + 'Content-Type' => 'application/json', ], 'json' => [ - 'header' => [ - 'username' => $this->credentials['user_code'], - 'password' => $this->credentials['secret'], + 'header' => [ + 'username' => $this->credentials['user_code'], + 'password' => $this->credentials['secret'], 'brandCode' => $this->credentials['brand_code'], ], - 'body' => [ - 'data' => $this->body, + 'body' => [ + 'data' => $this->body, ], ], ]); diff --git a/src/Iys/Requests/Add.php b/src/Iys/Requests/Add.php index 3cf2d47..3ebbbc0 100644 --- a/src/Iys/Requests/Add.php +++ b/src/Iys/Requests/Add.php @@ -146,15 +146,15 @@ public function setDefaults(array $defaults): self public function body(): array { return [ - 'refid' => $this->refId ?? null, - 'type' => $this->type ?? null, - 'source' => $this->source ?? null, - 'recipient' => $this->recipient ?? null, - 'status' => $this->status ?? null, - 'consentDate' => $this->consentDate ?? null, - 'recipientType' => $this->recipientType ?? null, - 'retailerCode' => $this->retailerCode ?? null, - 'retailerAccess' => $this->retailerAccess ?? null, + 'refid' => $this->refId ?? null, + 'type' => $this->type ?? null, + 'source' => $this->source ?? null, + 'recipient' => $this->recipient ?? null, + 'status' => $this->status ?? null, + 'consentDate' => $this->consentDate ?? null, + 'recipientType' => $this->recipientType ?? null, + 'retailerCode' => $this->retailerCode ?? null, + 'retailerAccess' => $this->retailerAccess ?? null, ]; } diff --git a/src/Iys/Requests/Search.php b/src/Iys/Requests/Search.php index 5b4eaad..eef6ec5 100644 --- a/src/Iys/Requests/Search.php +++ b/src/Iys/Requests/Search.php @@ -81,10 +81,10 @@ public function setDefaults(array $defaults): self public function body(): array { return [ - 'type' => $this->type ?? null, - 'recipient' => $this->recipient ?? null, - 'recipientType' => $this->recipientType ?? null, - 'refid' => $this->refId ?? null, + 'type' => $this->type ?? null, + 'recipient' => $this->recipient ?? null, + 'recipientType' => $this->recipientType ?? null, + 'refid' => $this->refId ?? null, ]; } diff --git a/src/Netgsm.php b/src/Netgsm.php index 6162fbe..63fe4dd 100644 --- a/src/Netgsm.php +++ b/src/Netgsm.php @@ -60,8 +60,8 @@ public function sendSms(AbstractNetgsmMessage $netgsmMessage) * Get sms status report between given dates. * * @param AbstractNetgsmReport $report - * @param $startDate - * @param $endDate + * @param $startDate + * @param $endDate * @param array $filters * @return Collection * diff --git a/src/NetgsmApiClient.php b/src/NetgsmApiClient.php index 9c8bd17..0663083 100644 --- a/src/NetgsmApiClient.php +++ b/src/NetgsmApiClient.php @@ -42,8 +42,8 @@ public function setCredentials(array $credentials): self /** * Sends requests to netgsm api endpoints with specified credentials. * - * @param $method - * @param $url + * @param $method + * @param $url * @param null $params * @param array $headers * @return string diff --git a/src/NetgsmServiceProvider.php b/src/NetgsmServiceProvider.php index 659abc3..f14833d 100644 --- a/src/NetgsmServiceProvider.php +++ b/src/NetgsmServiceProvider.php @@ -43,7 +43,7 @@ public function register() $client = new Client([ 'base_uri' => $config['defaults']['base_uri'], - 'timeout' => $config['defaults']['timeout'], + 'timeout' => $config['defaults']['timeout'], ]); return new Netgsm($client, $config['credentials'], $config['defaults']); diff --git a/src/Report/AbstractNetgsmReport.php b/src/Report/AbstractNetgsmReport.php index 7b17f67..e53ae9e 100644 --- a/src/Report/AbstractNetgsmReport.php +++ b/src/Report/AbstractNetgsmReport.php @@ -131,8 +131,8 @@ public function setPage(int $page): self /** * formats the value by specified type. * - * @param $value - * @param $format + * @param $value + * @param $format * @return int|string */ protected function formatValue($value, $format) @@ -160,7 +160,7 @@ protected function formatValue($value, $format) public function getReports(): Collection { $data = [ - 'page' => 1, + 'page' => 1, ]; $data = array_merge($data, $this->filters); @@ -190,7 +190,7 @@ public function getReports(): Collection /** * validates the response returned from netgsm report api. * - * @param $response + * @param $response * @return bool * * @throws ReportException diff --git a/src/Report/NetgsmSmsDetailReport.php b/src/Report/NetgsmSmsDetailReport.php index fe22357..33bfe10 100644 --- a/src/Report/NetgsmSmsDetailReport.php +++ b/src/Report/NetgsmSmsDetailReport.php @@ -39,9 +39,9 @@ class NetgsmSmsDetailReport extends AbstractNetgsmReport * @var array */ protected $filters = [ - 'type' => 1, + 'type' => 1, 'version' => 1, - 'view' => 2, + 'view' => 2, ]; /** @@ -65,26 +65,26 @@ public function setBulkId($bulkId): AbstractNetgsmReport /** * Processes and returns a report line. * - * @param $line + * @param $line * @return array */ public function processRow($line): array { return [ - 'jobId' => (int) $line->msginfo->jobID, - 'message' => (string) $line->msginfo->msg, + 'jobId' => (int) $line->msginfo->jobID, + 'message' => (string) $line->msginfo->msg, 'startDate' => (string) $line->datetime->startdate, - 'endDate' => (string) $line->datetime->stopdate, - 'status' => (string) $line->msginfo->state, - 'total' => (string) $line->msginfo->total, - 'header' => (string) $line->msginfo->msgheader, + 'endDate' => (string) $line->datetime->stopdate, + 'status' => (string) $line->msginfo->state, + 'total' => (string) $line->msginfo->total, + 'header' => (string) $line->msginfo->msgheader, ]; } /** * Parses the XML response returned from the Netgsm API service. * - * @param $response + * @param $response * @return Collection * * @throws \TarfinLabs\Netgsm\Exceptions\ReportException diff --git a/src/Report/NetgsmSmsReport.php b/src/Report/NetgsmSmsReport.php index fd1a842..1f62731 100644 --- a/src/Report/NetgsmSmsReport.php +++ b/src/Report/NetgsmSmsReport.php @@ -25,7 +25,7 @@ class NetgsmSmsReport extends AbstractNetgsmReport * @var array */ protected $filters = [ - 'type' => 2, + 'type' => 2, 'version' => 2, ]; @@ -34,28 +34,28 @@ class NetgsmSmsReport extends AbstractNetgsmReport */ protected $columnMap = [ 0 => [ - 'jobId' => 'integer', - 'phone' => 'string', + 'jobId' => 'integer', + 'phone' => 'string', 'status' => 'integer', ], 1 => [ - 'jobId' => 'integer', - 'phone' => 'string', + 'jobId' => 'integer', + 'phone' => 'string', 'status' => 'integer', ], 2 => [ - 'jobId' => 'integer', - 'phone' => 'string', - 'status' => 'integer', + 'jobId' => 'integer', + 'phone' => 'string', + 'status' => 'integer', 'operatorCode' => 'integer', - 'length' => 'integer', - 'startDate' => 'date', - 'startTime' => 'date', - 'errorCode' => 'integer', + 'length' => 'integer', + 'startDate' => 'date', + 'startTime' => 'date', + 'errorCode' => 'integer', ], 3 => [ - 'jobId' => 'integer', - 'phone' => 'string', + 'jobId' => 'integer', + 'phone' => 'string', 'status' => 'integer', ], ]; @@ -64,14 +64,14 @@ class NetgsmSmsReport extends AbstractNetgsmReport * @var array */ protected $columns = [ - 'jobId' => null, - 'phone' => null, - 'status' => null, + 'jobId' => null, + 'phone' => null, + 'status' => null, 'operatorCode' => null, - 'length' => null, - 'startDate' => null, - 'startTime' => null, - 'errorCode' => null, + 'length' => null, + 'startDate' => null, + 'startTime' => null, + 'errorCode' => null, ]; /** diff --git a/src/Sms/NetgsmOtpMessage.php b/src/Sms/NetgsmOtpMessage.php index 4d3e099..ceabd60 100644 --- a/src/Sms/NetgsmOtpMessage.php +++ b/src/Sms/NetgsmOtpMessage.php @@ -9,13 +9,13 @@ class NetgsmOtpMessage extends AbstractNetgsmMessage protected $url = 'sms/send/otp'; protected $errorCodes = [ - '20' => NetgsmErrors::MESSAGE_TOO_LONG, - '30' => NetgsmErrors::CREDENTIALS_INCORRECT, - '40' => NetgsmErrors::SENDER_INCORRECT, - '50' => NetgsmErrors::RECEIVER_INCORRECT, - '60' => NetgsmErrors::OTP_ACCOUNT_NOT_DEFINED, - '70' => NetgsmErrors::PARAMETERS_INCORRECT, - '80' => NetgsmErrors::QUERY_LIMIT_EXCEED, + '20' => NetgsmErrors::MESSAGE_TOO_LONG, + '30' => NetgsmErrors::CREDENTIALS_INCORRECT, + '40' => NetgsmErrors::SENDER_INCORRECT, + '50' => NetgsmErrors::RECEIVER_INCORRECT, + '60' => NetgsmErrors::OTP_ACCOUNT_NOT_DEFINED, + '70' => NetgsmErrors::PARAMETERS_INCORRECT, + '80' => NetgsmErrors::QUERY_LIMIT_EXCEED, '100' => NetgsmErrors::SYSTEM_ERROR, ]; @@ -69,8 +69,8 @@ protected function mappers(): array { return [ 'msgheader' => $this->header ?? $this->defaults['header'], - 'msg' => $this->message, - 'no' => is_array($this->recipients) ? $this->recipients[0] : $this->recipients, + 'msg' => $this->message, + 'no' => is_array($this->recipients) ? $this->recipients[0] : $this->recipients, ]; } } diff --git a/src/Sms/NetgsmSmsMessage.php b/src/Sms/NetgsmSmsMessage.php index 9d6ad18..8feae4b 100644 --- a/src/Sms/NetgsmSmsMessage.php +++ b/src/Sms/NetgsmSmsMessage.php @@ -63,12 +63,12 @@ protected function createXmlPost(): string protected function mappers(): array { return [ - 'gsmno' => implode(',', $this->recipients), + 'gsmno' => implode(',', $this->recipients), 'msgheader' => $this->header ?? $this->defaults['header'], - 'message' => $this->message, + 'message' => $this->message, 'startdate' => ! empty($this->startDate) ? $this->startDate->format('dmYHi') : null, - 'stopdate' => ! empty($this->endDate) ? $this->endDate->format('dmYHi') : null, - 'izin' => (int) $this->isAuthorizedData(), + 'stopdate' => ! empty($this->endDate) ? $this->endDate->format('dmYHi') : null, + 'izin' => (int) $this->isAuthorizedData(), ]; } } diff --git a/tests/NetGsmChannelTest.php b/tests/NetGsmChannelTest.php index 48048a8..93d41c0 100644 --- a/tests/NetGsmChannelTest.php +++ b/tests/NetGsmChannelTest.php @@ -44,7 +44,7 @@ public function setUp(): void $this->netgsm = Mockery::mock(new Netgsm($this->httpClient, [ 'user_code' => '', - 'secret' => '', + 'secret' => '', ])); $this->channel = new NetGsmChannel($this->netgsm); diff --git a/tests/NetGsmIysTest.php b/tests/NetGsmIysTest.php index 35ad786..eef21f0 100644 --- a/tests/NetGsmIysTest.php +++ b/tests/NetGsmIysTest.php @@ -26,8 +26,8 @@ public function setUp(): void $this->response = Mockery::mock(ResponseInterface::class); $this->netgsm = new Netgsm($this->httpClient, [ - 'user_code' => 'test', - 'secret' => 'test', + 'user_code' => 'test', + 'secret' => 'test', 'brand_code' => 123456, ]); } @@ -37,20 +37,20 @@ public function it_makes_add_requests_for_iys_addresses() { $data = [ 'headers' => [ - 'Content-Type' => 'application/json', + 'Content-Type' => 'application/json', ], - 'json' => [ + 'json' => [ 'header' => [ - 'username' => 'test', - 'password' => 'test', - 'brandCode' => 123456, + 'username' => 'test', + 'password' => 'test', + 'brandCode' => 123456, ], - 'body' => [ + 'body' => [ 'data' => [ [ - 'refid' => $this->faker->numerify('####'), - 'type' => $this->faker->randomElement(['MESAJ', 'ARAMA']), - 'source' => $this->faker->randomElement([ + 'refid' => $this->faker->numerify('####'), + 'type' => $this->faker->randomElement(['MESAJ', 'ARAMA']), + 'source' => $this->faker->randomElement([ 'HS_WEB', 'HS_FIZIKSEL_ORTAM', 'HS_ISLAK_IMZA', @@ -65,12 +65,12 @@ public function it_makes_add_requests_for_iys_addresses() 'HS_ATM', 'HS_KARAR', ]), - 'recipient' => $this->faker->numerify('+905#########'), - 'status' => $this->faker->randomElement(['ONAY', 'RET']), - 'consentDate' => $this->faker->date('Y-m-d H:i:s'), + 'recipient' => $this->faker->numerify('+905#########'), + 'status' => $this->faker->randomElement(['ONAY', 'RET']), + 'consentDate' => $this->faker->date('Y-m-d H:i:s'), 'recipientType' => $this->faker->randomElement(['BIREYSEL', 'TACIR']), - 'retailerCode' => null, - 'retailerAccess'=> null, + 'retailerCode' => null, + 'retailerAccess' => null, ], ], ], @@ -94,21 +94,21 @@ public function it_makes_search_requests_for_iys_addresses() { $data = [ 'headers' => [ - 'Content-Type' => 'application/json', + 'Content-Type' => 'application/json', ], - 'json' => [ - 'header' => [ - 'username' => 'test', - 'password' => 'test', - 'brandCode' => 123456, + 'json' => [ + 'header' => [ + 'username' => 'test', + 'password' => 'test', + 'brandCode' => 123456, ], - 'body' => [ - 'data' => [ + 'body' => [ + 'data' => [ [ - 'type' => $this->faker->randomElement(['MESAJ', 'ARAMA']), - 'recipient' => $this->faker->numerify('+905#########'), + 'type' => $this->faker->randomElement(['MESAJ', 'ARAMA']), + 'recipient' => $this->faker->numerify('+905#########'), 'recipientType' => $this->faker->randomElement(['BIREYSEL', 'TACIR']), - 'refid' => $this->faker->numerify('####'), + 'refid' => $this->faker->numerify('####'), ], ], ], diff --git a/tests/NetGsmReportDetailTest.php b/tests/NetGsmReportDetailTest.php index 5dd4876..adc97fa 100644 --- a/tests/NetGsmReportDetailTest.php +++ b/tests/NetGsmReportDetailTest.php @@ -32,13 +32,13 @@ public function setUp(): void $this->netgsm = new Netgsm($this->httpClient, [ 'user_code' => $this->faker->userName, - 'secret' => $this->faker->password, + 'secret' => $this->faker->password, ]); } /** - * @param $rowCount - * @param $times + * @param $rowCount + * @param $times * @return array */ protected function mockReportApiRequest($rowCount, $times) @@ -71,7 +71,7 @@ protected function mockReportApiRequest($rowCount, $times) } /** - * @param $rowCount + * @param $rowCount * @return array */ protected function generateResponse($rowCount): array @@ -79,13 +79,13 @@ protected function generateResponse($rowCount): array $response = []; for ($i = 0; $i < $rowCount; $i++) { $response[] = [ - 'jobId' => $this->faker->numberBetween(11111, 99999), + 'jobId' => $this->faker->numberBetween(11111, 99999), 'startDate' => $this->faker->date, - 'endDate' => $this->faker->date, - 'header' => $this->faker->word, - 'message' => $this->faker->sentence, - 'status' => $this->faker->randomElement(range(1, 9)), - 'total' => $this->faker->numberBetween(1, 10), + 'endDate' => $this->faker->date, + 'header' => $this->faker->word, + 'message' => $this->faker->sentence, + 'status' => $this->faker->randomElement(range(1, 9)), + 'total' => $this->faker->numberBetween(1, 10), ]; } @@ -93,7 +93,7 @@ protected function generateResponse($rowCount): array } /** - * @param $items + * @param $items * @return string|null */ protected function convertXml($items) @@ -122,7 +122,7 @@ protected function convertXml($items) /** * @param array $items - * @param $version + * @param $version * @return Collection */ protected function convertCollection(array $items, int $version): Collection diff --git a/tests/NetGsmReportTest.php b/tests/NetGsmReportTest.php index cf683e2..d0a394a 100644 --- a/tests/NetGsmReportTest.php +++ b/tests/NetGsmReportTest.php @@ -31,12 +31,12 @@ public function setUp(): void $this->netgsm = new Netgsm($this->httpClient, [ 'user_code' => $this->faker->userName, - 'secret' => $this->faker->password, + 'secret' => $this->faker->password, ]); } /** - * @param $response + * @param $response */ protected function mockReportApiRequest($response) { @@ -49,8 +49,8 @@ protected function mockReportApiRequest($response) } /** - * @param $version - * @param $rowCount + * @param $version + * @param $rowCount * @return array */ protected function generateResponse($version, $rowCount): array @@ -103,7 +103,7 @@ protected function generateResponse($version, $rowCount): array } /** - * @param $items + * @param $items * @return string|null */ protected function convertRaw($items) @@ -118,7 +118,7 @@ protected function convertRaw($items) /** * @param array $items - * @param $version + * @param $version * @return Collection */ protected function convertCollection(array $items, int $version): Collection diff --git a/tests/NetGsmTest.php b/tests/NetGsmTest.php index 1aa0744..3395805 100644 --- a/tests/NetGsmTest.php +++ b/tests/NetGsmTest.php @@ -31,7 +31,7 @@ public function setUp(): void $this->netgsm = new Netgsm($this->httpClient, [ 'user_code' => $this->faker->userName, - 'secret' => $this->faker->password, + 'secret' => $this->faker->password, ], [ 'language' => $this->faker->languageCode, 'header' => $this->faker->word, @@ -40,7 +40,7 @@ public function setUp(): void } /** - * @param $phone + * @param $phone * @return NetgsmSmsMessage */ protected function newSmsMessage($phone = null) diff --git a/tests/NetgsmAvailableCreditTest.php b/tests/NetgsmAvailableCreditTest.php index 126f323..d1e0a3b 100644 --- a/tests/NetgsmAvailableCreditTest.php +++ b/tests/NetgsmAvailableCreditTest.php @@ -28,12 +28,12 @@ public function setUp(): void $this->netgsm = new Netgsm($this->httpClient, [ 'user_code' => $this->faker->userName, - 'secret' => $this->faker->password, + 'secret' => $this->faker->password, ]); } /** - * @param $response + * @param $response */ protected function mockCreditApiRequest($response) { diff --git a/tests/NetgsmAvailablePackagesTest.php b/tests/NetgsmAvailablePackagesTest.php index e6f1549..5299d1f 100644 --- a/tests/NetgsmAvailablePackagesTest.php +++ b/tests/NetgsmAvailablePackagesTest.php @@ -28,12 +28,12 @@ public function setUp(): void $this->netgsm = new Netgsm($this->httpClient, [ 'user_code' => $this->faker->userName, - 'secret' => $this->faker->password, + 'secret' => $this->faker->password, ]); } /** - * @param $response + * @param $response */ protected function mockCreditApiRequest($response) {