Code Duplication    Length = 12-12 lines in 2 locations

src/Helpers/Arrays.php 2 locations

@@ 406-417 (lines=12) @@
403
     *
404
     * @return array set of elements matches the condition
405
     */
406
    public static function getRows(array $uArray, $uKey, $uValue)
407
    {
408
        $tReturn = [];
409
410
        foreach ($uArray as $tKey => $tRow) {
411
            if (isset($tRow[$uKey]) && $tRow[$uKey] === $uValue) {
412
                $tReturn[$tKey] = $tRow;
413
            }
414
        }
415
416
        return $tReturn;
417
    }
418
419
    /**
420
     * Gets the not matching rows
@@ 428-439 (lines=12) @@
425
     *
426
     * @return array set of elements not matches the condition
427
     */
428
    public static function getRowsBut(array $uArray, $uKey, $uValue)
429
    {
430
        $tReturn = [];
431
432
        foreach ($uArray as $tKey => $tRow) {
433
            if (isset($tRow[$uKey]) && $tRow[$uKey] !== $uValue) {
434
                $tReturn[$tKey] = $tRow;
435
            }
436
        }
437
438
        return $tReturn;
439
    }
440
441
    /**
442
     * Combines two arrays properly