Completed
Push — master ( b416d7...51a9f1 )
by Filipe
02:48
created

EntityAdded   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCollection() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of slick/orm package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Orm\Event;
11
use Slick\Orm\Entity\EntityCollectionInterface;
12
13
/**
14
 * Entity Added: triggered when an entity is added to an entity collection
15
 * 
16
 * @package Slick\Orm\Event
17
 * @author  Filipe Silva <[email protected]>
18
 */
19
class EntityAdded extends AbstractEvent implements EventInterface
20
{
21
    
22
    const ACTION_ADD = 'entity.added';
23
24
    /**
25
     * @var string
26
     */
27
    protected $name = 'EntityAdded';
28
29
    /**
30
     * @var string
31
     */
32
    protected $action = self::ACTION_ADD;
33
34
    /**
35
     * Gets the entity collection that triggers the event
36
     * 
37
     * @return EntityCollectionInterface
38
     */
39 2
    public function getCollection()
40
    {
41 2
        return $this->params['collection'];
42
    }
43
}