Test Failed
Push — master ( 55c49a...565016 )
by Julien
05:04
created

HelperFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getServices() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Support;
13
14
use Zemit\Support\Helper\Arr\FlattenKeys;
15
use Zemit\Support\Helper\Str\Slugify;
16
17
/**
18
 * HelperFactory Class
19
 *
20
 * This class extends the Phalcon\Support\HelperFactory class and provides additional helper services.
21
 * {@inheritdoc}
22
 * 
23
 * @method string flattenKeys(array $collection = [], string $delimiter = '.', bool $lowerKey = true)
24
 * @method string slugify(string $string, array $replace = [], string $delimiter = '-')
25
 */
26
class HelperFactory extends \Phalcon\Support\HelperFactory
27
{
28
    /**
29
     * Returns the available adapters
30
     *
31
     * @return string[]
32
     */
33 3
    protected function getServices(): array
34
    {
35 3
        return array_merge(parent::getServices(), [
36 3
            'flattenKeys' => FlattenKeys::class,
37 3
            'slugify' => Slugify::class,
38 3
        ]);
39
    }
40
}
41