Completed
Push — master ( ef8414...a67d49 )
by Richard
10s
created

CustomAssertion   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
cbo 1
dl 0
loc 21
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A clearCalls() 0 4 1
A getCalls() 0 4 1
A string() 0 5 1
1
<?php
2
/**
3
 * Assert
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this package in the file LICENSE.txt.
9
 * If you did not receive a copy of the license and are unable to
10
 * obtain it through the world-wide-web, please send an email
11
 * to [email protected] so I can send you a copy immediately.
12
 */
13
14
namespace Assert\Tests;
15
16
use Assert\Assertion;
17
18
class CustomAssertion extends Assertion
19
{
20
    protected static $exceptionClass = 'Assert\Tests\CustomException';
21
    private static $calls = array();
22
23
    public static function clearCalls()
24
    {
25
        self::$calls = array();
26
    }
27
28
    public static function getCalls()
29
    {
30
        return self::$calls;
31
    }
32
33
    public static function string($value, $message = null, $propertyPath = null)
34
    {
35
        self::$calls[] = array('string', $value);
36
        return parent::string($value, $message, $propertyPath);
37
    }
38
}
39