FinderAbstractService::mergeWith()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Serviço referente a linha no banco de dados
4
 */
5
6
namespace Finder\Services\Finders;
7
8
9
abstract class FinderAbstractService
10
{
11
    protected function mergeWith(...$collections)
12
    {
13
        $collectionMerged = collect([]);
14
        foreach ($collections as $collection) {
15
            $collectionMerged = $collectionMerged->merge($collection);
16
        }
17
        return $acc; // $merged->all();
0 ignored issues
show
Bug introduced by
The variable $acc does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
18
    }
19
20
}