WhoopsDebugTrait::addDataTable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
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