Completed
Push — master ( b565e5...956980 )
by Taosikai
13:35
created
examples/send_message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 $discussMember = $smartQQ->getDiscussDetail($discuss)
47 47
     ->getMembers()
48 48
     ->firstByAttribute('nick', '张三');
49
-$message = new FriendMessage($discussMember,  '你好');
49
+$message = new FriendMessage($discussMember, '你好');
50 50
 $result = $smartQQ->sendMessage($message);
51 51
 printR($result ? 'Send Success' : 'Send Error');
52 52
 
Please login to merge, or discard this patch.
src/Request/GetFriendsRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,19 +42,19 @@
 block discarded – undo
42 42
         //有时候获取好友接口retcode=100003时也可以获取数据,但数据不完整故当做无效返回
43 43
         if ($jsonData && $jsonData['retcode'] == 0) {
44 44
             //好友基本信息
45
-            $friendDatas = (new Collection($jsonData['result']['friends']))->combine('uin', function ($entity) {
45
+            $friendDatas = (new Collection($jsonData['result']['friends']))->combine('uin', function($entity) {
46 46
                 return $entity;
47 47
             })->toArray();
48 48
             //markNames
49
-            $markNames = (new Collection($jsonData['result']['marknames']))->combine('uin', function ($entity) {
49
+            $markNames = (new Collection($jsonData['result']['marknames']))->combine('uin', function($entity) {
50 50
                 return $entity;
51 51
             })->toArray();
52 52
             //分类
53
-            $categories = (new Collection($jsonData['result']['categories']))->combine('index', function ($entity) {
53
+            $categories = (new Collection($jsonData['result']['categories']))->combine('index', function($entity) {
54 54
                 return $entity;
55 55
             })->toArray();
56 56
             //vip信息
57
-            $vipInfos = (new Collection($jsonData['result']['vipinfo']))->combine('u', function ($entity) {
57
+            $vipInfos = (new Collection($jsonData['result']['vipinfo']))->combine('u', function($entity) {
58 58
                 return $entity;
59 59
             })->toArray();
60 60
             $friends = [];
Please login to merge, or discard this patch.
src/Request/SendGroupMessageRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 class SendGroupMessageRequest extends SendMessageRequest
12 12
 {
13
-    protected $uri =  'http://d1.web2.qq.com/channel/send_qun_msg2';
13
+    protected $uri = 'http://d1.web2.qq.com/channel/send_qun_msg2';
14 14
 
15 15
     protected $referer = 'http://d1.web2.qq.com/proxy.html?v=20151105001&callback=1&id=2';
16 16
 
Please login to merge, or discard this patch.
src/Request/GetDiscussDetailRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $jsonData = \GuzzleHttp\json_decode($response->getBody(), true);
41 41
         if ($jsonData && $jsonData['retcode'] == 0) {
42 42
             //成员在线状态
43
-            $statuses = (new Collection($jsonData['result']['mem_status']))->combine('uin', function ($entity) {
43
+            $statuses = (new Collection($jsonData['result']['mem_status']))->combine('uin', function($entity) {
44 44
                 return $entity;
45 45
             })->toArray();
46 46
             //成员基本信息
Please login to merge, or discard this patch.
src/Request/GetGroupDetailRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $jsonData = \GuzzleHttp\json_decode($response->getBody(), true);
41 41
         if ($jsonData && $jsonData['retcode'] == 0) {
42 42
             //群成员的vip信息
43
-            $vipInfos  = (new Collection($jsonData['result']['vipinfo']))->combine('u', function ($entity) {
43
+            $vipInfos = (new Collection($jsonData['result']['vipinfo']))->combine('u', function($entity) {
44 44
                 return $entity;
45 45
             })->toArray();
46 46
             //群成员的名片信息
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $members = [];
65 65
             foreach ($jsonData['result']['minfo'] as $memberData) {
66 66
                 $uin = $memberData['uin'];
67
-                $member  = EntityFactory::createEntity(GroupMember::class, [
67
+                $member = EntityFactory::createEntity(GroupMember::class, [
68 68
                     'flag' => isset($flags[$uin]) ? $flags[$uin] : null,
69 69
                     'nick' => $memberData['nick'],
70 70
                     'province' => $memberData['province'],
Please login to merge, or discard this patch.
src/Request/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
      */
146 146
     protected function processUri($uri)
147 147
     {
148
-        return preg_replace_callback('#\{([a-zA-Z0-9_,]*)\}#i', function ($matches) {
148
+        return preg_replace_callback('#\{([a-zA-Z0-9_,]*)\}#i', function($matches) {
149 149
             return isset($this->tokens[$matches[1]]) ? $this->tokens[$matches[1]] : '';
150 150
         }, $uri);
151 151
     }
Please login to merge, or discard this patch.
src/EntityCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function firstByAttribute($attributeName, $attributeValue)
19 19
     {
20
-        $callback = function ($entity) use ($attributeName, $attributeValue) {
20
+        $callback = function($entity) use ($attributeName, $attributeValue) {
21 21
             $method = 'get' . ucfirst($attributeName);
22 22
             return $entity->$method() == $attributeValue;
23 23
         };
Please login to merge, or discard this patch.
src/EntityFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function createEntities($entityClass, $dataArray)
18 18
     {
19
-        return array_map(function ($data) use ($entityClass) {
19
+        return array_map(function($data) use ($entityClass) {
20 20
             return static::createEntity($entityClass, $data);
21 21
         }, $dataArray);
22 22
     }
Please login to merge, or discard this patch.
src/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $x = array(
38 38
             0, $uin >> 24 & 0xff ^ 0x45,
39 39
             0, $uin >> 16 & 0xff ^ 0x43,
40
-            0, $uin >>  8 & 0xff ^ 0x4f,
40
+            0, $uin >> 8 & 0xff ^ 0x4f,
41 41
             0, $uin & 0xff ^ 0x4b,
42 42
         );
43 43
         for ($i = 0; $i < 64; ++$i) {
Please login to merge, or discard this patch.