Completed
Push — master ( b4617e...2ff698 )
by Dave
22:59 queued 17:34
created

HigherOrderMessage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 25
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A __call() 0 10 2
1
<?php
2
3
namespace Mockery;
4
5
class HigherOrderMessage 
6
{
7
    private $mock;
8
    private $method;
9
10
    public function __construct(MockInterface $mock, $method)
11
    {
12
        $this->mock = $mock;
13
        $this->method = $method;
14
    }
15
16
    /**
17
     * @return Mockery\Expectation
18
     */
19
    public function __call($method, $args)
20
    {
21
        $expectation = $this->mock->{$this->method}($method);
22
23
        if ($this->method !== "shouldNotHaveReceived") {
24
            return $expectation->withArgs($args);
25
        }
26
27
        return $expectation;
28
    }
29
}
30