@@ -21,7 +21,7 @@ |
||
21 | 21 | public function makeMessageParameter(Message $message, Credential $credential) |
22 | 22 | { |
23 | 23 | return [ |
24 | - 'content' => (string) $message->getContent(), |
|
24 | + 'content' => (string)$message->getContent(), |
|
25 | 25 | 'face' => $message->getFace(), |
26 | 26 | 'clientid' => $credential->getClientId(), |
27 | 27 | 'msg_id' => $message->getMsgId(), |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); |
56 | 56 | $hash = ''; |
57 | 57 | for ($i = 0; $i < 8; ++$i) { |
58 | - $hash .= $hex[$x[$i] >> 4 & 0xf].$hex[$x[$i] & 0xf]; |
|
58 | + $hash .= $hex[$x[$i] >> 4 & 0xf] . $hex[$x[$i] & 0xf]; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return $hash; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | { |
145 | 145 | list($s1, $s2) = explode(' ', microtime()); |
146 | 146 | |
147 | - return (float) sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000); |
|
147 | + return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
@@ -54,7 +54,7 @@ |
||
54 | 54 | protected static function applyProperties($entityInstance, $data) |
55 | 55 | { |
56 | 56 | foreach ($data as $property => $value) { |
57 | - $funcName = 'set'.ucfirst($property); |
|
57 | + $funcName = 'set' . ucfirst($property); |
|
58 | 58 | if (method_exists($entityInstance, $funcName)) { |
59 | 59 | $entityInstance->$funcName($value); |
60 | 60 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function __toString() |
51 | 51 | { |
52 | - return (string) $this->content->getContent(); |
|
52 | + return (string)$this->content->getContent(); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -128,13 +128,13 @@ |
||
128 | 128 | $fontParameters['style'] |
129 | 129 | ); |
130 | 130 | unset($contents[0]); |
131 | - $contentString = implode('', array_map(function($content){ |
|
131 | + $contentString = implode('', array_map(function($content) { |
|
132 | 132 | if ($content && is_array($content) && 'face' === $content[0]) { //处理表情 |
133 | 133 | $faceText = Content::searchFaceText($content[1]); |
134 | 134 | |
135 | - return $faceText ? '['.$faceText.']' : ''; |
|
135 | + return $faceText ? '[' . $faceText . ']' : ''; |
|
136 | 136 | } else { |
137 | - return (string) $content; |
|
137 | + return (string)$content; |
|
138 | 138 | } |
139 | 139 | }, $contents)); |
140 | 140 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function firstByAttribute($attributeName, $attributeValue) |
26 | 26 | { |
27 | 27 | $callback = function($entity) use ($attributeName, $attributeValue) { |
28 | - $method = 'get'.ucfirst($attributeName); |
|
28 | + $method = 'get' . ucfirst($attributeName); |
|
29 | 29 | |
30 | 30 | return $entity->$method() == $attributeValue; |
31 | 31 | }; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | */ |
5 | 5 | use Slince\SmartQQ\Client; |
6 | 6 | |
7 | -include __DIR__.'/bootstrap.php'; |
|
7 | +include __DIR__ . '/bootstrap.php'; |
|
8 | 8 | |
9 | 9 | //创建smartQQ客户端 |
10 | 10 | $smartQQ = new Client(getCredential()); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | */ |
5 | 5 | use Slince\SmartQQ\Client; |
6 | 6 | |
7 | -include __DIR__.'/bootstrap.php'; |
|
7 | +include __DIR__ . '/bootstrap.php'; |
|
8 | 8 | |
9 | 9 | //创建smartQQ客户端 |
10 | 10 | $smartQQ = new Client(getCredential()); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | */ |
5 | 5 | use Slince\SmartQQ\Client; |
6 | 6 | |
7 | -include __DIR__.'/bootstrap.php'; |
|
7 | +include __DIR__ . '/bootstrap.php'; |
|
8 | 8 | |
9 | 9 | //创建smartQQ客户端 |
10 | 10 | $smartQQ = new Client(getCredential()); |