Model   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDatabase() 0 4 1
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 2
    public function __construct(Database $database)
28
    {
29 2
        $this->db = $database;
30 2
    }
31
32
    /**
33
     * @return Database
34
     */
35 1
    public function getDatabase()
36
    {
37 1
        return $this->db;
38
    }
39
}
40