Code Duplication    Length = 14-14 lines in 2 locations

Core/Helper/SortConverter.php 1 location

@@ 67-80 (lines=14) @@
64
     * @param string $value ASC|DESC
65
     * @return int
66
     */
67
    public function hash2SortOrder($value)
68
    {
69
        $sortOrder = null;
70
71
        if ($value !== null) {
72
            if (strtoupper($value) === 'ASC') {
73
                $sortOrder = Location::SORT_ORDER_ASC;
74
            } else {
75
                $sortOrder = Location::SORT_ORDER_DESC;
76
            }
77
        }
78
79
        return $sortOrder;
80
    }
81
82
    /**
83
     * @param int $value

Core/Matcher/QueryBasedMatcher.php 1 location

@@ 311-324 (lines=14) @@
308
        return $out;
309
    }
310
311
    protected function hash2SortOrder($value)
312
    {
313
        $sortOrder = null;
314
315
        if ($value !== null) {
316
            if (strtoupper($value) === 'ASC') {
317
                $sortOrder = Query::SORT_ASC;
318
            } else {
319
                $sortOrder = Query::SORT_DESC;
320
            }
321
        }
322
323
        return $sortOrder;
324
    }
325
326
    /**
327
     * @param int $value