Code Duplication    Length = 15-15 lines in 2 locations

src/entities/Pipeline.php 1 location

@@ 38-52 (lines=15) @@
35
    /**
36
     * @return array
37
     */
38
    public function get()
39
    {
40
        $statuses = [];
41
        foreach ($this->statuses as $status) {
42
            $statuses[] = $status->get();
43
        }
44
45
        $fields = $this->getExistedValues($this->fieldList);
46
47
        if (count($statuses)) {
48
            $fields['statuses'] = $statuses;
49
        }
50
51
        return $fields;
52
    }
53
}

src/entities/CustomField.php 1 location

@@ 71-85 (lines=15) @@
68
    /**
69
     * @return array
70
     */
71
    public function get()
72
    {
73
        $fields = $this->getExistedValues($this->fieldList);
74
75
        $values = [];
76
        foreach ($this->values as $value) {
77
            $values[] = $value->get();
78
        }
79
80
        if (count($values)) {
81
            $fields['values'] = $values;
82
        }
83
84
        return $fields;
85
    }
86
87
    /**
88
     * @param $array