Table::triggers()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Db;
4
5
use Lagdo\DbAdmin\Driver\DriverInterface;
6
use Lagdo\DbAdmin\Driver\Entity\TableEntity;
7
use Lagdo\DbAdmin\Driver\Utils\Utils;
8
9
abstract class Table implements TableInterface
10
{
11
    /**
12
     * @var DriverInterface
13
     */
14
    protected $driver;
15
16
    /**
17
     * @var Utils
18
     */
19
    protected $utils;
20
21
    /**
22
     * The constructor
23
     *
24
     * @param DriverInterface $driver
25
     * @param Utils $utils
26
     */
27
    public function __construct(DriverInterface $driver, Utils $utils)
28
    {
29
        $this->driver = $driver;
30
        $this->utils = $utils;
31
    }
32
33
    /**
34
     * @inheritDoc
35
     */
36
    public function tableStatusOrName(string $table, bool $fast = false)
37
    {
38
        if (($status = $this->tableStatus($table, $fast))) {
39
            return $status;
40
        }
41
        return new TableEntity($table);
42
    }
43
44
    /**
45
     * @inheritDoc
46
     */
47
    public function foreignKeys(string $table)
48
    {
49
        return [];
50
    }
51
52
    /**
53
     * @inheritDoc
54
     */
55
    public function supportForeignKeys(TableEntity $tableStatus)
56
    {
57
        return false;
58
    }
59
60
    /**
61
     * @inheritDoc
62
     */
63
    public function isView(TableEntity $tableStatus)
64
    {
65
        return false;
66
    }
67
68
    /**
69
     * @inheritDoc
70
     */
71
    public function trigger(string $name, string $table = '')
72
    {
73
        return null;
74
    }
75
76
    /**
77
     * @inheritDoc
78
     */
79
    public function triggers(string $table)
80
    {
81
        return [];
82
    }
83
84
    /**
85
     * @inheritDoc
86
     */
87
    public function triggerOptions()
88
    {
89
        return [];
90
    }
91
92
    /**
93
     * @inheritDoc
94
     */
95
    public function referencableTables(string $table)
96
    {
97
        return [];
98
    }
99
100
    /**
101
     * @inheritDoc
102
     */
103
    public function tableHelp(string $name)
104
    {
105
        return '';
106
    }
107
}
108