he thought to himself, saying
"he said to himself"
If this man were a prophet, then he would know who and what type of woman is touching him, that she is a sinner
The Pharisee thought that Jesus was not a prophet because he allowed the sinful woman to touch him.