private static function getQuery(array $parsed) { $query = ''; if (strlen($parsed['query'])) { $query = '?' . $parsed['query']; } return $query; }