Completed
Push — master ( 6d1120...3e38c4 )
by Michal
10s
created

MySqlPermissions::canDeleteDatabase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace UniMan\Drivers\MySql;
4
5
use UniMan\Core\Permissions\DefaultPermissions;
6
7
class MySqlPermissions extends DefaultPermissions
8
{
9 2
    public function canCreateItem($database, $type, $table)
10
    {
11 2
        return $database !== 'information_schema';
12
    }
13
14 2
    public function canEditItem($database, $type, $table, $item = null)
15
    {
16 2
        return $database !== 'information_schema';
17
    }
18
19 2
    public function canDeleteItem($database, $type, $table, $item)
20
    {
21 2
        return $database !== 'information_schema';
22
    }
23
24 2
    public function canDeleteTable($database, $type, $table)
25
    {
26 2
        return $database !== 'information_schema';
27
    }
28
29 2
    public function canCreateDatabase()
30
    {
31 2
        return true;
32
    }
33
34 2
    public function canEditDatabase($database)
35
    {
36 2
        return true;
37
    }
38
39 2
    public function canDeleteDatabase($database)
40
    {
41 2
        return $database !== 'information_schema';
42
    }
43
44 2
    public function canExecuteCommands()
45
    {
46 2
        return true;
47
    }
48
}
49