Completed
Push — master ( cb6d1a...b65a24 )
by Taosikai
18:00 queued 02:58
created
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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
      */
25 25
     public function firstByAttribute($attributeName, $attributeValue)
26 26
     {
27
-        $callback = function ($entity) use ($attributeName, $attributeValue) {
28
-            $method = 'get'.ucfirst($attributeName);
27
+        $callback = function($entity) use ($attributeName, $attributeValue) {
28
+            $method = 'get' . ucfirst($attributeName);
29 29
 
30 30
             return $entity->$method() == $attributeValue;
31 31
         };
Please login to merge, or discard this patch.
src/CredentialResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     {
113 113
         //获取二维码资源
114 114
         $response = $this->sendRequest(new Request\GetQrCodeRequest());
115
-        call_user_func($this->callback, (string) $response->getBody());
115
+        call_user_func($this->callback, (string)$response->getBody());
116 116
     }
117 117
 
118 118
     /**
Please login to merge, or discard this patch.
src/MessageHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         if (!is_callable($handler)) {
74 74
             throw new InvalidArgumentException('Message handler should be callable.');
75 75
         }
76
-        $this->eventDispatcher->addListener(static::EVENT_MESSAGE, function (Event $event) use ($handler) {
76
+        $this->eventDispatcher->addListener(static::EVENT_MESSAGE, function(Event $event) use ($handler) {
77 77
             $handler($event->getArgument('message'));
78 78
         });
79 79
     }
Please login to merge, or discard this patch.
src/EntityFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public static function createEntities($entityClass, $dataArray)
24 24
     {
25
-        return array_map(function ($data) use ($entityClass) {
25
+        return array_map(function($data) use ($entityClass) {
26 26
             return static::createEntity($entityClass, $data);
27 27
         }, $dataArray);
28 28
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
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
             }
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
@@ -49,19 +49,19 @@
 block discarded – undo
49 49
         //有时候获取好友接口retcode=100003时也可以获取数据,但数据不完整故当做无效返回
50 50
         if ($jsonData && 0 == $jsonData['retcode']) {
51 51
             //好友基本信息
52
-            $friendDatas = (new Collection($jsonData['result']['friends']))->combine('uin', function ($entity) {
52
+            $friendDatas = (new Collection($jsonData['result']['friends']))->combine('uin', function($entity) {
53 53
                 return $entity;
54 54
             })->toArray();
55 55
             //markNames
56
-            $markNames = (new Collection($jsonData['result']['marknames']))->combine('uin', function ($entity) {
56
+            $markNames = (new Collection($jsonData['result']['marknames']))->combine('uin', function($entity) {
57 57
                 return $entity;
58 58
             })->toArray();
59 59
             //分类
60
-            $categories = (new Collection($jsonData['result']['categories']))->combine('index', function ($entity) {
60
+            $categories = (new Collection($jsonData['result']['categories']))->combine('index', function($entity) {
61 61
                 return $entity;
62 62
             })->toArray();
63 63
             //vip信息
64
-            $vipInfos = (new Collection($jsonData['result']['vipinfo']))->combine('u', function ($entity) {
64
+            $vipInfos = (new Collection($jsonData['result']['vipinfo']))->combine('u', function($entity) {
65 65
                 return $entity;
66 66
             })->toArray();
67 67
             $friends = [];
Please login to merge, or discard this patch.
src/Request/GetLnickRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     {
43 43
         $jsonData = \GuzzleHttp\json_decode($response->getBody(), true);
44 44
         if ($jsonData && 0 == $jsonData['retcode']) {
45
-            $info = (new Collection($jsonData['result']))->filter(function ($info) use ($friend) {
45
+            $info = (new Collection($jsonData['result']))->filter(function($info) use ($friend) {
46 46
                 return $info['uin'] == $friend->getUin();
47 47
             })->first();
48 48
 
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
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $jsonData = \GuzzleHttp\json_decode($response->getBody(), true);
48 48
         if ($jsonData && 0 == $jsonData['retcode']) {
49 49
             //成员在线状态
50
-            $statuses = (new Collection($jsonData['result']['mem_status']))->combine('uin', function ($entity) {
50
+            $statuses = (new Collection($jsonData['result']['mem_status']))->combine('uin', function($entity) {
51 51
                 return $entity;
52 52
             })->toArray();
53 53
             //成员基本信息
Please login to merge, or discard this patch.
src/Request/PollMessagesRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -129,13 +129,13 @@
 block discarded – undo
129 129
             $fontParameters['style']
130 130
         );
131 131
         unset($contents[0]);
132
-        $contentString = implode('', array_map(function ($content) {
132
+        $contentString = implode('', array_map(function($content) {
133 133
             if ($content && is_array($content) && 'face' === $content[0]) { //处理表情
134 134
                 $faceText = Content::searchFaceText($content[1]);
135 135
 
136
-                return $faceText ? '['.$faceText.']' : '';
136
+                return $faceText ? '[' . $faceText . ']' : '';
137 137
             } else {
138
-                return (string) $content;
138
+                return (string)$content;
139 139
             }
140 140
         }, $contents));
141 141
 
Please login to merge, or discard this patch.