Completed
Push — master ( 7b9015...c5b311 )
by Vladimir
26s queued 11s
created

CollectionDefinitionAdded::getFolderName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * @copyright 2018 Vladimir Jimenez
5
 * @license   https://github.com/stakx-io/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Event;
9
10
use allejo\stakx\Filesystem\Folder;
11
use Symfony\Component\EventDispatcher\Event;
12
13
/**
14
 * A notification-only event fired whenever a new, valid Collection definition is registered.
15
 *
16
 * @since 0.2.0
17
 */
18
class CollectionDefinitionAdded extends Event
19
{
20
    const NAME = 'collection.definition.added';
21
22
    private $collectionName;
23
    private $folder;
24
25 36
    public function __construct($collectionName, Folder $folder)
26
    {
27 36
        $this->collectionName = $collectionName;
28 36
        $this->folder = $folder;
29 36
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getCollectionName()
35
    {
36
        return $this->collectionName;
37
    }
38
39
    /**
40
     * @return Folder
41
     */
42
    public function getFolder()
43
    {
44
        return $this->folder;
45
    }
46
}
47