AzineContactMerger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 2
b 0
f 0
dl 0
loc 18
rs 10
ccs 6
cts 6
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A merge() 0 8 2
1
<?php
2
3
namespace Azine\HybridAuthBundle\Services;
4
5
class AzineContactMerger implements ContactMerger
6
{
7
    /**
8
     * In this default implementation, all the contacts are just shared in one list, no
9
     * merging of duplicates is done.
10
     *
11
     * @param array of array( providerId => array of UserContacts)
0 ignored issues
show
Bug introduced by
The type Azine\HybridAuthBundle\Services\of was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
     *
13 1
     * @return array of UserContact
14 1
     */
15 1
    public function merge(array $newContacts)
16 1
    {
17 1
        $contacts = array();
18 1
        foreach ($newContacts as $nextProvider => $nextContacts) {
19
            $contacts = array_merge($contacts, $nextContacts);
20
        }
21
22
        return $contacts;
23
    }
24
}
25