FinderAbstractService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A mergeWith() 0 8 2
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
}