AuraSqlQueryDeleteProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 4 1
1
<?php
2
/**
3
 * This file is part of the Ray.AuraSqlModule package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace Ray\AuraSqlModule;
8
9
use Aura\SqlQuery\QueryFactory;
10
use Ray\AuraSqlModule\Annotation\AuraSqlQueryConfig;
11
use Ray\Di\ProviderInterface;
12
13
class AuraSqlQueryDeleteProvider implements ProviderInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    private $db;
19
20
    /**
21
     * @param string $db The database type
22
     *
23
     * @AuraSqlQueryConfig
24
     */
25 5
    public function __construct(string $db)
26
    {
27 5
        $this->db = $db;
28 5
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 5
    public function get()
34
    {
35 5
        return (new QueryFactory($this->db))->newDelete();
36
    }
37
}
38