Completed
Push — master ( cd662c...9cefff )
by Filipe
02:43
created

Select   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuery() 0 4 1
A getData() 0 4 1
A getEntityCollection() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: fsilva
5
 * Date: 09-03-2016
6
 * Time: 18:47
7
 */
8
9
namespace Slick\Orm\Event;
10
11
12
use Slick\Database\RecordList;
13
use Slick\Orm\Entity\EntityCollection;
14
15
class Select extends AbstractEvent implements EventInterface
16
{
17
18
    const ACTION_BEFORE_SELECT = 'before.select';
19
    const ACTION_AFTER_SELECT  = 'after.select';
20
21
    /**
22
     * @var string
23
     */
24
    protected $name = 'Select';
25
26
    /**
27
     * @var string
28
     */
29
    protected $action = self::ACTION_BEFORE_SELECT;
30
31
    /**
32
     * Gets select query
33
     *
34
     * @return \Slick\Database\Sql\Select
35
     */
36 2
    public function getQuery()
37
    {
38 2
        return $this->params['query'];
39
    }
40
41
    /**
42
     * Gets data returned from query
43
     *
44
     * @return RecordList|null
45
     */
46 2
    public function getData()
47
    {
48 2
        return $this->params['data'];
49
    }
50
51
    /**
52
     * Gets already mapped entity collection
53
     *
54
     * @return EntityCollection
55
     */
56 2
    public function getEntityCollection()
57
    {
58 2
        return $this->params['entityCollection'];
59
    }
60
}