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

ProfileEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
ccs 2
cts 2
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A getLoader() 0 4 1
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