GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

MetadataMapper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 6 1
A mapArray() 0 8 2
1
<?php
2
/**
3
 * Mapper for mapping data between raw input and Data classes
4
 *
5
 * @link        http://github.com/PHPExif/php-exif-common for the canonical source repository
6
 * @copyright   Copyright (c) 2016 Tom Van Herreweghe <[email protected]>
7
 * @license     http://github.com/PHPExif/php-exif-common/blob/master/LICENSE MIT License
8
 * @category    PHPExif
9
 * @package     Common
10
 */
11
12
namespace PHPExif\Common;
13
14
use PHPExif\Common\Adapter\MapperInterface;
15
use PHPExif\Common\Data\MetadataInterface;
16
use PHPExif\Common\Mapper\ArrayMapper;
17
use PHPExif\Common\Mapper\FieldMapperTrait;
18
19
/**
20
 * MetadataMapper
21
 *
22
 * Maps the array of exif & iptc data onto the
23
 * correct fields of given MetadataInterface object
24
 *
25
 * @category    PHPExif
26
 * @package     Common
27
 */
28
class MetadataMapper implements MapperInterface, ArrayMapper
29
{
30
    use FieldMapperTrait;
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function map(array $input, MetadataInterface &$output)
36
    {
37
        $this->mapArray($input, $output);
38
39
        $output->setRawData($input);
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45
    public function mapArray(array $input, &$output)
46
    {
47
        $mappers = $this->getFieldMappers();
48
49
        foreach ($mappers as $field => $mapper) {
50
            $mapper->mapField($field, $input, $output);
51
        }
52
    }
53
}
54