The VS Studio Code mark that line
$TypeOfPage = $this->catalog->ParseCatalogUrl($UrlParams, &$arReturnItem);
as line with syntax error. But i dont realize why. The methodParseCatalogUrl expects 2 paramters with the reference as second parametr and gets it.
The code works nice,but i cant format it becouse of that error(in opinion of IDE).