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));
        }
    }
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));
        }
    }
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 ) ) ; } }
Save all objects in the given array to disk.

@param array $allData
@return void
@throws \RuntimeException
Save all objects in the given array to disk .