I wrote these two classes for teaching OOP in PHP. Do you think it's breaking some good practices or SOLID principles?<?phpclass City{    private $id;    private $name;    private $districts = [];    public function __construct($id, string $name)    {        $this->id = $id;        $this->name = $name;    }    public function id()    {        return $this->id;    }    public function name():string    {        return $this->name;    }    public function addDistrict(District $district)    {        if (!isset($this->districts[$district->id()])) {            $this->districts[$district->id()] = new District($district->id(), $this, $district->name());        }    }    public function getArray():array    {        $districts = [];        foreach ($this->districts as $district) {            array_push($districts, $district->getArray());        }        return ['id' => $this->id(), 'name' => $this->name(), 'districts' => $districts];    }    public function districts():array    {        return $this->districts;    }}class District{    private $id;    private $cityId;    private $name;    public function __construct($id, City $city, string $name)    {        $this->id = $id;        $this->name = $name;        $this->cityId = $city->id();    }    public function getArray():array    {        return ['id' => $this->id, 'name' => $this->name];    }    public function id()    {        return $this->id;    }    public function name():string    {        return $this->name;    }}
City and District class examples for teaching OOP in PHP
php;object oriented