Completed
Push — update/videopress-transcode-al... ( ffe79d...2d3973 )
by Kirk
13:06 queued 05:54
created

packages/analyzer/data/example-external.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * This file is not meant to be run. It is used as example input to the compatibility checker script
5
 */
6
7
// valid signature initialization with missing class
8
$sig = new Jetpack_Signature( 'abcd1234', 12345 );
0 ignored issues
show
'abcd1234' is of type string, but the function expects a array.

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...
9
10
// static method
11
Jetpack_Tracks_Client::record_event( array( '_en' => 'jetpack_sample_event' ) );
12
13
// assignment from static prop
14
$product_name = \JetpackTracking::$product_name;
15
16
// assignment to static prop
17
\Jetpack_Sync_Defaults::$default_options_whitelist = array( 'a', 'b', 'c' );
18
19
// use removed function
20
$id = jetpack_shortcode_get_videopress_id( array( 'foo' => 'bar' ) );