Skip to content

Commit

Permalink
Merge branch 'master' of github.com:overtrue/wechat into develop
Browse files Browse the repository at this point in the history
* 'master' of github.com:overtrue/wechat:
  Apply fixes from StyleCI (w7corp#706)
  Fix w7corp#601 (w7corp#705)
  Fix CS.
  add defaultColor
  • Loading branch information
never615 committed May 22, 2017
2 parents df4519b + 5b2b1b7 commit 3de206d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/OfficialAccount/TemplateMessage/TemplateMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ public function __construct(AccessToken $accessToken)
$this->messageBackup = $this->message;
}

/**
* Set default color.
*
* @param string $color example: #0f0f0f
*
* @return $this
*/
public function defaultColor($color)
{
$this->defaultColor = $color;

return $this;
}

/**
* Set industry.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static function createDefaultLogger()
{
$log = new Logger('EasyWeChat');

if (defined('PHPUNIT_RUNNING')) {
if (defined('PHPUNIT_RUNNING') || php_sapi_name() === 'cli') {
$log->pushHandler(new NullHandler());
} else {
$log->pushHandler(new ErrorLogHandler());
Expand Down

0 comments on commit 3de206d

Please sign in to comment.