private function saveAllObjects(array $allData): void
    {
        $fileSaved = @file_put_contents($this->databaseFilePath, Serializer::serialize($allData));

        if ($fileSaved === false) {
            throw new \RuntimeException(sprintf('Failed to save file "%s"', $this->databaseFilePath));
        }
    }