Completed
Push — master ( 52cd2c...047880 )
by Kamil
47:26 queued 26:32
created

MergeRecursiveExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFilters() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sylius\Bundle\UiBundle\Twig;
15
16
use Twig\Extension\AbstractExtension;
17
use Twig\TwigFilter;
18
19
final class MergeRecursiveExtension extends AbstractExtension
20
{
21
    public function getFilters(): array
22
    {
23
        return [
24
            new TwigFilter(
25
                'sylius_merge_recursive',
26
                function (array $firstArray, array $secondArray): array {
27
                    return array_merge_recursive($firstArray, $secondArray);
28
                }
29
            ),
30
        ];
31
    }
32
}
33