Tabla::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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