Completed
Pull Request — master (#48)
by Claudio
09:03 queued 04:41
created

TableMaskItem::forRawValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 4
1
<?php
2
3
namespace Flagbit\Bundle\TableAttributeBundle\Component\Product\Completeness\MaskItemGenerator;
4
5
use Akeneo\Pim\Enrichment\Component\Product\Completeness\MaskItemGenerator\MaskItemGeneratorForAttributeType;
6
use Flagbit\Bundle\TableAttributeBundle\AttributeType\TableType;
7
8
class TableMaskItem implements MaskItemGeneratorForAttributeType
9
{
10
    public function forRawValue(string $attributeCode, string $channelCode, string $localeCode, $value): array
11
    {
12
        return [
13
            sprintf(
14
                '%s-%s-%s',
15
                $attributeCode,
16
                $channelCode,
17
                $localeCode
18
            )
19
        ];
20
    }
21
22
    public function supportedAttributeTypes(): array
23
    {
24
        return [
25
            TableType::FLAGBIT_CATALOG_TABLE,
26
        ];
27
    }
28
}
29