ProfileEvent   A
last analyzed

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