public function findAll() : array
    {
        $objectsData = $this->objectDataRepository->findAll();

        $objects = [];
        foreach ($objectsData as $objectData) {
            $object = $this->getOrCreateObject($objectData);

            if ($object === null) {
                throw new InvalidArgumentException('Could not create object.');
            }

            $objects[] = $object;
        }

        return $objects;
    }