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
        }
@@ 153-160 (lines=8) @@
150
151
            $invalid = array_diff(array_keys($sort), $available);
152
153
            if (count($invalid)) {
154
                throw new InvalidParameterException(
155
                    'Invalid sort fields ['.implode(',', $invalid).']',
156
                    3,
157
                    null,
158
                    'sort'
159
                );
160
            }
161
        }
162
163
        return $sort;