TestObject::reset()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Admingenerator\GeneratorBundle\Tests\Twig\Extension;
3
4
/**
5
 * Dummy object for EchoExtensionTest
6
 *
7
 * @author Cedric LOMBARDOT
8
 */
9
class TestObject
10
{
11
    public static $called = array(
12
        '__toString'  => 0,
13
        'foo'         => 0,
14
        'getFooBar'   => 0,
15
    );
16
17
    public function __construct($bar = 'bar')
18
    {
19
20
    }
21
22
    public static function reset()
23
    {
24
        self::$called = array(
25
            '__toString'  => 0,
26
            'foo'         => 0,
27
            'getFooBar'   => 0,
28
        );
29
    }
30
31
    public function __toString()
32
    {
33
        ++self::$called['__toString'];
34
35
        return 'foo';
36
    }
37
38
    public function foo()
39
    {
40
        ++self::$called['foo'];
41
42
        return 'foo';
43
    }
44
45
    public function getFooBar()
46
    {
47
        ++self::$called['getFooBar'];
48
49
        return 'foobar';
50
    }
51
}
52