Code Duplication    Length = 10-11 lines in 2 locations

src/Users/UserIdentifiers.php 2 locations

@@ 19-29 (lines=11) @@
16
     *
17
     * @return string[]
18
     */
19
    public function all($status = 'ACTIVE')
20
    {
21
        $ids = [$this->data->primary_id];
22
        foreach ($this->data->user_identifier as $identifier) {
23
            if (is_null($status) || $identifier->status == $status) {
24
                $ids[] = $identifier->value;
25
            }
26
        }
27
28
        return $ids;
29
    }
30
31
    /**
32
     * Get all active user identifiers of a given type, like 'BARCODE' or 'UNIV_ID'.
@@ 39-48 (lines=10) @@
36
     *
37
     * @return array
38
     */
39
    public function allOfType($value, $status = 'ACTIVE')
40
    {
41
        $ids = [];
42
        foreach ($this->data->user_identifier as $identifier) {
43
            if ($identifier->id_type->value == $value && (is_null($status) || $identifier->status == $status)) {
44
                $ids[] = $identifier->value;
45
            }
46
        }
47
48
        return $ids;
49
    }
50
51
    /**