Completed
Pull Request — master (#32)
by Mark van
15:11
created

CommonExtension::getTests()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TreeHouse\IoBundle\Twig;
4
5
class CommonExtension extends \Twig_Extension
6
{
7
    /**
8
     * @inheritdoc
9
     */
10 1
    public function getName()
11
    {
12 1
        return 'io_common';
13
    }
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function getTests()
19
    {
20
        return [
21
            'date' => new \Twig_SimpleTest('date', function ($obj) { return ($obj instanceof \DateTime); }),
22
        ];
23
    }
24
}
25