I realise that the answer to this question is probably going to be simply obvious, but I am stumped.
I've created a class that uses Jeremy Kendall's Password Validator (https://github.com/jeremykendall/password-validator) called Hash. However, when the class gets called I get:
Parse error: syntax error, unexpected '}' in /home/james/Projects/REC/htdocs/classes/Hash.class.php on line 24.
The code in Hash.class.php that it is having issues with is:
private $validationCallback;
public function __construct(){
$this->validationCallback = function($credential, $passwordHash){
if (has('md5', $credential) === $passwordHash) {
return true;
}
return false;
}
}
Line 24 is the final '}'. Any help would be greatly appreciated.
Thanks.