Completed
Pull Request — master (#4)
by Timóteo
05:46
created

Wrapper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TZachi\PhalconRepository\Tests\Mock\Model;
6
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * Test model for ModelWrapperTest
11
 */
12
final class Wrapper
13
{
14
    /**
15
     * @var string
16
     */
17
    public static $methodName;
18
19
    /**
20
     * @var mixed[]
21
     */
22
    public static $args;
23
24
    /**
25
     * @var mixed
26
     */
27
    public static $returnValue;
28
29
    /**
30
     * @param mixed[] $arguments
31
     *
32
     * @return mixed
33
     */
34
    public static function __callStatic(string $name, array $arguments)
35
    {
36
        if ($name === self::$methodName) {
37
            TestCase::assertSame(self::$args, $arguments);
38
39
            return self::$returnValue;
40
        }
41
42
        return null;
43
    }
44
}
45