diff --git a/app/config/services.yml b/app/config/services.yml index e9a4e8e6f..6bba4e0be 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -161,9 +161,6 @@ services: Afup\Site\Forum\AppelConferencier: autowire: true - Afup\Site\Forum\Forum: - autowire: true - Afup\Site\Utils\Pays: autowire: true diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 0a1e27671..996c944d4 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -583,588 +583,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/Afup/Forum/AppelConferencier.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' / \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' \\ 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'l\\.id_forum \\= \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \' \\: \' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\-\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 8, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf1\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf2\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'debut\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'fin\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'id_salle\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'jour\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'keynote\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'nom\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'session_id\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'titre\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset int\\<0, max\\> on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 6, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to int\\.$#', - 'identifier' => 'cast.int', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$annee with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$for_bo with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$linkFormat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$only_data with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) should return array but returns mixed\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirDernier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListActive\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$filtre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) should return array but returns array\\|false\\.$#', - 'identifier' => 'return.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$annee of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) expects int\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$date of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) expects array, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 20, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$for_bo of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects bool, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$timestamp of function date expects int\\|null, int\\|false given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$linkFormat of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Part \\$nomSalle \\(mixed\\) of encapsed string cannot be cast to string\\.$#', - 'identifier' => 'encapsedStringPart.nonString', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type mixed\\.$#', - 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 15, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; $ignoreErrors[] = [ 'message' => '#^Binary operation "/" between mixed and mixed results in an error\\.$#', 'identifier' => 'binaryOp.invalid', diff --git a/sources/Afup/Forum/Forum.php b/sources/Afup/Forum/Forum.php deleted file mode 100644 index 14d2d34e6..000000000 --- a/sources/Afup/Forum/Forum.php +++ /dev/null @@ -1,460 +0,0 @@ -_bdd->obtenirEnregistrement($requete); - } - - public function obtenirForumPrecedent($id_forum) - { - $requete = 'SELECT MAX(id)'; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'WHERE'; - $requete .= ' id < ' . (int) $id_forum . ' AND titre like "%Forum%"'; - return $this->_bdd->obtenirUn($requete); - } - - public function obtenirDernier() - { - $requete = 'SELECT id '; - $requete .= 'FROM afup_forum '; - $requete .= 'ORDER BY date_debut desc'; - return $this->_bdd->obtenirUn($requete); - } - - /** - * Renvoit la liste des inscriptions à facturer ou facturé au forum - * - * @param string $champs Champs à renvoyer - * @param string $ordre Tri des enregistrements - * @param bool $associatif Renvoyer un tableau associatif ? - * @return array - */ - public function obtenirListe($id_forum = null, - string $champs = '*', - string $ordre = 'titre', - $associatif = false, - $filtre = false) - { - $requete = 'SELECT'; - $requete .= ' ' . $champs . ' '; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'ORDER BY ' . $ordre; - if ($associatif) { - return $this->_bdd->obtenirAssociatif($requete); - } else { - return $this->_bdd->obtenirTous($requete); - } - } - - public function obtenirListActive() - { - return $this->_bdd->obtenirTous('SELECT * FROM afup_forum WHERE archived_at IS NULL ORDER BY titre'); - } - - /** - * Récupérer l'agenda du forum. - * - * Pour une année donnée pass�e en paramètre, retourne - * les informations nécessaires à la construction du tableau - * de l'agenda du forum AFUP correspondant. - * - * @param Int $annee (Optionnel, retournera tout si aucunne année indiquée) - */ - public function obtenirAgenda($annee = null, $forum_id = null) - { - $aWhere = []; - if (isset($annee)) { - $tdebut = mktime(0, 0, 0, 1, 1, (int) $annee); - $tfin = mktime(0, 0, 0, 1, 1, (int) ($annee + 1)); - $aWhere[] = "p.debut >= " . $tdebut; - $aWhere[] = "p.fin < " . $tfin; - $aWhere[] = "s.plannifie = 1"; - } - - if (null !== $forum_id) { - $aWhere[] = "l.id_forum = " . $forum_id; - } - - $sWhere = "WHERE " . implode(" AND ", $aWhere); - $requete = "SELECT " - . " ( SELECT CONCAT(c.nom,' ', c.prenom , ' - ', c.societe ) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1) as conf1 , - ( SELECT CONCAT(c.nom,' ', c.prenom, ' - ', c.societe) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1,1) as conf2 , " - - . " s.session_id, s.titre, s.journee, " - . " FROM_UNIXTIME(p.debut, '%d-%m-%Y') AS 'jour', " - . " FROM_UNIXTIME(p.debut, '%H:%i') AS 'debut', " - . " FROM_UNIXTIME(p.fin, '%H:%i') AS 'fin', " - . " p.id_salle, " - . " p.keynote, " - . " l.nom " - . "FROM afup_sessions s " - . " JOIN afup_forum_planning p ON s.session_id = p.id_session " - . " JOIN afup_forum_salle l ON p.id_salle = l.id " - . $sWhere . " " - . "ORDER BY p.debut ASC, p.id_salle ASC"; - return $this->_bdd->obtenirTous($requete); - } - - /** - * Compte en nombre de demi-heures. - * - * Sur la base des horaires d'une scéance au format «HH:mm - HH:mm» - * calcule la durée en nombre de demi-heures. - * Servira à calculer combien de lignes d'affichage occupera une - * scéance. - * - * @param String $heures - * @return Int - */ - public function dureeSeance($heures) - { - $aHeures = explode("-", $heures); - $aDebut = explode(":", $aHeures[0]); - $aFin = explode(":", $aHeures[1]); - $iDebut = ((int) $aDebut[0] * 60) + (int) $aDebut[1]; - $iFin = ((int) $aFin[0] * 60) + (int) $aFin[1]; - return ($iFin - $iDebut) / 5; - } - - /** - * Construction des liens vers les fiches détaillées des conférences. - * - * @param String $infoSeance - * @param Boolean $for_bo - * @param ?string $linkFormat if $for_bo = false, this format will be used (if not null) to construct the link. - * i.e : "/sessions.php#%1" . %1 is the session id - * @return String - */ - public function lienSeance($infoSeance, $for_bo, $linkFormat): ?string - { - $masque = "#^(\\d+) ?: ?(.*)#"; - //$masque = "#^([0-9]+) ?| ?(.*) ?| ?(.*)#"; - - - $lien = '#$1'; - if ($for_bo === false) { - $lien = $linkFormat !== null ? sprintf($linkFormat, '$1') : './sessions.php#$1'; - } - return preg_replace($masque, '

$2

', $infoSeance); - } - - public function genAgenda($annee, $for_bo = false, $only_data = false, $forum_id = null, $linkFormat = null) - { - $aProgrammeData = []; - $aAgenda = $this->obtenirAgenda($annee, $forum_id); - if (isset($aAgenda) && count($aAgenda) > 0) { - $nbConf = count($aAgenda); - $nomSalles = []; - $j = 0; - $d = null; - $aProgramme = []; - foreach ($aAgenda as $session) { - if (!isset($nomSalles[$session['id_salle']])) { - $nomSalles[$session['id_salle']] = $session['nom']; - } - $dj = $session['jour']; - if ($dj != $d) { - $j++; - $d = $dj; - $aProgramme[$dj] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']] = []; - } - $aProgrammeData[$dj][$session['debut'] . "-" . $session['fin']][] = $session; - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']][] = $session['session_id'] . " : " . $session['titre'] . (' ' . $session['conf1'] . ($session['conf2'] ? (' / ' . $session['conf2']) : '') . ''); - //$aProgramme[$dj][$session['debut'] ."-". $session['fin']][$session['nom']][] = array('id'=>$session['session_id'], 'titre'=> $session['titre'],'conf1'=> $session['titre'],'titre'=> $session['titre']); - } - //var_dump($aProgrammeData['12-11-2009']);die; - if ($only_data) { - return $aProgrammeData; - } - $nbSalles = count($nomSalles); - $tdWith = round(84 / $nbSalles); - - // - $sTable = ''; - $j = 1; - $aRowSpan = []; - - /* On boucle sur chaque journée du programme. */ - foreach ($aProgramme as $journee => $aInfos) { - $journee_aff = date('d/m/Y', strtotime((string) $journee)); - $sTable .= << -

Jour {$j} : {$journee_aff}

-
- - - - - -CODE_HTML; - $s = 1; - $confNumber = 0; - foreach ($nomSalles as $idSalle => $nomSalle) { - $sTable .= <<{$nomSalle} - -CODE_HTML; - $aRowSpan[$idSalle] = 0; - $s++; - } - $sTable .= << - - - -CODE_HTML; - /* On boucle maintenant sur chaque demi-heure de l'agenda (de 08h00 à 18h00 */ - for ($h = 8; $h < 19; $h++) { - for ($i = 0; $i < 12; $i++) { - $bKeynote = false; - $m = sprintf('%02d', 5 * $i); - $m_next = sprintf('%02d', (5 * ($i + 1)) % 60); - $style = ($i % 2 == 0) ? 'lp' : 'li'; - $sHeure = ($h < 10) ? '0' . $h : $h; - $h_next = ($i < 11) ? $h : $h + 1; - $sHeure_next = ($h_next < 10) ? '0' . $h_next : $h_next; - /* Création de la ligne avec la cellule indiquant l'heure */ - $sTable .= << - - -CODE_HTML; - - /* On cherche les scéances commençant à cette heure pour chaque salle. */ - foreach ($nomSalles as $idSalle => $nomSalle) { - /* On vérifie qu'on est pas déjà sur une scéance commencée à un tour précédent. */ - if ($aRowSpan[$idSalle] <= 1): - $bSeance = false; - $rs = null; - /* Calcul du nombre de lignes occupées par la scéance s'il y en a une. */ - for ($c = 0; $c < $nbConf; $c++): - //var_dump($aAgenda[$c]); - if ( - $aAgenda[$c]['debut'] == $sHeure . ":" . $m - && $aAgenda[$c]['id_salle'] == $idSalle - && $aAgenda[$c]['jour'] == $journee - ): - /* Si on toruve une scéance, on ne mettra pas de cellule vide. */ - $bSeance = true; - - $bKeynote = $aAgenda[$c]['keynote']; - $colspan = $bKeynote ? ' colspan="' . $nbSalles . '" class="keynote" ' : ''; - $heures = $aAgenda[$c]['debut'] . "-" . $aAgenda[$c]['fin']; - $nl = $this->dureeSeance($heures); - $aRowSpan[$idSalle] = $nl; - - $class = 'conf conf_' . ($confNumber % 2 === 0 ? 'odd' : 'even'); - - $rs = ($nl > 1) ? ' rowspan="' . $nl . '"' : null; - $nbSeances = (isset($aInfos[$heures][$nomSalle])) ? count($aInfos[$heures][$nomSalle]) : 0; - if ($nbSeances > 0): - $conflit = $nbSeances > 1 ? ' style="color: inherit; background-color: #f99"' : null; - $sTable .= << - -CODE_HTML; - for ($sc = 0; $sc < $nbSeances; $sc++): - - $lien = $this->lienSeance($aInfos[$heures][$nomSalle][$sc], $for_bo, $linkFormat); - //$lien = '

$2

'; - $sTable .= $lien; - endfor; - $sTable .= ""; - $confNumber++; - endif; - break; - endif; - endfor; - if (in_array($sHeure . '_' . $m . '_' . $journee, ['17_00_12-11-2009', '10_30_12-11-2009'])) { - $bKeynote = true; - } - if (false === $bSeance && !$bKeynote): - $sTable .= "
"; - endif; - else: - $aRowSpan[$idSalle]--; - endif; - } - $sTable .= " "; - } - } - $sTable .= << -
 
{$sHeure}h{$m} - {$sHeure_next}h{$m_next}  

- -CODE_HTML; - $j++; - } - } else { - // Aucune donnée dans la base. Affichage alternatif. - $sTable = <<Aucune entrée disponible. - -CODE_HTML; - } - return $sTable; - } - - public function ajouter( - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl, - $placeName, - $placeAddress, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'INSERT INTO '; - $requete .= ' afup_forum (id, titre, nb_places, date_debut, date_fin, annee, date_fin_appel_projet,'; - $requete .= ' date_fin_appel_conferencier, date_fin_vote, date_fin_prevente, date_fin_vente, date_fin_vente_token_sponsor, date_fin_saisie_repas_speakers, date_fin_saisie_nuites_hotel, date_annonce_planning, path, `text`, - `logo_url`, `place_name`, `has_prices_defined_with_vat`, `vote_enabled`, `speakers_diner_enabled`, `accomodation_enabled`, `waiting_list_url`, `place_address`, `transport_information_enabled`) '; - $requete .= 'VALUES (null,'; - $requete .= $this->_bdd->echapper($titre) . ','; - $requete .= (int) $nb_places . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= (int) $date_debut['Y'] . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= $this->_bdd->echapper($chemin_template) . ','; - $requete .= $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= $this->_bdd->echapper($logoUrl) . ','; - $requete .= $this->_bdd->echapper($placeName) . ','; - $requete .= $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($voteEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= $this->_bdd->echapper($placeAddress) . ','; - $requete .= $this->_bdd->echapper($transportInformationEnabled ? 1 : 0); - - $requete .= ')'; - - return $this->_bdd->executer($requete); - } - - public function modifier( - string $id, - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl = null, - $placeName = null, - $placeAddress = null, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'UPDATE '; - $requete .= ' afup_forum '; - $requete .= 'SET'; - $requete .= ' titre=' . $this->_bdd->echapper($titre) . ','; - $requete .= ' nb_places=' . (int) $nb_places . ','; - $requete .= ' date_debut=' . $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= ' date_fin=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= ' annee=' . (int) $date_debut['Y'] . ','; - $requete .= ' date_fin_appel_projet=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= ' date_fin_appel_conferencier=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= ' date_fin_vote=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= ' date_fin_prevente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= ' date_fin_vente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= ' date_fin_vente_token_sponsor=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= ' date_fin_saisie_repas_speakers=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= ' date_fin_saisie_nuites_hotel=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= ' date_annonce_planning=' . $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= ' path=' . $this->_bdd->echapper($chemin_template) . ', '; - $requete .= ' `text` = ' . $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= ' `logo_url` = ' . $this->_bdd->echapper($logoUrl) . ', '; - $requete .= ' `place_name` = ' . $this->_bdd->echapper($placeName) . ', '; - $requete .= ' `vote_enabled` = ' . $this->_bdd->echapper($voteEnabled ? 1 : 0) . ', '; - $requete .= ' `has_prices_defined_with_vat` = ' . $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ', '; - $requete .= ' `speakers_diner_enabled` = ' . $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ', '; - $requete .= ' `accomodation_enabled` = ' . $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ', '; - $requete .= ' `waiting_list_url` = ' . $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= ' `place_address` = ' . $this->_bdd->echapper($placeAddress) . ', '; - $requete .= ' `transport_information_enabled` = ' . $this->_bdd->echapper($transportInformationEnabled ? 1 : 0) . ' '; - $requete .= 'WHERE'; - $requete .= ' id=' . $id; - - return $this->_bdd->executer($requete); - } - - public function supprimer($id_forum) - { - $id_forum = $this->_bdd->echapper($id_forum); - - $requete = 'DELETE FROM afup_forum WHERE id = ' . $id_forum; - - return $this->_bdd->executer($requete); - } -}