Skip to content

Commit

Permalink
Apply fixes from StyleCI (overtrue#15)
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
overtrue authored Jun 1, 2017
1 parent 22753d1 commit 6b5cd1a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Gateways/ErrorlogGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/Gateways/SendcloudGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
];
Expand Down
2 changes: 1 addition & 1 deletion src/Messenger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Gateways/SendcloudGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']}");

Expand Down

0 comments on commit 6b5cd1a

Please sign in to comment.