Code Duplication    Length = 8-9 lines in 5 locations

eZ/Publish/API/Repository/Values/Content/Query/SortClause/Field.php 1 location

@@ 76-83 (lines=8) @@
73
     *
74
     * @return mixed
75
     */
76
    public function getCustomField($type, $field)
77
    {
78
        if (!isset($this->customFields[$type][$field])) {
79
            return null;
80
        }
81
82
        return $this->customFields[$type][$field];
83
    }
84
}
85

eZ/Publish/API/Repository/Values/Content/Query/SortClause/MapLocationDistance.php 1 location

@@ 80-88 (lines=9) @@
77
     *
78
     * @return mixed
79
     */
80
    public function getCustomField($type, $field)
81
    {
82
        if (!isset($this->customFields[$type]) ||
83
            !isset($this->customFields[$type][$field])) {
84
            return null;
85
        }
86
87
        return $this->customFields[$type][$field];
88
    }
89
}
90

eZ/Publish/API/Repository/Values/Content/Query/Criterion/Field.php 1 location

@@ 68-76 (lines=9) @@
65
     *
66
     * @return mixed
67
     */
68
    public function getCustomField($type, $field)
69
    {
70
        if (!isset($this->customFields[$type]) ||
71
             !isset($this->customFields[$type][$field])) {
72
            return null;
73
        }
74
75
        return $this->customFields[$type][$field];
76
    }
77
}
78

eZ/Publish/API/Repository/Values/Content/Query/Criterion/MapLocationDistance.php 1 location

@@ 88-96 (lines=9) @@
85
     *
86
     * @return mixed
87
     */
88
    public function getCustomField($type, $field)
89
    {
90
        if (!isset($this->customFields[$type]) ||
91
             !isset($this->customFields[$type][$field])) {
92
            return null;
93
        }
94
95
        return $this->customFields[$type][$field];
96
    }
97
}
98

eZ/Publish/API/Repository/Values/Content/Query/Criterion/FullText.php 1 location

@@ 149-157 (lines=9) @@
146
     *
147
     * @return mixed
148
     */
149
    public function getCustomField($type, $field)
150
    {
151
        if (!isset($this->customFields[$type]) ||
152
             !isset($this->customFields[$type][$field])) {
153
            return null;
154
        }
155
156
        return $this->customFields[$type][$field];
157
    }
158
}
159