private function validateCredentials($object, $password)
    {
        return !(
            null === $object
            || !$this->passwordHasher->compareWith($object->getPassword(), $password)
        );
    }
private function validateCredentials($object, $password)
    {
        return !(
            null === $object
            || !$this->passwordHasher->compareWith($object->getPassword(), $password)
        );
    }
private function validateCredentials ( $ object , $ password ) { return ! ( null === $ object || ! $ this -> passwordHasher -> compareWith ( $ object -> getPassword ( ) , $ password ) ) ; }
Validates the existance of the object and ensures that a valid password is given.

@param object $object
@param string $password

@return bool
Validates the existance of the object and ensures that a valid password is given .