Completed
Push — master ( 7b3ac4...466150 )
by Andrii
03:45 queued 02:13
created

tests/test.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
#!/usr/bin/env php
2
<?php
3
4
use hiqdev\php\confirmator\Token;
5
6
require '_bootstrap.php';
7
8
$token = new Token([
0 ignored issues
show
array('action' => 'test') is of type array<string,string,{"action":"string"}>, but the function expects a object<hiqdev\php\confirmator\ServiceInterface>.

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
    'action' => 'test',
10
]);
11
12
var_dump($token);
13