Code Duplication    Length = 8-8 lines in 2 locations

src/Parameters.php 2 locations

@@ 47-54 (lines=8) @@
44
45
            $invalid = array_diff($relationships, $available);
46
47
            if (count($invalid)) {
48
                throw new InvalidParameterException(
49
                    'Invalid includes ['.implode(',', $invalid).']',
50
                    1,
51
                    null,
52
                    'include'
53
                );
54
            }
55
56
            return $relationships;
57
        }
@@ 158-165 (lines=8) @@
155
156
            $invalid = array_diff(array_keys($sort), $available);
157
158
            if (count($invalid)) {
159
                throw new InvalidParameterException(
160
                    'Invalid sort fields ['.implode(',', $invalid).']',
161
                    3,
162
                    null,
163
                    'sort'
164
                );
165
            }
166
        }
167
168
        return $sort;