Completed
Push — feature-extra-extensions ( 2f2a70 )
by Cees-Jan
13:52 queued 11:55
created

ProfileEvent::getLoader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * This file is part of TwigView.
5
 *
6
 ** (c) 2015 Cees-Jan Kiewiet
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace WyriHaximus\TwigView\Event;
12
13
use Cake\Event\Event;
14
15
class ProfileEvent extends Event
16
{
17
    const EVENT = 'TwigView.TwigView.profile';
18
19
    /**
20
     * @param \Twig_Profiler_Profile $profile
21
     * @return static
22
     */
23 1
    public static function create(\Twig_Profiler_Profile $profile)
24
    {
25 1
        return new static(static::EVENT, $profile);
26
    }
27
28
    /**
29
     * @return \Twig_Profiler_Profile
30
     */
31
    public function getLoader()
32
    {
33
        return $this->subject();
34
    }
35
}
36