Code Duplication    Length = 7-7 lines in 2 locations

ActiveRecord.php 2 locations

@@ 200-206 (lines=7) @@
197
     *
198
     * @return ActiveRecord
199
     */
200
    public static function firstBy($field, $value, $params = [])
201
    {
202
        $field = self::sqlItemSanitize($field);
203
        $params['where'] = "$field = ?";
204
205
        return self::first($params, $value);
206
    }
207
208
    /**
209
     * Obtener la primera coincidencia de las condiciones indicadas.
@@ 315-321 (lines=7) @@
312
     *
313
     * @return \PDOStatement
314
     */
315
    public static function allBy($field, $value, $params = [])
316
    {
317
        $field = self::sqlItemSanitize($field);
318
        $params['where'] = "$field = ?";
319
320
        return self::all($params, $value);
321
    }
322
323
    /**
324
     * Cuenta los registros que coincidan con las condiciones indicadas.