Code Duplication    Length = 8-8 lines in 2 locations

src/Validators/FieldsValidator.php 2 locations

@@ 121-128 (lines=8) @@
118
     * @return bool
119
     * @throws EntityFieldsException
120
     */
121
    private static function validateString($key, $value) // todo_ddlzz test this
122
    {
123
        if (!is_string($value) && !is_numeric($value)) {
124
            throw new EntityFieldsException("The field \"$key\" must be string");
125
        }
126
127
        return true;
128
    }
129
130
    /**
131
     * @param string $key
@@ 168-175 (lines=8) @@
165
     * @return bool
166
     * @throws EntityFieldsException
167
     */
168
    private static function validateArrayString($key, $value) // todo_ddlzz test this and delete if possible
169
    {
170
        if ((!is_array($value)) && (!is_string($value) && !is_numeric($value))) {
171
            throw new EntityFieldsException("The field \"$key\" must be an array or string");
172
        }
173
174
        return true;
175
    }
176
}