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

CustomAssertion::string()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
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