Code Duplication    Length = 14-14 lines in 2 locations

src/Api/Validation.php 2 locations

@@ 114-127 (lines=14) @@
111
     *
112
     * @return boolean|null
113
     */
114
    protected function validFilter($input)
115
    {
116
        if (is_array($input) === false) {
117
            return false;
118
        }
119
120
        foreach ($input as $key => $value) {
121
            if ($this->isKeyAndValueAre($key, 'string', $value, ['string', 'int', 'float']) === false) {
122
                return false;
123
            }
124
        }
125
126
        return $this->isEnabledFilter('filter', $this->enabledFilters);
127
    }
128
129
    /**
130
     * Validation for SORT parameter.
@@ 136-149 (lines=14) @@
133
     *
134
     * @return boolean|null
135
     */
136
    protected function validSort($input)
137
    {
138
        if (is_array($input) === false) {
139
            return false;
140
        }
141
142
        foreach ($input as $key => $value) {
143
            if ($this->isParamAValue($key, 'string', $value, ['asc', 'desc']) === false) {
144
                return false;
145
            }
146
        }
147
148
        return $this->isEnabledFilter('sort', $this->enabledFilters);
149
    }
150
}