Passed
Push — master ( da1b99...92df87 )
by Aleksandr
03:12
created

_ATTR_PROP   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 19
ccs 8
cts 8
cp 1
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 4
    public static function table(): string
22
    {
23 4
        return "eav_attribute_properties";
24
    }
25
26 3
    public function column(): string
27
    {
28 3
        return match ($this) {
29 3
            self::KEY => "property_key",
30 3
            self::ATTRIBUTE_KEY => "attribute_key",
31 3
            self::NAME => "name",
32 3
            self::VALUE => "value"
33 3
        };
34
    }
35
}