Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanson authored and StyleCIBot committed Aug 14, 2017
1 parent 3d91663 commit ca526b1
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/Core/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ protected function waitForLogin()
}

$this->vbot->console->log('login time out!', Console::ERROR);

throw new LoginTimeoutException('Login time out.');
}

Expand Down Expand Up @@ -242,6 +243,7 @@ protected function init($first = true)
ApiExceptionHandler::handle($result, function ($result) {
$this->vbot->cache->forget('session.'.$this->vbot->config['session']);
$this->vbot->log->error('Init failed.'.json_encode($result));

throw new InitFailException('Init failed.');
});

Expand Down
9 changes: 6 additions & 3 deletions src/Extension/AbstractMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ abstract class AbstractMessageHandler
public $baseExtensions = [];

/**
* 拓展配置.
* 拓展é
* ç½®.
*
* @var
*/
Expand All @@ -49,7 +50,8 @@ public function init()
abstract public function register();

/**
* 开发者需要实现的方法.
* 开发è€
* 需要实现的方法.
*
* @param Collection $collection
*
Expand Down Expand Up @@ -103,7 +105,8 @@ final public function applicationInfo($collection)
}

/**
* 设置拓展开关.
* 设置拓展开å
* ³.
*
* @param bool $boolean
* @param $collection
Expand Down
2 changes: 1 addition & 1 deletion src/Foundation/ServiceProviders/MessageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function register(Vbot $vbot)
return new ShareFactory($vbot);
});

// $vbot->bind('text', function () use ($vbot) {
// $vbot->bind('text', function () use ($vbot) {
// return new Text($vbot);
// });
// $vbot->singleton('text', function () use ($vbot) {
Expand Down
3 changes: 2 additions & 1 deletion src/Message/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class Card extends Message implements MessageInterface
private $description;

/**
* 国内为省,国外为国.
* 国å†
* 为省,国外为国.
*
* @var string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Message/Emoticon.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public static function send($username, $mix)
}

/**
* 从本地表情库随机发送一个.
* 从本地表æƒ
* 库随机发送一个.
*
* @param $username
*
Expand Down
18 changes: 12 additions & 6 deletions src/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,22 @@ abstract class Message
public $from;

/**
* @var array 当from为群组时,sender为用户发送者
* @var array 当from为群组时,sender为用户发送è€
*/
public $sender = null;

/**
* 发送者 username.
* 发送è€
* username.
*
* @var
*/
public $username;

/**
* @var string 经处理的内容 (与类型无关 有可能是一串xml)
* @var string 经处理的å†
* 容 (与类型无å
* ³ 有可能是一串xml)
*/
public $message;

Expand All @@ -51,7 +54,8 @@ abstract class Message
public $time;

/**
* @var string 消息发送者类型
* @var string 消息发送è€
* 类型
*/
public $fromType;

Expand All @@ -75,7 +79,8 @@ protected function create($msg):array
}

/**
* 设置消息发送者.
* 设置消息发送è€
* .
*/
private function setFrom()
{
Expand Down Expand Up @@ -117,7 +122,8 @@ private function setUsername()
}

/**
* 处理群发消息的内容.
* 处理群发消息的å†
* 容.
*/
private function handleGroupContent()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Message/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Transfer extends Message implements MessageInterface
const TYPE = 'transfer';

/**
* 转账金额 单位 元.
* 转账金额 单位 å
* ƒ.
*
* @var string
*/
Expand Down

0 comments on commit ca526b1

Please sign in to comment.