What are the common mistakes to avoid when designing classes and methods in PHP, especially for beginners in OOP?

One common mistake beginners make when designing classes and methods in PHP is not following the principles of Object-Oriented Programming (OOP), such as encapsulation, inheritance, and polymorphism. To avoid this, it's important to properly structure classes with clear responsibilities and methods that perform specific tasks.

class Car {
    private $brand;
    private $model;

    public function __construct($brand, $model) {
        $this->brand = $brand;
        $this->model = $model;
    }

    public function getBrand() {
        return $this->brand;
    }

    public function getModel() {
        return $this->model;
    }
}