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

RemoveAssetMappingEvent::getAssetMapping()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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