diff --git a/src/Gateways/ErrorlogGateway.php b/src/Gateways/ErrorlogGateway.php index 80d2191..b605cf6 100644 --- a/src/Gateways/ErrorlogGateway.php +++ b/src/Gateways/ErrorlogGateway.php @@ -27,7 +27,7 @@ class ErrorlogGateway extends Gateway public function send($to, MessageInterface $message, Config $config) { if (is_array($to)) { - $to = join(',', $to); + $to = implode(',', $to); } $message = sprintf( diff --git a/src/Gateways/SendcloudGateway.php b/src/Gateways/SendcloudGateway.php index 84e662c..6d9f5b3 100644 --- a/src/Gateways/SendcloudGateway.php +++ b/src/Gateways/SendcloudGateway.php @@ -41,7 +41,7 @@ public function send($to, MessageInterface $message, Config $config) $params = [ 'smsUser' => $config->get('sms_user'), 'templateId' => $message->getTemplate(), - 'phone' => is_array($to) ? join(',', $to) : $to, + 'phone' => is_array($to) ? implode(',', $to) : $to, 'vars' => $this->formatTemplateVars($message->getData()), 'timestamp' => time(), ]; diff --git a/src/Messenger.php b/src/Messenger.php index e11edc8..be5fc7c 100644 --- a/src/Messenger.php +++ b/src/Messenger.php @@ -112,7 +112,7 @@ protected function formatGateways(array $gateways) $config = $this->easySms->getConfig(); foreach ($gateways as $gateway => $setting) { - if (is_integer($gateway) && is_string($setting)) { + if (is_int($gateway) && is_string($setting)) { $gateway = $setting; $setting = []; } diff --git a/tests/Gateways/SendcloudGatewayTest.php b/tests/Gateways/SendcloudGatewayTest.php index cd98b2d..2e39f45 100644 --- a/tests/Gateways/SendcloudGatewayTest.php +++ b/tests/Gateways/SendcloudGatewayTest.php @@ -39,7 +39,7 @@ public function testSend() foreach ($expected as $key => $value) { $signString[] = "{$key}={$value}"; } - $signString = join('&', $signString); + $signString = implode('&', $signString); $expectedSignature = md5("{$config['sms_key']}&{$signString}&{$config['sms_key']}");