Database   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tab() 0 4 1
A __construct() 0 3 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