AbstractAttributeCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
c 2
b 1
f 1
lcom 0
cbo 1
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAttribute() 0 7 1
1
<?php
2
3
namespace N98\Magento\Command\Eav\Attribute;
4
5
use N98\Magento\Command\AbstractMagentoCommand;
6
use Magento\Eav\Model\Config;
7
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
8
9
abstract class AbstractAttributeCommand extends AbstractMagentoCommand
10
{
11
    /**
12
     * Gets an attribute model
13
     *
14
     * @param string $entityType
15
     * @param string $attributeCode
16
     * @return AbstractAttribute
17
     */
18
    public function getAttribute($entityType, $attributeCode)
19
    {
20
        return $this
21
            ->getObjectManager()
22
            ->get(Config::class)
23
            ->getAttribute($entityType, $attributeCode);
24
    }
25
}
26