Delete a class
When a class is no longer needed, the best practice is to remove it from the project. Review your entire project once you delete a class to ensure that there are no unused global settings such as formatters or validation methods specific to that class. Removing unused elements ensures that your project is as efficient as possible and takes up less disk space.
You can remove a class from the Project Tree by following these steps: