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

_ATTR_PROP   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 25%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 19
ccs 2
cts 8
cp 0.25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A table() 0 3 1
A column() 0 7 1
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
}