Failed Conditions
Push — master ( ebb1ea...d49c03 )
by Bernhard
06:05
created

RemoveAssetMappingEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAssetMapping() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the puli/manager package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\Manager\Api\Event;
13
14
use Puli\Manager\Api\Asset\AssetMapping;
15
use Symfony\Component\EventDispatcher\Event;
16
17
/**
18
 * Dispatched when an asset mapping is removed.
19
 *
20
 * @since  1.0
21
 *
22
 * @author Bernhard Schussek <[email protected]>
23
 */
24
class RemoveAssetMappingEvent extends Event
25
{
26
    /**
27
     * @var AssetMapping
28
     */
29
    private $mapping;
30
31
    /**
32
     * Creates the event.
33
     *
34
     * @param AssetMapping $mapping The asset mapping.
35
     */
36 3
    public function __construct(AssetMapping $mapping)
37
    {
38 3
        $this->mapping = $mapping;
39 3
    }
40
41
    /**
42
     * Returns the removed asset mapping.
43
     *
44
     * @return AssetMapping The asset mapping.
45
     */
46
    public function getAssetMapping()
47
    {
48
        return $this->mapping;
49
    }
50
}
51