MethodMatches   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A assert() 0 4 1
1
<?php
2
3
namespace Muzzle\Assertions;
4
5
use Muzzle\Messages\Transaction;
6
7
class MethodMatches implements Assertion
8
{
9
10
    public function assert(Transaction $actual, Transaction $expected) : void
11
    {
12
13
        $actual->request()->assertMethod($expected->request()->getMethod());
0 ignored issues
show
Bug introduced by
The method assertMethod() 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

13
        $actual->request()->/** @scrutinizer ignore-call */ assertMethod($expected->request()->getMethod());
Loading history...
14
    }
15
}
16