Custom resolver for import

Hello guys, I tried to create a custom resolver for import, I get an error and don’t understand why :

public function resolve(\stdClass $config, int $parentId, array $rowData)
    {
        $resolverSettingParams = json_decode($config->resolverSettings->params, true);

        if(!is_array($resolverSettingParams)) {
            throw new \Exception('please provide a valid userId resolver option');
        }

        $idColumn = $this->getIdColumn($config);
        $id = $rowData[$idColumn];
        $product = new Product();
        $product->setParent(Product::getById(79));
        $product->setType(AbstractObject::OBJECT_TYPE_VARIANT);
        $product->save();
        return $product;
    }

The error is :

Class id is null

I confirm that the product with id = 79 exist