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

CollectionDefinitionAdded   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCollectionName() 0 4 1
A getFolder() 0 4 1
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