@@ -51,7 +51,7 @@ public function getRev() {
5151 return $ this ;
5252 }
5353 $ postStr = !empty ($ this ->postxml ) ? $ this ->postxml : file_get_contents ("php://input " );
54- !empty ($ postStr ) && $ this ->_receive = (array ) simplexml_load_string ($ postStr , 'SimpleXMLElement ' , LIBXML_NOCDATA );
54+ !empty ($ postStr ) && $ this ->_receive = (array )simplexml_load_string ($ postStr , 'SimpleXMLElement ' , LIBXML_NOCDATA );
5555 return $ this ;
5656 }
5757
@@ -70,9 +70,8 @@ public function getRevData() {
7070 public function getRevFrom () {
7171 if (isset ($ this ->_receive ['FromUserName ' ])) {
7272 return $ this ->_receive ['FromUserName ' ];
73- } else {
74- return false ;
7573 }
74+ return false ;
7675 }
7776
7877 /**
@@ -82,9 +81,8 @@ public function getRevFrom() {
8281 public function getRevTo () {
8382 if (isset ($ this ->_receive ['ToUserName ' ])) {
8483 return $ this ->_receive ['ToUserName ' ];
85- } else {
86- return false ;
8784 }
85+ return false ;
8886 }
8987
9088 /**
@@ -94,9 +92,8 @@ public function getRevTo() {
9492 public function getRevType () {
9593 if (isset ($ this ->_receive ['MsgType ' ])) {
9694 return $ this ->_receive ['MsgType ' ];
97- } else {
98- return false ;
9995 }
96+ return false ;
10097 }
10198
10299 /**
@@ -106,9 +103,8 @@ public function getRevType() {
106103 public function getRevID () {
107104 if (isset ($ this ->_receive ['MsgId ' ])) {
108105 return $ this ->_receive ['MsgId ' ];
109- } else {
110- return false ;
111106 }
107+ return false ;
112108 }
113109
114110 /**
@@ -118,9 +114,8 @@ public function getRevID() {
118114 public function getRevCtime () {
119115 if (isset ($ this ->_receive ['CreateTime ' ])) {
120116 return $ this ->_receive ['CreateTime ' ];
121- } else {
122- return false ;
123117 }
118+ return false ;
124119 }
125120
126121 /**
@@ -131,9 +126,8 @@ public function getRevCtime() {
131126 public function getRevCardPass () {
132127 if (isset ($ this ->_receive ['CardId ' ])) {
133128 return $ this ->_receive ['CardId ' ];
134- } else {
135- return false ;
136129 }
130+ return false ;
137131 }
138132
139133 /**
@@ -155,9 +149,8 @@ public function getRevCardGet() {
155149 }
156150 if (isset ($ array ) && count ($ array ) > 0 ) {
157151 return $ array ;
158- } else {
159- return false ;
160152 }
153+ return false ;
161154 }
162155
163156 /**
@@ -174,9 +167,8 @@ public function getRevCardDel() {
174167 }
175168 if (isset ($ array ) && count ($ array ) > 0 ) {
176169 return $ array ;
177- } else {
178- return false ;
179170 }
171+ return false ;
180172 }
181173
182174 /**
@@ -188,9 +180,8 @@ public function getRevContent() {
188180 return $ this ->_receive ['Content ' ];
189181 } else if (isset ($ this ->_receive ['Recognition ' ])) { //获取语音识别文字内容,需申请开通
190182 return $ this ->_receive ['Recognition ' ];
191- } else {
192- return false ;
193183 }
184+ return false ;
194185 }
195186
196187 /**
@@ -201,11 +192,10 @@ public function getRevPic() {
201192 if (isset ($ this ->_receive ['PicUrl ' ])) {
202193 return array (
203194 'mediaid ' => $ this ->_receive ['MediaId ' ],
204- 'picurl ' => (string ) $ this ->_receive ['PicUrl ' ], //防止picurl为空导致解析出错
195+ 'picurl ' => (string )$ this ->_receive ['PicUrl ' ], //防止picurl为空导致解析出错
205196 );
206- } else {
207- return false ;
208197 }
198+ return false ;
209199 }
210200
211201 /**
@@ -219,9 +209,8 @@ public function getRevLink() {
219209 'title ' => $ this ->_receive ['Title ' ],
220210 'description ' => $ this ->_receive ['Description ' ]
221211 );
222- } else {
223- return false ;
224212 }
213+ return false ;
225214 }
226215
227216 /**
@@ -236,9 +225,8 @@ public function getRevGeo() {
236225 'scale ' => $ this ->_receive ['Scale ' ],
237226 'label ' => $ this ->_receive ['Label ' ]
238227 );
239- } else {
240- return false ;
241228 }
229+ return false ;
242230 }
243231
244232 /**
@@ -284,7 +272,7 @@ public function getRevEvent() {
284272 public function getRevScanInfo () {
285273 if (isset ($ this ->_receive ['ScanCodeInfo ' ])) {
286274 if (!is_array ($ this ->_receive ['ScanCodeInfo ' ])) {
287- $ array = (array ) $ this ->_receive ['ScanCodeInfo ' ];
275+ $ array = (array )$ this ->_receive ['ScanCodeInfo ' ];
288276 $ this ->_receive ['ScanCodeInfo ' ] = $ array ;
289277 } else {
290278 $ array = $ this ->_receive ['ScanCodeInfo ' ];
@@ -319,13 +307,13 @@ public function getRevScanInfo() {
319307 public function getRevSendPicsInfo () {
320308 if (isset ($ this ->_receive ['SendPicsInfo ' ])) {
321309 if (!is_array ($ this ->_receive ['SendPicsInfo ' ])) {
322- $ array = (array ) $ this ->_receive ['SendPicsInfo ' ];
310+ $ array = (array )$ this ->_receive ['SendPicsInfo ' ];
323311 if (isset ($ array ['PicList ' ])) {
324- $ array ['PicList ' ] = (array ) $ array ['PicList ' ];
312+ $ array ['PicList ' ] = (array )$ array ['PicList ' ];
325313 $ item = $ array ['PicList ' ]['item ' ];
326314 $ array ['PicList ' ]['item ' ] = array ();
327315 foreach ($ item as $ key => $ value ) {
328- $ array ['PicList ' ]['item ' ][$ key ] = (array ) $ value ;
316+ $ array ['PicList ' ]['item ' ][$ key ] = (array )$ value ;
329317 }
330318 }
331319 $ this ->_receive ['SendPicsInfo ' ] = $ array ;
@@ -358,7 +346,7 @@ public function getRevSendPicsInfo() {
358346 public function getRevSendGeoInfo () {
359347 if (isset ($ this ->_receive ['SendLocationInfo ' ])) {
360348 if (!is_array ($ this ->_receive ['SendLocationInfo ' ])) {
361- $ array = (array ) $ this ->_receive ['SendLocationInfo ' ];
349+ $ array = (array )$ this ->_receive ['SendLocationInfo ' ];
362350 if (empty ($ array ['Poiname ' ])) {
363351 $ array ['Poiname ' ] = "" ;
364352 }
0 commit comments