Issues (17)

src/Assertions/QueryContains.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Muzzle\Assertions;
4
5
use Muzzle\Messages\Transaction;
6
use function GuzzleHttp\Psr7\parse_query;
7
8
class QueryContains implements Assertion
9
{
10
11
    public function assert(Transaction $actual, Transaction $expected) : void
12
    {
13
14
        if ($expected->request()->getUri()->getQuery() !== '') {
15
            $actual->request()->assertUriQueryContains(
0 ignored issues
show
The method assertUriQueryContains() does not exist on Psr\Http\Message\RequestInterface. It seems like you code against a sub-type of Psr\Http\Message\RequestInterface such as Muzzle\Messages\AssertableRequest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
            $actual->request()->/** @scrutinizer ignore-call */ assertUriQueryContains(
Loading history...
16
                parse_query($expected->request()->getUri()->getQuery())
17
            );
18
        }
19
    }
20
}
21