Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd519a1

Browse files
author
liuxin
committed
更正一些错误的参数类型提示 && fix catch trace info
1 parent 28bd9b9 commit dd519a1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

SensorsAnalytics.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private function _get_lib_properties() {
155155
$line = $trace[2]['line'];
156156

157157
$lib_properties['$lib_detail'] = "####$file##$line";
158-
} else if (count($trace > 3)) {
158+
} else if (count($trace) > 3) {
159159
if (isset($trace[3]['class'])) {
160160
// 类成员函数内调用
161161
$class = $trace[3]['class'];
@@ -192,6 +192,7 @@ private function _json_dumps($data) {
192192
* @param string $distinct_id 用户的唯一标识。
193193
* @param string $event_name 事件名称。
194194
* @param array $properties 事件的属性。
195+
* @return bool
195196
*/
196197
public function track($distinct_id, $event_name, $properties = array()) {
197198
if ($properties) {
@@ -208,6 +209,8 @@ public function track($distinct_id, $event_name, $properties = array()) {
208209
* @param string $distinct_id 用户注册之后的唯一标识。
209210
* @param string $original_id 用户注册前的唯一标识。
210211
* @param array $properties 事件的属性。
212+
* @return bool
213+
* @throws SensorsAnalyticsIllegalDataException
211214
*/
212215
public function track_signup($distinct_id, $original_id, $properties = array()) {
213216
if ($properties) {
@@ -335,9 +338,12 @@ public function close() {
335338

336339
/**
337340
* @param string $update_type
341+
* @param $event_name
338342
* @param string $distinct_id
339-
* @param array $profiles
340-
* @return boolean
343+
* @param $original_id
344+
* @param $properties
345+
* @return bool
346+
* @internal param array $profiles
341347
*/
342348
public function _track_event($update_type, $event_name, $distinct_id, $original_id, $properties) {
343349
$event_time = $this->_extract_user_time($properties);
@@ -508,7 +514,7 @@ protected function _do_request($data) {
508514
$http_response_header = curl_exec($ch);
509515
if (!$http_response_header) {
510516
throw new SensorsAnalyticsDebugException(
511-
"Failed to connect to SensorsAnalytics. [error='" + curl_error($ch) + "']");
517+
"Failed to connect to SensorsAnalytics. [error='" + curl_error($ch) + "']");
512518
}
513519

514520
$result = array(
@@ -522,7 +528,7 @@ protected function _do_request($data) {
522528
/**
523529
* 对待发送的数据进行编码
524530
*
525-
* @param string $msg_list
531+
* @param array $msg_list
526532
* @return string
527533
*/
528534
private function _encode_msg_list($msg_list) {
@@ -612,7 +618,7 @@ protected function _do_request($data) {
612618
/**
613619
* 对待发送的数据进行编码
614620
*
615-
* @param string $msg_list
621+
* @param array $msg_list
616622
* @return string
617623
*/
618624
private function _encode_msg_list($msg_list) {

0 commit comments

Comments
 (0)