WhoopsDebugTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addDataTable() 0 4 1
A getDataTable() 0 4 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