That code can be abbreviated to
return $stmt->rowCount() == 1;
There is never any reason for having an if statement to return true or false - simply return the condition.
That code can be abbreviated to
return $stmt->rowCount() == 1;
There is never any reason for having an if statement to return true or false - simply return the condition.