Passed
Push — master ( 87ec12...ed978d )
by Aleksandr
14:32
created

_ATTR_PROP::column()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
ccs 0
cts 6
cp 0
crap 2
rs 10
1
<?php
2
/**
3
 * This file is part of the eav package.
4
 * @author    Aleksandr Drobotik <[email protected]>
5
 * @copyright 2023 Aleksandr Drobotik
6
 * @license   https://opensource.org/license/mit  The MIT License
7
 */
8
declare(strict_types=1);
9
10
namespace Drobotik\Eav\Enum;
11
12
use Drobotik\Eav\Interface\DefineTableInterface;
13
14
enum _ATTR_PROP implements DefineTableInterface
15
{
16
    case KEY;
17
    case ATTRIBUTE_KEY;
18
    case NAME;
19
    case VALUE;
20
21 1
    public static function table(): string
22
    {
23 1
        return "eav_attribute_properties";
24
    }
25
26
    public function column(): string
27
    {
28
        return match ($this) {
29
            self::KEY => "property_key",
30
            self::ATTRIBUTE_KEY => "attribute_key",
31
            self::NAME => "name",
32
            self::VALUE => "value"
33
        };
34
    }
35
}