Here's the snippet from the article:
function get($urlPath, $queryParams=null, $ouputFormat='xml'){
// if(!authenticateAsOwner($queryParams))
// {
// header("HTTP/1.0 401 Unauthorized");
// return;
// }
The closing brace there corresponds to the if. The rest of the body of the function, and its closing brace, are outside the snippet included in the article.