Test Failed
Push — master ( a29797...6ce97f )
by huang
06:37
created

Model::getDatabase()   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 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
/**
3
 * @author    jan huang <[email protected]>
4
 * @copyright 2016
5
 *
6
 * @see      https://www.github.com/janhuang
7
 * @see      https://fastdlabs.com
8
 */
9
10
namespace FastD\Model;
11
12
/**
13
 * Class Model.
14
 */
15
class Model
16
{
17
    /**
18
     * @var Database
19
     */
20
    protected $db;
21
22
    /**
23
     * Model constructor.
24
     *
25
     * @param Database $database
26
     */
27
    public function __construct(Database $database)
28
    {
29
        $this->db = $database;
30
    }
31
32
    /**
33
     * @return Database
34
     */
35
    public function getDatabase()
36
    {
37
        return $this->db;
38
    }
39
}
40