Passed
Pull Request — master (#57)
by Matthew
07:32
created

RecordingTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Dtc\QueueBundle\Tests;
4
5
trait RecordingTrait
6
{
7
    public $calls;
8
    public $returns;
9
10
    private function recordArgs($function, $args)
11
    {
12
        $this->calls[$function][] = $args;
13
        if (!empty($this->returns[$function])) {
14
            return array_pop($this->returns[$function]);
15
        }
16
17
        return null;
18
    }
19
}
20