Mapper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAliases() 0 10 3
1
<?php
2
3
namespace ExiftoolReader\Config;
4
5
class Mapper extends AbstractConfig
6
{
7
    /**
8
     * Config.
9
     *
10
     * @var array
11
     */
12
    protected $config = [
13
        'title'       => ['Title', 'ObjectName'],
14
        'description' => ['Description', 'Caption-Abstract', 'ImageDescription'],
15
        'keywords'    => ['Keywords', 'Subject'],
16
    ];
17
18
    /**
19
     * Get metadata aliases.
20
     *
21
     * @param string $name
22
     * @return array
23
     */
24
    public function getAliases($name)
25
    {
26
        foreach ($this->config as $key => $value) {
27
            if (strcasecmp($key, $name) === 0) {
28
                return $value;
29
            }
30
        }
31
32
        return [$name];
33
    }
34
}