Database::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace Fyuze\Debug\Collectors;
3
4
use Fyuze\Database\Db;
5
6
class Database implements Collector
7
{
8
    /**
9
     * @var Db
10
     */
11
    protected $database;
12
13
    protected $db;
14
15
    /**
16
     * Database constructor.
17
     * @param Db $database
18
     */
19 6
    public function __construct(Db $database)
20
    {
21 6
        $this->db = $database;
22
    }
23
24
    /**
25
     * @return string
26
     */
27 1
    public function tab()
28
    {
29 1
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array('title' => ...ueries()) . ' Queries') returns the type array<string,string> which is incompatible with the documented return type string.
Loading history...
30 1
            'title' => count($this->db->getQueries()) . ' Queries'
31 1
        ];
32
    }
33
}
34