Completed
Push — master ( 745336...aadd5d )
by Matthew
06:17
created

RecordingTrait::recordArgs()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 2
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