Passed
Push — main ( c8f39c...1a4746 )
by Osvaldo
02:04
created

Tabla   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 22
rs 10
wmc 4

3 Methods

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