Completed
Push — branch-7.5 ( 77a868...58010c )
by
unknown
14:01 queued 05:48
created

client.php ➔ jetpack_tracks_get_identity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @deprecated 7.5.0 use Automattic\Jetpack\Tracking->tracks_get_identity instead
5
 */
6
function jetpack_tracks_get_identity( $user_id ) {
7
	_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking->tracks_get_identity' );
8
9
	$tracking = new Automattic\Jetpack\Tracking( 'jetpack', Jetpack::connection() );
10
	return $tracking->tracks_get_identity( $user_id );
11
}
12
13
/**
14
 * @deprecated 7.5.0 use Automattic\Jetpack\Tracking->tracks_record_event instead
15
 */
16
function jetpack_tracks_record_event( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
17
	_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking->tracks_record_event' );
18
19
	$tracking = new Automattic\Jetpack\Tracking( 'jetpack', Jetpack::connection() );
20
	return $tracking->tracks_record_event( $user, $event_name, $properties, $event_timestamp_millis );
0 ignored issues
show
Documentation introduced by
$event_timestamp_millis is of type boolean, but the function expects a false|integer.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
21
}
22