GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Failed Conditions
Push — master ( 456c33...bd3e5d )
by Charlotte
09:18
created

ColumnDefinition   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 55
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A isZerofilled() 0 2 1
A isNullable() 0 2 1
A isAutoIncrement() 0 2 1
A isPrimaryKey() 0 2 1
A isUnsigned() 0 2 1
A isUniqueKey() 0 2 1
A isMultipleKey() 0 2 1
1
<?php
2
/**
3
 * Plasma Driver MySQL component
4
 * Copyright 2018-2019 PlasmaPHP, All Rights Reserved
5
 *
6
 * Website: https://github.com/PlasmaPHP
7
 * License: https://github.com/PlasmaPHP/driver-mysql/blob/master/LICENSE
8
*/
9
10
namespace Plasma\Drivers\MySQL;
11
12
/**
13
 * Column Definitions define columns (who would've thought of that?). Such as their name, type, length, etc.
14
 */
15
class ColumnDefinition extends \Plasma\ColumnDefinition {
16
    /**
17
     * Whether the column is nullable (not `NOT NULL`).
18
     * @return bool
19
     */
20 2
    function isNullable(): bool {
21 2
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::NOT_NULL_FLAG) !== 0);
22
    }
23
    
24
    /**
25
     * Whether the column is auto incremented.
26
     * @return bool
27
     */
28 2
    function isAutoIncrement(): bool {
29 2
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::AUTO_INCREMENT_FLAG) !== 0);
30
    }
31
    
32
    /**
33
     * Whether the column is the primary key.
34
     * @return bool
35
     */
36 2
    function isPrimaryKey(): bool {
37 2
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::PRI_KEY_FLAG) !== 0);
38
    }
39
    
40
    /**
41
     * Whether the column is the unique key.
42
     * @return bool
43
     */
44 2
    function isUniqueKey(): bool {
45 2
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::UNIQUE_KEY_FLAG) !== 0);
46
    }
47
    
48
    /**
49
     * Whether the column is part of a multiple/composite key.
50
     * @return bool
51
     */
52 2
    function isMultipleKey(): bool {
53 2
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::MULTIPLE_KEY_FLAG) !== 0);
54
    }
55
    
56
    /**
57
     * Whether the column is unsigned (only makes sense for numeric types).
58
     * @return bool
59
     */
60 9
    function isUnsigned(): bool {
61 9
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::UNSIGNED_FLAG) !== 0);
62
    }
63
    
64
    /**
65
     * Whether the column gets zerofilled to the length.
66
     * @return bool
67
     */
68 9
    function isZerofilled(): bool {
69 9
        return (($this->flags & \Plasma\Drivers\MySQL\FieldFlags::ZEROFILL_FLAG) !== 0);
70
    }
71
}
72