protected function handleWorker(WorkerInterface $worker, $object, StorageInterface $storage)
    {
        $this->injectDependencies($worker);

        $modifiedObject = $worker->handle($object);

        if ($modifiedObject === null && $object !== null) {
            $storage->remove($object);
        } elseif ($modifiedObject !== $object) {
            $storage->remove($object);
            $storage->add($modifiedObject);
        }

        return $modifiedObject;
    }