The function file_exists() checks whether file or directory exists. And is_file() checks only files for the existence. All places, where file_exists() is replaced with is_file() needs only to check for file existence.
Replace file_exists() calls with is_file() where it is needed
thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link: