Tabla   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 22
ccs 9
cts 9
cp 1
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A sql() 0 3 1
A setTabla() 0 8 2
A __construct() 0 3 1
1
<?php
2
namespace src\pdodatabase\elementos;
3
4
use Exception;
5
6
class Tabla
7
{
8
    private $_tabla;
9
10 110
    public function __construct(string $Tabla)
11
    {
12 110
        $this->_tabla = $this->setTabla($Tabla);
13 109
    }
14
15 93
    public function sql(): string
16
    {
17 93
        return $this->_tabla;
18
    }
19
20 110
    private function setTabla(string $tabla): string
21
    {
22 110
        if(empty($tabla))
23
        {
24 1
            throw new Exception("Error Processing Request");
25
        }
26
27 109
        return $tabla;
28
    }
29
}