Completed
Push — master ( e74ae2...768df3 )
by Cees-Jan
24s
created

ProfileEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A getLoader() 0 4 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of TwigView.
4
 *
5
 ** (c) 2015 Cees-Jan Kiewiet
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace WyriHaximus\TwigView\Event;
12
13
use Cake\Event\Event;
14
use Twig\Profiler\Profile;
15
16
final class ProfileEvent extends Event
17
{
18
    const EVENT = 'TwigView.TwigView.profile';
19
20
    /**
21
     * @param  \Twig\Profiler\Profile $profile
22
     * @return static
23
     */
24
    public static function create(Profile $profile): ProfileEvent
25
    {
26
        return new static(static::EVENT, $profile);
27
    }
28
29
    /**
30
     * @return \Twig\Profiler\Profile
31
     */
32
    public function getLoader(): Profile
33
    {
34
        return $this->getSubject();
35
    }
36
}
37