Commit 966bace2 authored by Marc Egger's avatar Marc Egger
Browse files

Refs #10120 remove return type void since it is not supported by the PHP...

Refs #10120 remove return type void since it is not supported by the PHP version of the gitlab runner. very sad.
parent 7c4b8766
Pipeline #3645 failed with stages
in 2 minutes and 30 seconds
......@@ -17,6 +17,8 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
// TODO: Carsten Fragen: QFQ formulare haben id unter 1000 und user forms ueber 1000. Wird ein QFQ formular neu importiert, erhaelt es aber eine id ueber 1000. ist dies ein problem?
// TODO: Carsten Fragen: ZUERST NOCHMAL GENAU NACHTEILE PRUEFEN: In doForm koennte man auch einfach pauschal importAllForms(enforce writeable=true) und exportAllForms() machen, wenn der geladene record ein Form/Formelement ist. Bei vielen forms koennte es langsam sein. ansonsten sehe ich gerade keine klaren nachteile.
// TODO: Carsten Fragen: Kann es sein, dass records in Dirty tabelle nicht mehr richtig abegraeumt werden, weil forms die ID wechseln?
// TODO: Carsten Fragen: Exceptions werden teilweise ohne Developer message angezeigt (API). Deshalb habe ich die Message teilweise in User message getan.
// TODO: Carsten Fragen: PHP version von gitlab runner hochstellen, damit ?string type syntax fuer funktionen erlaubt ist? verhindert einige fehler
// TODO: BEFOORE PRUDUCTION
// TODO: add Exception hint as hint instead of in main message?
......@@ -211,7 +213,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function exportForm(string $formName, Database $database): void
public static function exportForm(string $formName, Database $database)
{
// Get form from DB
$FORM = TABLE_NAME_FORM; // can't use constants in strings directly
......@@ -313,7 +315,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function deleteFormFile($formName, Database $database): void
public static function deleteFormFile($formName, Database $database)
{
self::enforceFormFileWritable($formName, $database);
$pathFileName = self::formPathFileName($formName, $database);
......@@ -354,7 +356,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function enforceFormFileWritable(string $formName, Database $database): void
public static function enforceFormFileWritable(string $formName, Database $database)
{
$pathFileName = self::formPathFileName($formName, $database);
if (file_exists($pathFileName)) {
......@@ -448,7 +450,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function importAllForms(Database $database, bool $enforceWritable = false, bool $deleteFromDB = false): void
public static function importAllForms(Database $database, bool $enforceWritable = false, bool $deleteFromDB = false)
{
// Import all form files
$formFileNames = self::formFileNames($database);
......@@ -479,7 +481,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function exportAllForms(Database $database, bool $deleteFiles = false): void
public static function exportAllForms(Database $database, bool $deleteFiles = false)
{
$formNamesDB = self::queryAllFormNames($database);
foreach ($formNamesDB as $formNameDB) {
......@@ -533,7 +535,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
private static function deleteFormDB(string $formName, Database $database): void
private static function deleteFormDB(string $formName, Database $database)
{
$F_ID = F_ID; // can't use constants in strings directly
$F_NAME = F_NAME; // can't use constants in strings directly
......@@ -554,7 +556,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
private static function deleteFormDBWithId(int $formId, Database $database): void
private static function deleteFormDBWithId(int $formId, Database $database)
{
$F_ID = F_ID; // can't use constants in strings directly
$TABLE_NAME_FORM = TABLE_NAME_FORM; // can't use constants in strings directly
......@@ -571,7 +573,7 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
private static function deleteFormElementsDBWithFormId(int $formId, Database $database): void
private static function deleteFormElementsDBWithFormId(int $formId, Database $database)
{
$TABLE_NAME_FORM_ELEMENT = TABLE_NAME_FORM_ELEMENT; // can't use constants in strings directly
$FE_FORM_ID = FE_FORM_ID; // can't use constants in strings directly
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment