AssetHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10
ccs 5
cts 5
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 8 2
1
<?php
2
3
namespace TinyPngBundle\Helper;
4
5
/**
6
 * Class AssetHelper
7
 * @package TinyPngBundle\Helper
8
 */
9
class AssetHelper
10
{
11
    /**
12
     * @return array
13
     */
14 4
    public static function getConfig() : array
15
    {
16 4
        $configFilePath = PIMCORE_CONFIGURATION_DIRECTORY . '/tinypng.php';
17 4
        if (!file_exists($configFilePath)) {
18 2
            return ['config' => ['apiKey' => '']];
19
        }
20
21 2
        return include($configFilePath);
22
    }
23
}