Passed
Push — main ( 80bde2...4e6f22 )
by Osvaldo
05:18
created

SentenciaInsert::sql()   A

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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
namespace src\pdodatabase\sentencias\insert;
3
4
use src\pdodatabase\elementos\{Tabla,Insert};
5
6
class SentenciaInsert
7
{
8
    private $_donde;
9
    private $_insert;
10
    
11 4
    public function __construct(Tabla $Donde, Insert $Insert)
12
    {
13 4
        $this->_donde = $Donde;
14 4
        $this->_insert = $Insert;
15 4
    }
16
17 2
    public function sql(): string
18
    {
19 2
        return 'INSERT INTO '.$this->_donde->sql().' '.$this->_insert->sql();
20
    }
21
22 2
    public function datos(): array
23
    {
24 2
        return $this->_insert->datos();
25
    }
26
}