AbstractMediaNormalizer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A supportsNormalization() 0 4 1
1
<?php
2
3
namespace Actualys\Bundle\DrupalCommerceConnectorBundle\Normalizer\Attribute;
4
5
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
6
use Pim\Bundle\CatalogBundle\Entity\Attribute;
7
8
/**
9
 * Class AbstractMediaNormalizer
10
 *
11
 * @package Actualys\Bundle\DrupalCommerceConnectorBundle\Normalizer
12
 */
13
abstract class AbstractMediaNormalizer implements NormalizerInterface
14
{
15
    /**
16
     * Checks whether the given class is supported for normalization by this normalizer
17
     *
18
     * @param mixed  $data   Data to normalize.
19
     * @param string $format The format being (de-)serialized from or into.
20
     *
21
     * @return boolean
22
     */
23
    public function supportsNormalization($data, $format = null)
24
    {
25
        return $data instanceof Attribute;
26
    }
27
}
28