src/Annotations/CtrlAction.php
protected function normalizePath($path) {
        if (!isset($path)) {
            return null;
        }
        $path = trim((string)$path);
        if (($qPos = strpos($path, '?')) !== false) {
            $path = mb_substr($path, 0, $qPos);
        }
        if ($path !== "/") {
            $path = rtrim($path, '/');
        }
        return $path;
    }
protected function normalizePath($path) {
        if (!isset($path)) {
            return null;
        }
        $path = trim((string)$path);
        if (($qPos = strpos($path, '?')) !== false) {
            $path = mb_substr($path, 0, $qPos);
        }
        if ($path !== "/") {
            $path = rtrim($path, '/');
        }
        return $path;
    }
Normalize path
@param string $path
@return string|null