Completed
Push — 2.0-dev ( 13891e...69bb11 )
by Takehiro
03:03 queued 10s
created

example.php (2 issues)

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
use Kwkm\MkLiveStatusClient as mk;
3
4
require __DIR__ . '/vendor/autoload.php';
5
6
$client = new mk\Client(
7
    array(
0 ignored issues
show
array('socketType' => 'u...ar/run/nagios/rw/live') is of type array<string,string,{"so..."socketPath":"string"}>, but the function expects a object<Kwkm\MkLiveStatusClient\Configuration>.

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...
8
        'socketType' => 'unix',
9
        'socketPath' => '/var/run/nagios/rw/live',
10
    )
11
);
12
13
$parser = new mk\Parser();
14
15
$filter = new mk\Filter();
16
$filter->equal('description', 'PING');
17
18
$lql = new mk\Lql(mk\Table::SERVICES);
19
$lql->columns(array('host_name', 'description', 'state'))->filter($filter);
0 ignored issues
show
The method columns() does not exist on Kwkm\MkLiveStatusClient\Lql. Did you maybe mean column()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
20
21
var_dump($parser->get($client->execute($lql)));
22
23