Passed
Push — new-api ( 34a0a9...30b18d )
by Sebastian
04:06
created

ModeChangedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMode() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/*
4
 * citeproc-php
5
 *
6
 * @link        http://github.com/seboettg/citeproc-php for the source repository
7
 * @copyright   Copyright (c) 2020 Sebastian Böttger.
8
 * @license     https://opensource.org/licenses/MIT
9
 */
10
11
namespace Seboettg\CiteProc\Rendering\Observer;
12
13
use Seboettg\CiteProc\Config\RenderingMode;
14
15
class ModeChangedEvent implements RenderingEvent
16
{
17
    /**
18
     * @var RenderingMode
19
     */
20
    private $mode;
21
22 168
    public function __construct(RenderingMode $mode)
23
    {
24 168
        $this->mode = $mode;
25 168
    }
26
27
    /**
28
     * @return RenderingMode
29
     */
30 109
    public function getMode(): RenderingMode
31
    {
32 109
        return $this->mode;
33
    }
34
}
35