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

CommonExtension::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.125

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 4
cp 0.5
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1.125
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