Completed
Push — master ( 7f186d...ef28ef )
by Philip
03:23
created

EntityUtils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A collectIds() 0 9 2
1
<?php
2
3
4
namespace Dontdrinkandroot\Utils;
5
6
use Dontdrinkandroot\Entity\EntityInterface;
7
8
class EntityUtils
9
{
10
11
    /**
12
     * @param EntityInterface[] $entities
13
     *
14
     * @return array
15
     */
16
    public static function collectIds(array $entities)
17
    {
18
        $ids = [];
19
        foreach ($entities as $entity) {
20
            $ids[] = $entity->getId();
21
        }
22
23
        return $ids;
24
    }
25
}
26