WhoopsDebugTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 20
ccs 0
cts 4
cp 0
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataTable() 0 3 1
A addDataTable() 0 3 1
1
<?php
2
/*
3
 * To change this license header, choose License Headers in Project Properties.
4
 * To change this template file, choose Tools | Templates
5
 * and open the template in the editor.
6
 */
7
8
namespace ByJG\RestServer\Whoops;
9
10
/**
11
 * Description of WhoopsDebugInterface
12
 *
13
 * @author jg
14
 */
15
trait WhoopsDebugTrait
16
{
17
18
    protected $extraTables = [];
19
20
    /**
21
     * Adds an entry to the list of tables displayed in the template.
22
     * The expected data is a simple associative array. Any nested arrays
23
     * will be flattened with print_r
24
     * @param string $label
25
     * @param array $data
26
     */
27
    public function addDataTable($label, array $data)
28
    {
29
        $this->extraTables[$label] = $data;
30
    }
31
32
    public function getDataTable()
33
    {
34
        return $this->extraTables;
35
    }
36
}
37