From 6cefa1fdff5a0b42e82f44fb0899bc58c9333c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Wed, 12 Sep 2018 21:19:50 +0800 Subject: [PATCH] Apply fixes from StyleCI (#138) [ci skip] [skip ci] --- src/Message.php | 2 +- tests/EasySmsTest.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Message.php b/src/Message.php index 50cdb38..67c7f82 100644 --- a/src/Message.php +++ b/src/Message.php @@ -92,7 +92,7 @@ public function getContent(GatewayInterface $gateway = null) */ public function getTemplate(GatewayInterface $gateway = null) { - return is_callable($this->template) ? call_user_func($this->template, $gateway) : $this->template; + return is_callable($this->template) ? call_user_func($this->template, $gateway) : $this->template; } /** diff --git a/tests/EasySmsTest.php b/tests/EasySmsTest.php index 807f359..4860d26 100644 --- a/tests/EasySmsTest.php +++ b/tests/EasySmsTest.php @@ -117,8 +117,12 @@ public function testFormatMessage() // callback $message = $easySms->formatMessage([ - 'content' => function(){ return 'content';}, - 'template' => function(){ return 'template';}, + 'content' => function () { + return 'content'; + }, + 'template' => function () { + return 'template'; + }, ]); $this->assertSame('content', $message->getContent());