From 242883255f1ec651741fd0b25c4f1cfd9dcb0a6f Mon Sep 17 00:00:00 2001 From: Albin Kester <83301974+stakovicz@users.noreply.github.com> Date: Sun, 9 Feb 2025 18:13:02 +0100 Subject: [PATCH] Rector, php-cs-fixer et phpstan (#1609) --- .php-cs-fixer.php | 6 +- app/AppCache.php | 2 + app/AppKernel.php | 52 ++- .../association/membership/register.html.twig | 2 +- app/Resources/views/site/base.html.twig | 2 +- .../views/site/become_member.html.twig | 2 +- .../views/site/cms_page/display.html.twig | 2 +- .../adhesion_entreprise.html.twig | 2 +- .../views/site/meetups/list.html.twig | 2 +- app/Resources/views/site/news/list.html.twig | 2 +- app/Resources/views/site/offices.html.twig | 2 +- .../views/site/techletter/index.html.twig | 2 +- app/config/config.php | 6 +- app/config/routing.yml | 8 +- app/config/routing/admin.yml | 4 +- app/config/routing/blog.yml | 8 +- app/config/routing/cms_page.yml | 2 +- app/config/routing/connection.yml | 4 +- app/config/routing/event.yml | 54 +-- app/config/routing/global.yml | 6 +- app/config/routing/meetups.yml | 2 +- app/config/routing/member.yml | 26 +- app/config/routing/news.yml | 4 +- app/config/routing/site.yml | 28 +- app/config/routing/talks.yml | 6 +- app/config/routing/techletter.yml | 2 +- app/config/routing/techletter_admin.yml | 14 +- app/config/services.yml | 140 ++++--- behat.yml | 4 +- htdocs/app.php | 25 +- htdocs/index.php | 6 +- .../pages/administration/compta_balance.php | 80 ++-- htdocs/pages/administration/compta_banque.php | 27 +- htdocs/pages/administration/compta_bilan.php | 111 +++--- .../administration/compta_conf_categorie.php | 66 ++-- .../administration/compta_conf_compte.php | 64 ++-- .../administration/compta_conf_evenement.php | 64 ++-- .../administration/compta_conf_operation.php | 65 ++-- .../administration/compta_conf_regle.php | 14 +- .../administration/compta_conf_reglement.php | 63 ++-- htdocs/pages/administration/compta_devis.php | 158 ++++---- .../pages/administration/compta_facture.php | 343 +++++++++--------- .../pages/administration/compta_journal.php | 272 +++++++------- .../pages/administration/compta_recherche.php | 4 +- .../pages/administration/compta_synthese.php | 48 +-- htdocs/pages/administration/cotisations.php | 64 ++-- .../administration/forum_facturation.php | 46 +-- htdocs/pages/administration/forum_gestion.php | 9 +- .../administration/forum_inscriptions.php | 219 +++++------ .../pages/administration/forum_joind_in.php | 9 +- .../pages/administration/forum_partenaire.php | 23 +- .../pages/administration/forum_planning.php | 206 ++++++----- .../pages/administration/forum_sessions.php | 91 ++--- htdocs/pages/administration/index.php | 11 +- htdocs/pages/administration/logs.php | 7 +- .../administration/membre_administrateur.php | 5 +- .../administration/membre_personne_morale.php | 9 +- htdocs/pages/administration/message.php | 11 +- htdocs/pages/administration/paybox_annule.php | 5 +- .../pages/administration/paybox_effectue.php | 4 +- htdocs/pages/administration/paybox_erreur.php | 4 +- htdocs/pages/administration/paybox_refuse.php | 9 +- .../administration/personnes_morales.php | 7 +- htdocs/pages/administration/site_articles.php | 24 +- htdocs/pages/administration/site_feuilles.php | 190 +++++----- htdocs/pages/event-payment/index.php | 21 +- htdocs/pages/event-payment/paybox_annule.php | 4 +- .../pages/event-payment/paybox_effectue.php | 6 +- htdocs/pages/event-payment/paybox_erreur.php | 4 +- htdocs/pages/event-payment/paybox_refuse.php | 4 +- htdocs/pages/paiement/index.php | 10 +- htdocs/pages/paiement/paybox_annule.php | 4 +- htdocs/pages/paiement/paybox_effectue.php | 6 +- htdocs/pages/paiement/paybox_erreur.php | 4 +- htdocs/pages/paiement/paybox_refuse.php | 4 +- htdocs/pages/paiement/payment_tracking.php | 13 +- htdocs/pages/site/rss.php | 2 + htdocs/robots/planete/explorateur.php | 49 +-- .../administration/compta_balance.html | 22 +- .../administration/compta_banque.html | 16 +- .../administration/compta_bilan.html | 24 +- .../administration/compta_devis.html | 2 +- .../administration/compta_facture.html | 2 +- .../administration/compta_journal.html | 4 +- .../administration/compta_synthese.html | 10 +- .../administration/forum_facturation.html | 2 +- .../administration/forum_inscriptions.html | 2 +- .../administration/forum_sessions.html | 2 +- .../administration/personnes_morales.html | 2 +- .../administration/site_articles.html | 2 +- htdocs/templates/planete/images/cron.php | 12 +- rector.php | 19 +- sources/Afup/Association/Cotisations.php | 118 +++--- .../Afup/Association/Personnes_Morales.php | 41 +-- sources/Afup/AuthentificationInterface.php | 13 +- sources/Afup/AuthentificationWiki.php | 12 +- sources/Afup/Bootstrap/Cli.php | 12 +- sources/Afup/Bootstrap/Http.php | 28 +- sources/Afup/Bootstrap/OtherToolPlugin.php | 12 +- sources/Afup/Bootstrap/_Common.php | 22 +- sources/Afup/Bootstrap/commonStart.php | 15 +- sources/Afup/Comptabilite/Comptabilite.php | 297 +++++++-------- sources/Afup/Comptabilite/Facture.php | 81 ++--- sources/Afup/Comptabilite/PDF.php | 17 +- sources/Afup/Corporate/Accueil.php | 28 +- sources/Afup/Corporate/Article.php | 71 ++-- sources/Afup/Corporate/Articles.php | 39 +- sources/Afup/Corporate/Branche.php | 46 +-- sources/Afup/Corporate/Feuille.php | 40 +- sources/Afup/Corporate/Feuilles.php | 18 +- sources/Afup/Corporate/Footer.php | 25 +- sources/Afup/Corporate/Page.php | 64 ++-- sources/Afup/Corporate/Rubrique.php | 111 +++--- sources/Afup/Corporate/Rubriques.php | 28 +- sources/Afup/Corporate/Site.php | 54 ++- .../Afup/Corporate/_Site_Base_De_Donnees.php | 4 +- sources/Afup/Droits.php | 35 +- sources/Afup/Forum/AppelConferencier.php | 80 ++-- sources/Afup/Forum/Coupon.php | 19 +- sources/Afup/Forum/Facturation.php | 45 +-- sources/Afup/Forum/Forum.php | 189 +++++----- sources/Afup/Forum/InscriptionType.php | 7 +- sources/Afup/Forum/Inscriptions.php | 57 ++- sources/Afup/Forum/Partenaires.php | 36 +- sources/Afup/Logger/DbLoggerTrait.php | 6 +- sources/Afup/Niveau_Partenariat.php | 8 +- sources/Afup/Pagination.php | 3 + sources/Afup/Utils/Base_De_Donnees.php | 114 +++--- sources/Afup/Utils/Configuration.php | 7 +- sources/Afup/Utils/Logs.php | 57 +-- sources/Afup/Utils/Mail.php | 10 +- sources/Afup/Utils/Mailing.php | 6 +- sources/Afup/Utils/PDF_AG.php | 26 +- sources/Afup/Utils/PDF_Facture.php | 27 +- sources/Afup/Utils/Pays.php | 20 +- sources/Afup/Utils/SymfonyKernel.php | 53 +-- sources/Afup/Utils/Sympa.php | 9 +- sources/Afup/Utils/Utils.php | 17 +- sources/Afup/Utils/Vat.php | 8 +- sources/Afup/fonctions.php | 37 +- sources/AppBundle/AppBundle.php | 2 + .../AbstractCompanyReminder.php | 13 +- .../CompanyReminderFactory.php | 12 +- .../CompanyMembership/InvitationMail.php | 20 +- .../Reminder15DaysAfterEnd.php | 8 +- .../Reminder15DaysBeforeEnd.php | 8 +- .../Reminder7DaysBeforeEnd.php | 8 +- .../CompanyMembership/ReminderDDay.php | 8 +- .../SubscriptionManagement.php | 9 +- .../CompanyMembership/UserCompany.php | 22 +- .../Association/Event/NewMemberEvent.php | 9 +- .../Association/Event/UserDisabledEvent.php | 9 +- .../Association/Factory/UserFactory.php | 2 + .../Form/AdminCompanyMemberType.php | 6 +- .../AppBundle/Association/Form/BadgeType.php | 6 +- .../Form/CompanyMemberInvitationType.php | 6 +- .../Association/Form/CompanyMemberType.php | 6 +- .../Association/Form/CompanyPublicProfile.php | 8 +- .../Association/Form/ContactDetailsType.php | 19 +- .../Association/Form/HTML_QuickForm.php | 2 + .../Association/Form/HelpMessageExtension.php | 6 +- .../Form/NearestOfficeChoiceType.php | 4 +- .../Association/Form/RegisterUserType.php | 6 +- .../Association/Form/TicketEventType.php | 11 +- .../Association/Form/UserBadgeType.php | 16 +- .../Association/Form/UserEditFormData.php | 4 +- .../Association/Form/UserEditType.php | 14 +- .../AppBundle/Association/Form/UserType.php | 6 +- .../MembershipFeeReferenceGenerator.php | 10 +- .../MembershipReminderInterface.php | 2 + .../Association/Model/CompanyMember.php | 102 ++---- .../Model/CompanyMemberInvitation.php | 33 +- .../Model/GeneralMeetingQuestion.php | 50 +-- .../Model/GeneralMeetingResponse.php | 19 +- .../Association/Model/GeneralMeetingVote.php | 25 +- .../CompanyMemberInvitationRepository.php | 2 + .../Repository/CompanyMemberRepository.php | 6 +- .../GeneralMeetingQuestionRepository.php | 6 +- .../GeneralMeetingResponseRepository.php | 2 + .../GeneralMeetingVoteRepository.php | 2 + .../SubscriptionReminderLogRepository.php | 2 + .../Repository/SubscriptionRepository.php | 22 +- .../TechletterSubscriptionsRepository.php | 8 +- .../TechletterUnsubscriptionsRepository.php | 11 +- .../Model/Repository/UserRepository.php | 33 +- .../Model/SubscriptionReminderLog.php | 47 +-- .../Model/TechletterSubscription.php | 41 +-- .../Model/TechletterUnsubscription.php | 21 +- sources/AppBundle/Association/Model/User.php | 155 +++----- .../Association/NotifiableInterface.php | 2 + .../UserMembership/AbstractUserReminder.php | 13 +- .../UserMembership/BadgesComputer.php | 86 +++-- .../UserMembership/Reminder15DaysAfterEnd.php | 8 +- .../Reminder15DaysBeforeEnd.php | 8 +- .../UserMembership/Reminder7DaysBeforeEnd.php | 8 +- .../UserMembership/ReminderDDay.php | 8 +- .../UserMembership/SeniorityComputer.php | 15 +- .../Association/UserMembership/Statistics.php | 2 + .../UserMembership/StatisticsComputer.php | 10 +- .../UserMembership/UserReminderFactory.php | 12 +- .../UserMembership/UserService.php | 24 +- sources/AppBundle/CFP/PhotoStorage.php | 39 +- sources/AppBundle/CFP/SpeakerFactory.php | 28 +- .../AppBundle/CFP/ViewModel/EventTalkList.php | 16 +- .../Calendar/IcsPLanningGenerator.php | 8 +- .../Calendar/JsonPlanningGenerator.php | 27 +- .../Calendar/TechnoWatchCalendarGenerator.php | 19 +- .../Command/CfpNotificationCommand.php | 33 +- .../Command/CleanThrottlingCommand.php | 14 +- .../DevCallBackPayboxCotisationCommand.php | 6 +- .../GeneralMeetupNotificationCommand.php | 21 +- .../AppBundle/Command/IndexMeetupsCommand.php | 8 +- .../AppBundle/Command/IndexTalksCommand.php | 9 +- .../Command/QrCodesGeneratorCommand.php | 12 +- .../Command/RegistrationsExporterCommand.php | 14 +- .../Command/ScrappingMeetupEventsCommand.php | 7 +- .../SlackMemberNotificationCommand.php | 23 +- .../Command/SubscriptionReminderCommand.php | 49 ++- .../AppBundle/Command/SynchMembersCommand.php | 6 +- .../Command/SynchTechLetterCommand.php | 6 +- .../TicketStatsNotificationCommand.php | 23 +- .../AppBundle/Command/TwitterBotCommand.php | 11 +- .../UpdateCompanyMemberStateCommand.php | 6 +- .../Command/UpdateMailchimpMembersCommand.php | 37 +- .../Command/UpdateUserStateCommand.php | 6 +- .../AppBundle/Command/VideosDataCommand.php | 6 +- .../Compta/BankAccount/BankAccount.php | 2 + .../Compta/BankAccount/BankAccountFactory.php | 6 +- .../Compta/Importer/AutoQualifier.php | 38 +- .../Compta/Importer/CaisseEpargne.php | 30 +- .../Compta/Importer/CreditMutuel.php | 29 +- .../Compta/Importer/CreditMutuelLivret.php | 4 +- sources/AppBundle/Compta/Importer/Factory.php | 2 + .../AppBundle/Compta/Importer/Importer.php | 5 +- .../AppBundle/Compta/Importer/Operation.php | 7 +- .../Admin/Event/BadgesGenerateAction.php | 10 +- .../Controller/Admin/Event/ListAction.php | 16 +- .../Admin/Event/PendingBankwiresAction.php | 38 +- .../Event/PreviousRegistrationsAction.php | 10 +- .../Controller/Admin/Event/PricesAction.php | 16 +- .../Admin/Event/PricesAddAction.php | 26 +- .../Admin/Event/PricesEditAction.php | 23 +- .../Admin/Event/RemoveEventAction.php | 33 +- .../Admin/Event/ResendSponsorTokenAction.php | 19 +- .../Controller/Admin/Event/RoomAction.php | 24 +- .../Event/SendLastCallSponsorTokenAction.php | 19 +- .../Event/SendTestInscriptionEmailAction.php | 16 +- .../Admin/Event/SpeakerInfosAction.php | 11 +- .../Admin/Event/SpeakersExpensesAction.php | 21 +- .../Admin/Event/SpeakersManagementAction.php | 21 +- .../Admin/Event/SpecialPriceAction.php | 23 +- .../Admin/Event/SponsorTicketAction.php | 26 +- .../Controller/Admin/Event/StatsAction.php | 27 +- .../Controller/Admin/GetMenuAction.php | 12 +- .../Admin/GithubUser/GithubUserAddAction.php | 20 +- .../Admin/GithubUser/GithubUserListAction.php | 10 +- .../AppBundle/Controller/Admin/HomeAction.php | 33 +- .../Controller/Admin/LoginAction.php | 8 +- .../Controller/Admin/LostPasswordAction.php | 20 +- .../Admin/Members/BadgeListAction.php | 13 +- .../Admin/Members/BadgeNewAction.php | 25 +- .../Members/GeneralMeeting/EditAction.php | 19 +- .../Members/GeneralMeeting/ListAction.php | 13 +- .../Members/GeneralMeeting/ListingAction.php | 7 +- .../Members/GeneralMeeting/PrepareAction.php | 14 +- .../Members/GeneralMeeting/ReportsAction.php | 18 +- .../GeneralMeetingQuestion/AddAction.php | 20 +- .../GeneralMeetingQuestion/DeleteAction.php | 16 +- .../GeneralMeetingQuestion/EditAction.php | 17 +- .../GeneralMeetingVote/CloseAction.php | 19 +- .../Members/GeneralMeetingVote/ListAction.php | 24 +- .../Members/GeneralMeetingVote/OpenAction.php | 19 +- .../Admin/Members/UserAddAction.php | 23 +- .../Admin/Members/UserBadgeDeleteAction.php | 7 +- .../Admin/Members/UserBadgeNewAction.php | 13 +- .../Admin/Members/UserDeleteAction.php | 13 +- .../Admin/Members/UserEditAction.php | 20 +- .../Admin/Members/UserExportAction.php | 7 +- .../Admin/Members/UserListAction.php | 13 +- .../Admin/Members/UserResetPasswordAction.php | 16 +- .../Admin/Members/UserSendWelcomeAction.php | 16 +- .../Admin/Membership/ReminderLogAction.php | 10 +- .../Admin/Planete/FeedAddAction.php | 17 +- .../Admin/Planete/FeedArticleListAction.php | 10 +- .../Admin/Planete/FeedDeleteAction.php | 13 +- .../Admin/Planete/FeedEditAction.php | 21 +- .../Admin/Planete/FeedListAction.php | 12 +- .../Admin/Site/AddRubriqueAction.php | 18 +- .../Admin/Site/DeleteRubriqueAction.php | 19 +- .../Admin/Site/EditRubriqueAction.php | 28 +- .../Admin/Site/ListRubriquesAction.php | 12 +- .../Admin/SlackMembers/CheckMembersAction.php | 10 +- .../Controller/Admin/Speaker/ExportAction.php | 10 +- .../Admin/Speaker/SpeakerAddAction.php | 23 +- .../Admin/Speaker/SpeakerDeleteAction.php | 13 +- .../Admin/Speaker/SpeakerEditAction.php | 29 +- .../Speaker/SpeakerLinkGravatarAction.php | 16 +- .../Admin/Speaker/SpeakerListAction.php | 19 +- .../Admin/Speaker/SpeakerRegisterAction.php | 28 +- .../Controller/Admin/Talk/ExportAction.php | 10 +- .../Admin/Talk/UpdateIndexationAction.php | 10 +- .../TechLetterGenerateController.php | 72 ++-- .../Controller/Admin/VoteController.php | 69 ++-- .../Controller/Event/BlogController.php | 63 ++-- .../Controller/Event/CFP/EditAction.php | 47 +-- .../Controller/Event/CFP/IndexAction.php | 28 +- .../Controller/Event/CFP/InviteAction.php | 31 +- .../Controller/Event/CFP/ProposeAction.php | 29 +- .../Controller/Event/CFP/SidebarRenderer.php | 11 +- .../Controller/Event/CFP/SpeakerAction.php | 38 +- .../Controller/Event/EventActionHelper.php | 8 +- .../Controller/Event/EventBaseController.php | 33 -- .../Controller/Event/EventController.php | 69 ++-- .../Controller/Event/LeadController.php | 44 ++- .../Controller/Event/SpeakerFilesAction.php | 13 +- .../Controller/Event/SpeakerPageAction.php | 11 +- .../Event/SpeakerSuggestionController.php | 36 +- .../Event/SponsorScanController.php | 44 ++- .../Controller/Event/TicketController.php | 167 +++++---- .../AppBundle/Controller/GithubController.php | 19 +- .../Legacy/Forum2008ConferenciersAction.php | 10 +- .../Legacy/Forum2008ResumesAction.php | 10 +- .../Legacy/Forum2008SessionsAction.php | 10 +- .../Legacy/Forum2009AgendaAction.php | 10 +- .../Legacy/Forum2009ConferenciersAction.php | 12 +- .../Controller/Legacy/Forum2009Config.php | 2 + .../Legacy/Forum2009ProjetsPhpAction.php | 10 +- .../Legacy/Forum2009ResumesAction.php | 10 +- .../Legacy/Forum2009SessionsAction.php | 10 +- .../Legacy/Forum2016ConferenciersAction.php | 14 +- .../Legacy/Forum2016PlanningAction.php | 13 +- .../Legacy/Forum2016SessionsAction.php | 15 +- .../Controller/Legacy/LegacyEventAction.php | 7 +- .../AppBundle/Controller/LegacyController.php | 51 ++- .../MembershipAdmin/ReportingAction.php | 10 +- .../Controller/Planete/ArticlesController.php | 5 +- .../Controller/Planete/FeedsController.php | 5 +- .../Controller/Website/BadgeController.php | 26 +- .../Controller/Website/CmsPageController.php | 11 +- .../CompanyPublicProfileController.php | 40 +- .../CompanyPublicProfileListController.php | 18 +- .../Controller/Website/HomeController.php | 42 ++- .../Website/HtmlSitemapController.php | 23 +- .../Controller/Website/MeetupsController.php | 21 +- .../Website/Member/CompanyController.php | 17 +- .../Member/CompanyPublicProfileController.php | 29 +- .../Website/Member/MembersController.php | 60 ++- .../Controller/Website/MemberController.php | 34 +- .../Website/MemberShipController.php | 257 ++++++++----- .../Controller/Website/NewsController.php | 42 ++- .../Website/NewsletterController.php | 26 +- .../Controller/Website/PagerController.php | 9 +- .../Website/PayboxRedirectController.php | 9 +- .../Controller/Website/RssFeedController.php | 16 +- .../Website/SecondaryMenuController.php | 38 +- .../Controller/Website/StaticController.php | 29 +- .../Controller/Website/TalksController.php | 56 ++- .../Website/TechletterController.php | 27 +- .../Website/TechnoWatchController.php | 22 +- sources/AppBundle/Email/Emails.php | 11 +- .../Email/Mailer/Adapter/MailerAdapter.php | 2 + .../Email/Mailer/Adapter/PhpMailerAdapter.php | 11 +- sources/AppBundle/Email/Mailer/Attachment.php | 2 + sources/AppBundle/Email/Mailer/MailUser.php | 2 + .../Email/Mailer/MailUserFactory.php | 12 +- sources/AppBundle/Email/Mailer/Mailer.php | 26 +- sources/AppBundle/Email/Mailer/Message.php | 42 +-- sources/AppBundle/Email/Parsedown.php | 9 +- .../AppBundle/Event/Form/EventSelectType.php | 9 +- .../Event/Form/GithubUserFormData.php | 2 + .../AppBundle/Event/Form/GithubUserType.php | 6 +- sources/AppBundle/Event/Form/LeadType.php | 6 +- sources/AppBundle/Event/Form/PurchaseType.php | 27 +- sources/AppBundle/Event/Form/RoomType.php | 6 +- .../AppBundle/Event/Form/SpeakerFormData.php | 2 + .../Event/Form/SpeakerFormDataFactory.php | 2 + .../Event/Form/SpeakerSuggestionType.php | 4 +- sources/AppBundle/Event/Form/SpeakerType.php | 4 +- .../AppBundle/Event/Form/SponsorScanType.php | 2 +- .../Event/Form/SponsorTicketType.php | 6 +- .../AppBundle/Event/Form/SponsorTokenType.php | 6 +- .../Event/Form/TalkInvitationType.php | 4 +- sources/AppBundle/Event/Form/TalkType.php | 6 +- .../Event/Form/TicketSpecialPriceType.php | 6 +- sources/AppBundle/Event/Form/TicketType.php | 40 +- sources/AppBundle/Event/Form/VoteType.php | 6 +- .../Event/Invoice/InvoiceService.php | 14 +- sources/AppBundle/Event/JsonLd.php | 43 +-- sources/AppBundle/Event/Model/Badge.php | 15 +- sources/AppBundle/Event/Model/Event.php | 200 ++++------ sources/AppBundle/Event/Model/EventStats.php | 11 + .../Event/Model/EventStats/DailyStats.php | 2 + .../Model/EventStats/TicketTypeStats.php | 2 + sources/AppBundle/Event/Model/GithubUser.php | 35 +- .../Event/Model/HydratorAggregator.php | 21 +- sources/AppBundle/Event/Model/Invoice.php | 110 ++---- .../AppBundle/Event/Model/InvoiceFactory.php | 9 +- .../AppBundle/Event/Model/JoinHydrator.php | 6 +- sources/AppBundle/Event/Model/Lead.php | 42 +-- sources/AppBundle/Event/Model/Meetup.php | 28 +- sources/AppBundle/Event/Model/Planning.php | 53 +-- .../Model/Repository/BadgeRepository.php | 7 +- .../Model/Repository/EventRepository.php | 4 +- .../Model/Repository/EventStatsRepository.php | 17 +- .../Model/Repository/GithubUserRepository.php | 2 + .../Model/Repository/InvoiceRepository.php | 4 +- .../Model/Repository/MeetupRepository.php | 4 +- .../Model/Repository/PlanningRepository.php | 6 +- .../Event/Model/Repository/RoomRepository.php | 8 +- .../Model/Repository/SpeakerRepository.php | 16 +- .../SpeakerSuggestionRepository.php | 4 +- .../Repository/SponsorScanRepository.php | 2 + .../Repository/SponsorTicketRepository.php | 6 +- .../Repository/TalkInvitationRepository.php | 7 +- .../Event/Model/Repository/TalkRepository.php | 39 +- .../Repository/TalkToSpeakersRepository.php | 9 +- .../Repository/TicketEventTypeRepository.php | 21 +- .../Model/Repository/TicketRepository.php | 6 +- .../TicketSpecialPriceRepository.php | 9 +- .../Model/Repository/TicketTypeRepository.php | 2 + .../Model/Repository/TweetRepository.php | 11 +- .../Model/Repository/UserBadgeRepository.php | 7 +- .../Event/Model/Repository/VoteRepository.php | 7 +- sources/AppBundle/Event/Model/Room.php | 21 +- sources/AppBundle/Event/Model/Speaker.php | 127 ++----- .../Event/Model/SpeakerSuggestion.php | 16 +- sources/AppBundle/Event/Model/SponsorScan.php | 12 +- .../AppBundle/Event/Model/SponsorTicket.php | 55 +-- sources/AppBundle/Event/Model/Talk.php | 224 ++++-------- .../AppBundle/Event/Model/TalkInvitation.php | 33 +- .../AppBundle/Event/Model/TalkToSpeaker.php | 8 +- sources/AppBundle/Event/Model/Ticket.php | 130 +++---- .../AppBundle/Event/Model/TicketEventType.php | 55 +-- .../AppBundle/Event/Model/TicketFactory.php | 4 +- .../Event/Model/TicketSpecialPrice.php | 49 +-- sources/AppBundle/Event/Model/TicketType.php | 39 +- sources/AppBundle/Event/Model/Tweet.php | 51 +-- sources/AppBundle/Event/Model/UserBadge.php | 43 +-- sources/AppBundle/Event/Model/Vote.php | 42 +-- .../Event/Speaker/ExportGenerator.php | 69 +--- .../AppBundle/Event/Speaker/SpeakerPage.php | 29 +- .../Event/Sponsorship/SponsorshipLeadMail.php | 24 +- .../AppBundle/Event/Talk/ExportGenerator.php | 50 +-- .../Event/Talk/InvitationFormHandler.php | 24 +- .../AppBundle/Event/Talk/TalkFormHandler.php | 27 +- sources/AppBundle/Event/Ticket/Purchase.php | 8 +- .../Event/Ticket/PurchaseTypeFactory.php | 28 +- .../Event/Ticket/QrCodeGenerator.php | 4 +- .../Ticket/RegistrationsExportGenerator.php | 70 +--- .../Event/Ticket/SponsorTicketHelper.php | 30 +- .../Event/Ticket/SponsorTokenMail.php | 26 +- .../Event/Ticket/TicketTypeAvailability.php | 15 +- .../Validator/Constraints/AvailableTicket.php | 2 + .../Constraints/AvailableTicketValidator.php | 17 +- .../Validator/Constraints/CorporateMember.php | 2 + .../Constraints/CorporateMemberValidator.php | 22 +- .../Validator/Constraints/EarlyBirdTicket.php | 2 + .../Constraints/EarlyBirdTicketValidator.php | 5 +- .../Validator/Constraints/LoggedInMember.php | 2 + .../Constraints/LoggedInMemberValidator.php | 12 +- .../Validator/Constraints/PublicTicket.php | 2 + .../Constraints/PublicTicketValidator.php | 7 +- .../Constraints/TicketsCfpSubmitter.php | 2 + .../TicketsCfpSubmitterValidator.php | 5 +- sources/AppBundle/GeneralMeeting/Attendee.php | 8 +- .../GeneralMeeting/GeneralMeeting.php | 17 +- .../GeneralMeetingQuestionFormType.php | 6 +- .../GeneralMeetingRepository.php | 54 ++- .../GeneralMeeting/PrepareFormType.php | 6 +- .../UnableToFindGithubUserException.php | 2 + .../UnableToGetGithubUserInfosException.php | 2 + sources/AppBundle/Github/GithubClient.php | 10 +- .../Meetups/MeetupDateTimeConverter.php | 20 +- .../Indexation/Meetups/MeetupScraper.php | 11 +- .../AppBundle/Indexation/Meetups/Runner.php | 31 +- .../Indexation/Meetups/Transformer.php | 20 +- sources/AppBundle/Indexation/Talks/Runner.php | 33 +- .../Indexation/Talks/Transformer.php | 10 +- sources/AppBundle/Joindin/JoindinComments.php | 27 +- sources/AppBundle/Joindin/JoindinTalk.php | 10 +- sources/AppBundle/LegacyModelFactory.php | 2 + ...Listener.php => LocaleEventSubscriber.php} | 15 +- ...tListener.php => EventEventSubscriber.php} | 19 +- sources/AppBundle/Mailchimp/Mailchimp.php | 54 +-- .../MailchimpMembersAutoListSynchronizer.php | 47 +-- sources/AppBundle/Mailchimp/Runner.php | 18 +- .../AppBundle/Mailchimp/SubscriberType.php | 4 +- sources/AppBundle/Model/CollectionFilter.php | 20 +- sources/AppBundle/Model/ComptaCategorie.php | 2 + sources/AppBundle/Model/ComptaCompte.php | 2 + sources/AppBundle/Model/ComptaEvenement.php | 2 + .../AppBundle/Model/ComptaModeReglement.php | 2 + sources/AppBundle/Notifier/SlackNotifier.php | 2 + .../AppBundle/Offices/NullOfficeFinder.php | 4 +- sources/AppBundle/Offices/OfficeFinder.php | 102 ++---- .../AppBundle/Offices/OfficesCollection.php | 20 +- .../OpenfeedbackJsonGenerator.php | 33 +- sources/AppBundle/Payment/Paybox.php | 58 ++- sources/AppBundle/Payment/PayboxBilling.php | 7 +- sources/AppBundle/Payment/PayboxFactory.php | 13 +- sources/AppBundle/Payment/PayboxResponse.php | 6 +- .../Payment/PayboxResponseFactory.php | 4 +- sources/AppBundle/Planete/FeedFormData.php | 2 + sources/AppBundle/Planete/FeedFormType.php | 7 +- sources/AppBundle/Routing/LegacyRouter.php | 4 +- .../ActionThrottling/ActionThrottling.php | 21 +- .../Security/ActionThrottling/Log.php | 27 +- .../ActionThrottling/LogRepository.php | 10 +- .../Security/LegacyAuthenticator.php | 14 +- .../Security/LegacyHashAuthenticator.php | 4 +- .../Security/MyGithubAuthenticator.php | 5 +- sources/AppBundle/Security/TalkVoter.php | 7 +- .../Security/TestGithubAuthenticator.php | 27 +- .../AppBundle/Site/Form/NewsFiltersType.php | 17 +- sources/AppBundle/Site/Form/RubriqueType.php | 8 +- sources/AppBundle/Site/Model/Article.php | 64 ++-- .../Model/Repository/ArticleRepository.php | 18 +- .../Model/Repository/RubriqueRepository.php | 4 +- sources/AppBundle/Site/Model/Rubrique.php | 28 +- sources/AppBundle/Slack/Attachment.php | 4 +- sources/AppBundle/Slack/LegacyClient.php | 4 +- sources/AppBundle/Slack/MessageFactory.php | 40 +- sources/AppBundle/Slack/UsersChecker.php | 21 +- sources/AppBundle/Slack/UsersClient.php | 2 + .../Form/HotelReservationType.php | 20 +- .../SpeakerInfos/Form/SpeakersContactType.php | 6 +- .../SpeakerInfos/Form/SpeakersDinerType.php | 6 +- .../Form/SpeakersExpensesType.php | 6 +- .../SpeakerInfos/SpeakersExpensesStorage.php | 28 +- .../Subscriber/SitemapXmlSubscriber.php | 2 + sources/AppBundle/Subtitles/Parser.php | 12 +- .../AppBundle/TechLetter/DataExtractor.php | 41 ++- .../AppBundle/TechLetter/Form/SendingType.php | 6 +- sources/AppBundle/TechLetter/HtmlParser.php | 49 +-- .../TechLetter/MailchimpSynchronizer.php | 23 +- .../AppBundle/TechLetter/Model/Article.php | 2 + sources/AppBundle/TechLetter/Model/News.php | 13 +- .../AppBundle/TechLetter/Model/Project.php | 2 + .../Model/Repository/SendingRepository.php | 2 + .../AppBundle/TechLetter/Model/Sending.php | 26 +- .../AppBundle/TechLetter/Model/TechLetter.php | 46 +-- .../TechLetter/Model/TechLetterFactory.php | 4 +- sources/AppBundle/TechLetter/UrlCrawler.php | 2 + sources/AppBundle/Twig/AssetsExtension.php | 8 +- sources/AppBundle/Twig/OfficesExtension.php | 4 +- sources/AppBundle/Twig/TwigExtension.php | 2 + sources/AppBundle/Twig/ViewRenderer.php | 19 +- .../Validator/Constraints/UniqueEntity.php | 2 + .../Constraints/UniqueEntityValidator.php | 6 +- sources/AppBundle/VideoNotifier/Runner.php | 75 +--- .../VideoNotifier/TweetGenerator.php | 14 +- sources/PlanetePHP/DisplayableFeedArticle.php | 4 +- sources/PlanetePHP/Feed.php | 2 + sources/PlanetePHP/FeedArticle.php | 2 + sources/PlanetePHP/FeedArticleRepository.php | 33 +- sources/PlanetePHP/FeedCrawler.php | 19 +- sources/PlanetePHP/FeedRepository.php | 19 +- tests/behat/bootstrap/FeatureContext.php | 18 +- tests/units/Afup/Association/Cotisations.php | 7 +- tests/units/Afup/Utils/Utils.php | 8 +- .../MembershipFeeReferenceGenerator.php | 4 +- .../Compta/Importer/AutoQualifier.php | 15 +- .../Compta/Importer/CreditMutuel.php | 7 +- tests/units/AppBundle/Event/Model/Speaker.php | 10 +- .../units/AppBundle/Event/Model/Talk/Talk.php | 7 +- .../Meetups/MeetupDateTimeConverter.php | 13 +- .../Indexation/Meetups/MeetupScrapper.php | 18 +- .../Indexation/Meetups/Transformer.php | 9 +- .../Indexation/Talks/Transformer.php | 6 +- tests/units/AppBundle/Payment/Paybox.php | 10 +- tests/units/AppBundle/Subtitles/Parser.php | 4 +- .../VideoNotifier/TweetGenerator.php | 7 +- 572 files changed, 6421 insertions(+), 7446 deletions(-) delete mode 100644 sources/AppBundle/Controller/Event/EventBaseController.php rename sources/AppBundle/Listener/{LocaleListener.php => LocaleEventSubscriber.php} (66%) rename sources/AppBundle/Mailchimp/{EventListener.php => EventEventSubscriber.php} (57%) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 8a222c3f6..998918612 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,8 +3,11 @@ $finder = (new PhpCsFixer\Finder()) ->name('*.php') ->in([ + __DIR__ . '/app', __DIR__ . '/db', - __DIR__ . '/sources/AppBundle', + __DIR__ . '/htdocs', + __DIR__ . '/sources', + __DIR__ . '/tests', ]) ; @@ -12,6 +15,7 @@ ->setRiskyAllowed(true) ->setRules([ '@PSR2' => true, + '@PHP74Migration:risky' => true, 'blank_line_after_opening_tag' => true, 'concat_space' => ['spacing' => 'one'], 'no_alias_functions' => true, diff --git a/app/AppCache.php b/app/AppCache.php index 639ec2cd7..185a6990b 100644 --- a/app/AppCache.php +++ b/app/AppCache.php @@ -1,5 +1,7 @@ getEnvironment(), ['dev', 'test'], true)) { - $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); - $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new DebugBundle(); + $bundles[] = new WebProfilerBundle(); } return $bundles; @@ -37,16 +53,16 @@ public function getRootDir() public function getCacheDir() { - return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); + return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); } public function getLogDir() { - return dirname(__DIR__).'/var/logs'; + return dirname(__DIR__) . '/var/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); } } diff --git a/app/Resources/views/admin/association/membership/register.html.twig b/app/Resources/views/admin/association/membership/register.html.twig index 4f9703f1f..94375c81f 100644 --- a/app/Resources/views/admin/association/membership/register.html.twig +++ b/app/Resources/views/admin/association/membership/register.html.twig @@ -4,7 +4,7 @@ {% block submenu %} {{ render(controller( - 'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction', + 'AppBundle\\Controller\\Website\\SecondaryMenuController::display', { 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ASSOCIATION') } )) }} {% endblock %} diff --git a/app/Resources/views/site/base.html.twig b/app/Resources/views/site/base.html.twig index 1d7facd2e..2bdadb03c 100644 --- a/app/Resources/views/site/base.html.twig +++ b/app/Resources/views/site/base.html.twig @@ -79,7 +79,7 @@
- {{ render(controller('AppBundle:Website\\Newsletter:subscribeForm')) }} + {{ render(controller('AppBundle\\Controller\\Website\\NewsletterController:subscribeForm')) }} Tous les trois mois, des nouvelles de L'AFUP