Zend certified PHP/Magento developer

Declaration warning when extending _afterLoad() in AbstractModel

I’ve created a backend module to which I’ve added the possibility to set storeview specific data today. That worked and showed up fine. So I’m trying to load and save my storeview data now but it just won’t work. I took the code from this answer and I’m using Magento 2.3.3.

Here is my Model code in which I’m trying to load and save the storeview settings:

< ?php

namespace CompanyModuleModel;

use MagentoFrameworkModelAbstractModel;

class Module extends AbstractModel
{
    /**
     * Define resource model
     */
    protected function _construct()
    {
        $this->_init('CompanyModuleModelResourceModelModule');
    }

    /**
     * @param MagentoFrameworkModelAbstractModel $object
     * @return void
     */
    protected function saveStore($object)
    {
        $condition = $this->getConnection()->quoteInto('item_id = ?', $object->getId());
        $this->getConnection()->delete($this->getTable('company_module_store'), $condition);
        foreach ((array)$object->getData('store_id') as $store) {
            $storeArray = [
                'item_id' => $object->getId(),
                'store_id' => $store,
            ];
            $this->getConnection()->insert(
                $this->getTable('company_module_store'),
                $storeArray
            );
        }
    }

    /**
     * @param MagentoFrameworkModelAbstractModel $object
     * @return $this
     */
    protected function _afterSave(AbstractModel $object)
    {
        if (!$object->getIsMassStatus()) {
            $this->saveStore($object);
        }

        return parent::_afterSave($object);
    }

    /**
     * @param MagentoFrameworkModelAbstractModel $object
     * @return MagentoFrameworkModelAbstractModel
     */
    public function loadStore(AbstractModel $object)
    {
        $select = $this->getConnection()->select()
            ->from($this->getTable('company_module_store'))
            ->where('item_id = ?', $object->getId());

        if ($data = $this->getConnection()->fetchAll($select)) {
            $array = [];
            foreach ($data as $row) {
                $array[] = $row['store_id'];
            }
            $object->setData('store_id', $array);
        }

        return $object;
    }

    /**
     * @param MagentoFrameworkModelAbstractModel $object
     * @return $this
     */
    protected function _afterLoad(AbstractModel $object)
    {
        $object = $this->_eventObject;
        if (!$object->getIsMassDelete()) {
            $this->loadStore($object);
        }

        return parent::_afterLoad($object);
    }
}

When I load this in backend I get:

Exception #0 (Exception): Warning: Declaration of CompanyModuleModelModule::_afterLoad(MagentoFrameworkModelAbstractModel $object) should be compatible with MagentoFrameworkModelAbstractModel::_afterLoad()

I guess the problem is that _afterload originally doesn’t accept any arguments? But then how can I solve my problem? Really at a loss here.