Passed
Push — provider ( 92ec6d...c48c5b )
by Akihito
03:27 queued 01:42
created

MultiBindings::merge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\Di\MultiBinding;
6
7
use ArrayObject;
8
9
use function array_merge_recursive;
10
11
/**
12
 * @extends ArrayObject<string, non-empty-array<array-key, LazyInteterface>>
13
 */
14
final class MultiBindings extends ArrayObject
15
{
16
    public function merge(self $multiBindings): void
17
    {
18
        $this->exchangeArray(
19
            array_merge_recursive($this->getArrayCopy(), $multiBindings->getArrayCopy())
20
        );
21
    }
22
}
23