summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.php_cs69
-rw-r--r--action.php12
-rw-r--r--addmedia.php10
-rw-r--r--admin_media.php22
-rw-r--r--admin_media_upload.php4
-rw-r--r--admin_pgv_to_wt.php16
-rw-r--r--admin_site_access.php2
-rw-r--r--admin_site_change.php6
-rw-r--r--admin_site_clean.php5
-rw-r--r--admin_site_config.php12
-rw-r--r--admin_site_logs.php8
-rw-r--r--admin_site_merge.php8
-rw-r--r--admin_site_upgrade.php4
-rw-r--r--admin_trees_config.php21
-rw-r--r--admin_trees_download.php2
-rw-r--r--admin_trees_duplicates.php13
-rw-r--r--admin_trees_manage.php4
-rw-r--r--admin_trees_merge.php2
-rw-r--r--admin_trees_places.php4
-rw-r--r--admin_trees_renumber.php4
-rw-r--r--admin_users.php18
-rw-r--r--ancestry.php1
-rw-r--r--app/Auth.php23
-rw-r--r--app/Controller/AdvancedSearchController.php58
-rw-r--r--app/Controller/AjaxController.php4
-rw-r--r--app/Controller/AncestryController.php11
-rw-r--r--app/Controller/BaseController.php14
-rw-r--r--app/Controller/BranchesController.php12
-rw-r--r--app/Controller/ChartController.php14
-rw-r--r--app/Controller/CompactController.php10
-rw-r--r--app/Controller/DescendancyController.php27
-rw-r--r--app/Controller/FamilyBookController.php26
-rw-r--r--app/Controller/FamilyController.php4
-rw-r--r--app/Controller/FanchartController.php31
-rw-r--r--app/Controller/HourglassController.php52
-rw-r--r--app/Controller/IndividualController.php15
-rw-r--r--app/Controller/LifespanController.php40
-rw-r--r--app/Controller/MediaController.php2
-rw-r--r--app/Controller/PageController.php10
-rw-r--r--app/Controller/PedigreeController.php37
-rw-r--r--app/Controller/RelationshipController.php6
-rw-r--r--app/Controller/RepositoryController.php2
-rw-r--r--app/Controller/SearchController.php19
-rw-r--r--app/Controller/SimpleController.php4
-rw-r--r--app/Controller/SourceController.php2
-rw-r--r--app/Controller/TimelineController.php8
-rw-r--r--app/Database.php34
-rw-r--r--app/Date.php39
-rw-r--r--app/Date/CalendarDate.php76
-rw-r--r--app/Date/JulianDate.php2
-rw-r--r--app/Fact.php20
-rw-r--r--app/Family.php12
-rw-r--r--app/File.php10
-rw-r--r--app/Filter.php39
-rw-r--r--app/FlashMessages.php2
-rw-r--r--app/Gedcom/GedcomCodeRela.php1
-rw-r--r--app/Gedcom/GedcomCodeTemp.php2
-rw-r--r--app/Gedcom/GedcomTag.php2
-rw-r--r--app/GedcomRecord.php131
-rw-r--r--app/HitCounter.php4
-rw-r--r--app/I18N.php63
-rw-r--r--app/Individual.php67
-rw-r--r--app/Log.php3
-rw-r--r--app/Mail.php12
-rw-r--r--app/Media.php42
-rw-r--r--app/Menu.php4
-rw-r--r--app/Module.php10
-rw-r--r--app/Module/AbstractModule.php12
-rw-r--r--app/Module/AhnentafelReportModule.php2
-rw-r--r--app/Module/AlbumModule.php3
-rw-r--r--app/Module/BatchUpdate/BatchUpdateBasePlugin.php23
-rw-r--r--app/Module/BatchUpdate/BatchUpdateDuplicateLinksPlugin.php4
-rw-r--r--app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php11
-rw-r--r--app/Module/BatchUpdate/BatchUpdateMissingDeathPlugin.php2
-rw-r--r--app/Module/BatchUpdate/BatchUpdateNameFormatPlugin.php2
-rw-r--r--app/Module/BatchUpdate/BatchUpdateSearchReplacePlugin.php2
-rw-r--r--app/Module/BatchUpdate/BirthDeathMarriageReportModule.php2
-rw-r--r--app/Module/BatchUpdateModule.php23
-rw-r--r--app/Module/BirthReportModule.php2
-rw-r--r--app/Module/CemeteryReportModule.php2
-rw-r--r--app/Module/CensusAssistantModule.php20
-rw-r--r--app/Module/ChangeReportModule.php2
-rw-r--r--app/Module/ChartsBlockModule.php7
-rw-r--r--app/Module/CkeditorModule.php2
-rw-r--r--app/Module/ClippingsCart/ClippingsCart.php30
-rw-r--r--app/Module/ClippingsCartModule.php25
-rw-r--r--app/Module/DeathReportModule.php2
-rw-r--r--app/Module/DescendancyModule.php12
-rw-r--r--app/Module/DescendancyReportModule.php2
-rw-r--r--app/Module/ExtraInformationModule.php2
-rw-r--r--app/Module/FactSourcesReportModule.php2
-rw-r--r--app/Module/FamiliesSidebarModule.php16
-rw-r--r--app/Module/FamilyGroupReportModule.php2
-rw-r--r--app/Module/FamilyNavigatorModule.php9
-rw-r--r--app/Module/FamilyTreeFavoritesModule.php13
-rw-r--r--app/Module/FamilyTreeStatisticsModule.php4
-rw-r--r--app/Module/FrequentlyAskedQuestionsModule.php4
-rw-r--r--app/Module/GoogleMapsModule.php389
-rw-r--r--app/Module/HtmlBlockModule.php58
-rw-r--r--app/Module/IndividualFactsTabModule.php5
-rw-r--r--app/Module/IndividualFamiliesReportModule.php2
-rw-r--r--app/Module/IndividualReportModule.php2
-rw-r--r--app/Module/IndividualSidebarModule.php6
-rw-r--r--app/Module/InteractiveTree/TreeView.php41
-rw-r--r--app/Module/InteractiveTreeModule.php15
-rw-r--r--app/Module/LoginBlockModule.php20
-rw-r--r--app/Module/MarriageReportModule.php2
-rw-r--r--app/Module/MissingFactsReportModule.php2
-rw-r--r--app/Module/ModuleBlockInterface.php12
-rw-r--r--app/Module/ModuleMenuInterface.php2
-rw-r--r--app/Module/ModuleSidebarInterface.php5
-rw-r--r--app/Module/ModuleTabInterface.php9
-rw-r--r--app/Module/OccupationReportModule.php2
-rw-r--r--app/Module/OnThisDayModule.php7
-rw-r--r--app/Module/PageMenuModule.php1
-rw-r--r--app/Module/PedigreeReportModule.php2
-rw-r--r--app/Module/RecentChangesModule.php6
-rw-r--r--app/Module/RelatedIndividualsReportModule.php2
-rw-r--r--app/Module/RelativesTabModule.php4
-rw-r--r--app/Module/ResearchTaskModule.php5
-rw-r--r--app/Module/ReviewChangesModule.php3
-rw-r--r--app/Module/SiteMapModule.php8
-rw-r--r--app/Module/SlideShowModule.php66
-rw-r--r--app/Module/StoriesModule.php8
-rw-r--r--app/Module/ThemeSelectModule.php4
-rw-r--r--app/Module/TopGivenNamesModule.php7
-rw-r--r--app/Module/TopPageViewsModule.php6
-rw-r--r--app/Module/TopSurnamesModule.php3
-rw-r--r--app/Module/UpcomingAnniversariesModule.php7
-rw-r--r--app/Module/UserFavoritesModule.php2
-rw-r--r--app/Module/UserJournalModule.php1
-rw-r--r--app/Module/UserMessagesModule.php1
-rw-r--r--app/Module/UserWelcomeModule.php6
-rw-r--r--app/Module/WelcomeBlockModule.php8
-rw-r--r--app/Module/YahrzeitModule.php19
-rw-r--r--app/Note.php6
-rw-r--r--app/Place.php14
-rw-r--r--app/Query/QueryMedia.php8
-rw-r--r--app/Query/QueryName.php104
-rw-r--r--app/Report/ReportBase.php303
-rw-r--r--app/Report/ReportBaseCell.php60
-rw-r--r--app/Report/ReportBaseElement.php12
-rw-r--r--app/Report/ReportBaseFootnote.php8
-rw-r--r--app/Report/ReportBaseHtml.php4
-rw-r--r--app/Report/ReportBaseImage.php12
-rw-r--r--app/Report/ReportBasePageheader.php4
-rw-r--r--app/Report/ReportBaseText.php10
-rw-r--r--app/Report/ReportBaseTextbox.php60
-rw-r--r--app/Report/ReportHtml.php80
-rw-r--r--app/Report/ReportHtmlCell.php4
-rw-r--r--app/Report/ReportHtmlFootnote.php27
-rw-r--r--app/Report/ReportHtmlHtml.php6
-rw-r--r--app/Report/ReportHtmlImage.php8
-rw-r--r--app/Report/ReportHtmlLine.php2
-rw-r--r--app/Report/ReportHtmlPageheader.php2
-rw-r--r--app/Report/ReportHtmlText.php23
-rw-r--r--app/Report/ReportHtmlTextbox.php16
-rw-r--r--app/Report/ReportPdf.php82
-rw-r--r--app/Report/ReportPdfCell.php6
-rw-r--r--app/Report/ReportPdfFootnote.php14
-rw-r--r--app/Report/ReportPdfHtml.php6
-rw-r--r--app/Report/ReportPdfImage.php10
-rw-r--r--app/Report/ReportPdfLine.php2
-rw-r--r--app/Report/ReportPdfPageheader.php2
-rw-r--r--app/Report/ReportPdfText.php12
-rw-r--r--app/Report/ReportPdfTextbox.php16
-rw-r--r--app/Report/ReportTcpdf.php33
-rw-r--r--app/Repository.php2
-rw-r--r--app/Session.php14
-rw-r--r--app/Site.php4
-rw-r--r--app/Soundex.php960
-rw-r--r--app/Source.php2
-rw-r--r--app/Statement.php15
-rw-r--r--app/Stats.php452
-rw-r--r--app/Theme.php3
-rw-r--r--app/Theme/AdministrationTheme.php2
-rw-r--r--app/Theme/BaseTheme.php23
-rw-r--r--app/Theme/ColorsTheme.php32
-rw-r--r--app/Tree.php36
-rw-r--r--app/User.php11
-rw-r--r--autocomplete.php32
-rw-r--r--block_edit.php2
-rw-r--r--calendar.php10
-rw-r--r--edit_changes.php4
-rw-r--r--edit_interface.php98
-rw-r--r--family.php2
-rw-r--r--famlist.php4
-rw-r--r--fanchart.php2
-rw-r--r--find.php30
-rw-r--r--gedrecord.php2
-rw-r--r--help_text.php165
-rw-r--r--import.php2
-rw-r--r--includes/config_data.php52
-rw-r--r--includes/db_schema/db_schema_22_23.php2
-rw-r--r--includes/db_schema/db_schema_29_30.php1
-rw-r--r--includes/db_schema/db_schema_5_6.php2
-rw-r--r--includes/db_schema/db_schema_9_10.php1
-rw-r--r--includes/functions/functions.php94
-rw-r--r--includes/functions/functions_charts.php71
-rw-r--r--includes/functions/functions_date.php8
-rw-r--r--includes/functions/functions_db.php70
-rw-r--r--includes/functions/functions_edit.php190
-rw-r--r--includes/functions/functions_export.php4
-rw-r--r--includes/functions/functions_import.php99
-rw-r--r--includes/functions/functions_mediadb.php7
-rw-r--r--includes/functions/functions_print.php80
-rw-r--r--includes/functions/functions_print_facts.php57
-rw-r--r--includes/functions/functions_print_lists.php96
-rw-r--r--includes/functions/functions_rtl.php12
-rw-r--r--includes/php_53_compatibility.php15
-rw-r--r--includes/reportheader.php37
-rw-r--r--includes/session.php3
-rw-r--r--index_edit.php9
-rw-r--r--indilist.php4
-rw-r--r--individual.php6
-rw-r--r--login.php8
-rw-r--r--mediafirewall.php18
-rw-r--r--mediaviewer.php4
-rw-r--r--message.php2
-rw-r--r--modules_v3/GEDFact_assistant/CENS_ctrl.php2
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php2
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php6
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_3_find.php34
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php114
-rw-r--r--note.php2
-rw-r--r--pedigree.php1
-rw-r--r--placelist.php10
-rw-r--r--relationship.php8
-rw-r--r--repo.php4
-rw-r--r--reportengine.php128
-rw-r--r--search_advanced.php6
-rw-r--r--setup.php21
-rw-r--r--site-offline.php2
-rw-r--r--site-unavailable.php2
-rw-r--r--source.php3
-rw-r--r--statisticsplot.php99
-rw-r--r--tests/app/AuthTest.php4
-rw-r--r--tests/app/Controller/AdvancedSearchControllerTest.php4
-rw-r--r--tests/app/Controller/AjaxControllerTest.php4
-rw-r--r--tests/app/Controller/AncestryControllerTest.php4
-rw-r--r--tests/app/Controller/BaseControllerTest.php4
-rw-r--r--tests/app/Controller/BranchesControllerTest.php4
-rw-r--r--tests/app/Controller/ChartControllerTest.php4
-rw-r--r--tests/app/Controller/CompactControllerTest.php4
-rw-r--r--tests/app/Controller/DescendancyControllerTest.php4
-rw-r--r--tests/app/Controller/FamilyControllerTest.php4
-rw-r--r--tests/app/Controller/FamilybookControllerTest.php4
-rw-r--r--tests/app/Controller/FanchartControllerTest.php4
-rw-r--r--tests/app/Controller/GedcomRecordControllerTest.php4
-rw-r--r--tests/app/Controller/HourglassControllerTest.php4
-rw-r--r--tests/app/Controller/IndividualControllerTest.php4
-rw-r--r--tests/app/Controller/LifespanControllerTest.php4
-rw-r--r--tests/app/Controller/MediaControllerTest.php4
-rw-r--r--tests/app/Controller/NoteControllerTest.php4
-rw-r--r--tests/app/Controller/PageControllerTest.php4
-rw-r--r--tests/app/Controller/PedigreeControllerTest.php4
-rw-r--r--tests/app/Controller/RepositoryControllerTest.php4
-rw-r--r--tests/app/Controller/SearchControllerTest.php4
-rw-r--r--tests/app/Controller/SimpleControllerTest.php4
-rw-r--r--tests/app/Controller/SourceControllerTest.php4
-rw-r--r--tests/app/Controller/TimelineControllerTest.php4
-rw-r--r--tests/app/DatabaseTest.php4
-rw-r--r--tests/app/Date/CalendarDateTest.php4
-rw-r--r--tests/app/Date/FrenchDateTest.php4
-rw-r--r--tests/app/Date/GregorianDateTest.php4
-rw-r--r--tests/app/Date/HijriDateTest.php4
-rw-r--r--tests/app/Date/JalaliDateTest.php4
-rw-r--r--tests/app/Date/JewishDateTest.php4
-rw-r--r--tests/app/Date/JulianDateTest.php4
-rw-r--r--tests/app/Date/RomanDateTest.php4
-rw-r--r--tests/app/DateTest.php4
-rw-r--r--tests/app/FactTest.php4
-rw-r--r--tests/app/FamilyTest.php4
-rw-r--r--tests/app/FileTest.php4
-rw-r--r--tests/app/FilterTest.php4
-rw-r--r--tests/app/FlashMessagesTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeAdopTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeNameTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodePediTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeQuayTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeRelaTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeStatTest.php4
-rw-r--r--tests/app/Gedcom/GedcomCodeTempTest.php4
-rw-r--r--tests/app/Gedcom/GedcomTagTest.php4
-rw-r--r--tests/app/GedcomRecordTest.php6
-rw-r--r--tests/app/I18NTest.php14
-rw-r--r--tests/app/IndividualTest.php4
-rw-r--r--tests/app/LogTest.php4
-rw-r--r--tests/app/MailTest.php4
-rw-r--r--tests/app/MediaTest.php4
-rw-r--r--tests/app/MenuTest.php36
-rw-r--r--tests/app/Module/AhnentafelReportModuleTest.php4
-rw-r--r--tests/app/Module/AlbumModuleTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateBasePluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateMarriedNamesPluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateMissingDeathPluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateNameFormatPluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BatchUpdateSearchReplacePluginTest.php4
-rw-r--r--tests/app/Module/BatchUpdate/BirthDeathMarriageReportModuleTest.php4
-rw-r--r--tests/app/Module/BatchUpdateModuleTest.php4
-rw-r--r--tests/app/Module/BirthReportModuleTest.php4
-rw-r--r--tests/app/Module/CemeteryReportModuleTest.php4
-rw-r--r--tests/app/Module/CensusAssistantModuleTest.php4
-rw-r--r--tests/app/Module/ChangeReportModuleTest.php4
-rw-r--r--tests/app/Module/ChartsBlockModuleTest.php4
-rw-r--r--tests/app/Module/CkeditorModuleTest.php4
-rw-r--r--tests/app/Module/ClippingsCart/ClippingsCartTest.php4
-rw-r--r--tests/app/Module/ClippingsCartModuleTest.php4
-rw-r--r--tests/app/Module/DeathReportModuleTest.php4
-rw-r--r--tests/app/Module/DescendancyModuleTest.php4
-rw-r--r--tests/app/Module/DescendancyReportModuleTest.php4
-rw-r--r--tests/app/Module/ExtraInformationModuleTest.php4
-rw-r--r--tests/app/Module/FactSourcesReportModuleTest.php4
-rw-r--r--tests/app/Module/FamiliesSidebarModuleTest.php4
-rw-r--r--tests/app/Module/FamilyGroupReportModuleTest.php4
-rw-r--r--tests/app/Module/FamilyNavigatorModuleTest.php4
-rw-r--r--tests/app/Module/FamilyTreeFavoritesModuleTest.php4
-rw-r--r--tests/app/Module/FamilyTreeNewsModuleTest.php4
-rw-r--r--tests/app/Module/FamilyTreeStatisticsModuleTest.php4
-rw-r--r--tests/app/Module/FrequentlyAskedQuestionsModuleTest.php4
-rw-r--r--tests/app/Module/GoogleMapsModuleTest.php4
-rw-r--r--tests/app/Module/HtmlBlockModuleTest.php4
-rw-r--r--tests/app/Module/IndividualFactsTabModuleTest.php4
-rw-r--r--tests/app/Module/IndividualFamiliesReportModuleTest.php4
-rw-r--r--tests/app/Module/IndividualReportModuleTest.php4
-rw-r--r--tests/app/Module/IndividualSidebarModuleTest.php4
-rw-r--r--tests/app/Module/InteractiveTree/TreeViewTest.php4
-rw-r--r--tests/app/Module/InteractiveTreeModuleTest.php4
-rw-r--r--tests/app/Module/LoggedInUsersModuleTest.php4
-rw-r--r--tests/app/Module/MarriageReportModuleTest.php4
-rw-r--r--tests/app/Module/MediaTabModuleTest.php4
-rw-r--r--tests/app/Module/MissingFactsReportModuleTest.php4
-rw-r--r--tests/app/Module/ModuleBlockInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleChartInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleConfigInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleMenuInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleReportInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleSidebarInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleTabInterfaceTest.php4
-rw-r--r--tests/app/Module/ModuleThemeInterfaceTest.php4
-rw-r--r--tests/app/Module/NotesTabModuleTest.php4
-rw-r--r--tests/app/Module/OccupationReportModuleTest.php4
-rw-r--r--tests/app/Module/OnThisDayModuleTest.php4
-rw-r--r--tests/app/Module/PageMenuModuleTest.php4
-rw-r--r--tests/app/Module/PedigreeReportModuleTest.php4
-rw-r--r--tests/app/Module/RecentChangesModuleTest.php4
-rw-r--r--tests/app/Module/RelatedIndividualsReportModuleTest.php4
-rw-r--r--tests/app/Module/RelativesTabModuleTest.php4
-rw-r--r--tests/app/Module/ResearchTaskModuleTest.php4
-rw-r--r--tests/app/Module/ReviewChangesModuleTest.php4
-rw-r--r--tests/app/Module/SiteMapModuleTest.php4
-rw-r--r--tests/app/Module/SlideShowModuleTest.php4
-rw-r--r--tests/app/Module/SourcesTabModuleTest.php4
-rw-r--r--tests/app/Module/StoriesModuleTest.php4
-rw-r--r--tests/app/Module/ThemeSelectModuleTest.php4
-rw-r--r--tests/app/Module/TopGivenNamesModuleTest.php4
-rw-r--r--tests/app/Module/TopPageViewsModuleTest.php4
-rw-r--r--tests/app/Module/TopSurnamesModuleTest.php4
-rw-r--r--tests/app/Module/UpcomingAnniversariesModuleTest.php4
-rw-r--r--tests/app/Module/UserFavoritesModuleTest.php4
-rw-r--r--tests/app/Module/UserJournalModuleTest.php4
-rw-r--r--tests/app/Module/UserMessagesModuleTest.php4
-rw-r--r--tests/app/Module/UserWelcomeModuleTest.php4
-rw-r--r--tests/app/Module/WelcomeBlockModuleTest.php4
-rw-r--r--tests/app/Module/YahrzeitModuleTest.php4
-rw-r--r--tests/app/ModuleTest.php4
-rw-r--r--tests/app/NoteTest.php4
-rw-r--r--tests/app/PlaceTest.php4
-rw-r--r--tests/app/Query/QueryMediaTest.php4
-rw-r--r--tests/app/Query/QueryNameTest.php4
-rw-r--r--tests/app/Report/ReportBaseTest.php4
-rw-r--r--tests/app/Report/ReportHTMLTest.php4
-rw-r--r--tests/app/Report/ReportPDFTest.php4
-rw-r--r--tests/app/RepositoryTest.php4
-rw-r--r--tests/app/SiteTest.php4
-rw-r--r--tests/app/SoundexTest.php4
-rw-r--r--tests/app/SourceTest.php4
-rw-r--r--tests/app/StatementTest.php4
-rw-r--r--tests/app/StatsTest.php4
-rw-r--r--tests/app/TreeTest.php4
-rw-r--r--tests/app/UserTest.php4
-rw-r--r--tests/includes/functions/FunctionsChartsTest.php16
-rw-r--r--tests/includes/functions/FunctionsDateTest.php8
-rw-r--r--tests/includes/functions/FunctionsDbTest.php48
-rw-r--r--tests/includes/functions/FunctionsEditTest.php75
-rw-r--r--tests/includes/functions/FunctionsExportTest.php10
-rw-r--r--tests/includes/functions/FunctionsImportTest.php20
-rw-r--r--tests/includes/functions/FunctionsMediaDbTest.php6
-rw-r--r--tests/includes/functions/FunctionsPrintFactsTest.php20
-rw-r--r--tests/includes/functions/FunctionsPrintListsTest.php32
-rw-r--r--tests/includes/functions/FunctionsPrintTest.php53
-rw-r--r--tests/includes/functions/FunctionsRtlTest.php18
-rw-r--r--tests/includes/functions/FunctionsTest.php36
-rw-r--r--tests/modules_v3/batch_update/plugins/DeathYBuPluginTest.php4
-rw-r--r--tests/modules_v3/batch_update/plugins/DuplicateLinksBuPluginTest.php4
-rw-r--r--tests/modules_v3/batch_update/plugins/MarriedNamesBuPluginTest.php4
-rw-r--r--tests/modules_v3/batch_update/plugins/NameFormatBuPluginTest.php4
-rw-r--r--tests/modules_v3/batch_update/plugins/SearchReplaceBuPluginTest.php4
-rw-r--r--timeline.php10
400 files changed, 3313 insertions, 4193 deletions
diff --git a/.php_cs b/.php_cs
index e5d2c94308..6f2d664e26 100644
--- a/.php_cs
+++ b/.php_cs
@@ -15,7 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// This is a configuration file for php-cs-fixer
+// https://github.com/FriendsOfPHP/PHP-CS-Fixer
+
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__)
->exclude('packages')
@@ -27,5 +28,67 @@ return Symfony\CS\Config\Config::create()
// Exclude these PSR2 rules
'--indentation',
'--braces',
- ])
- ->finder($finder);
+ // symfony rules
+ '--blankline_after_open_tag',
+ '--concat_without_spaces',
+ '--double_arrow_multiline_whitespaces',
+ 'duplicate_semicolons',
+ '--empty_return',
+ 'extra_empty_lines',
+ '--include', // WHAT IS THIS?
+ 'join_function',
+ 'list_commas',
+ 'multiline_array_trailing_comma',
+ 'namespace_no_leading_whitespace',
+ '--new_with_braces',
+ 'no_blank_lines_after_class_opening',
+ '--object_operator', // WE WANT THIS?
+ 'operators_spaces',
+ 'phpdoc_indent',
+ 'phpdoc_no_access',
+ 'phpdoc_no_empty_return',
+ 'phpdoc_no_package',
+ 'phpdoc_params',
+ 'phpdoc_scalar',
+ 'phpdoc_separation',
+ '--phpdoc_short_description',
+ 'phpdoc_trim',
+ 'phpdoc_type_to_var',
+ 'phpdoc_var_without_name',
+ '--pre_increment',
+ 'remove_leading_slash_use',
+ 'remove_lines_between_uses',
+ 'return',
+ '--self_accessor', // WE WANT THIS?
+ 'single_array_no_trailing_comma',
+ '--single_blank_line_before_namespace',
+ '--single_quote', // WE WANT THIS?
+ 'spaces_before_semicolon',
+ 'spaces_cast',
+ 'standardize_not_equal',
+ 'ternary_spaces',
+ 'trim_array_spaces',
+ '--unalign_double_arrow',
+ '--unalign_equals',
+ 'unary_operators_spaces',
+ 'unused_use',
+ 'whitespacy_lines',
+ // contrib rules
+ 'align_double_arrow',
+ 'align_equals',
+ 'concat_with_spaces',
+ 'ereg_to_preg',
+ '--header_comment',
+ 'long_array_syntax',
+ 'multiline_spaces_before_semicolon',
+ '--newline_after_open_tag',
+ 'no_blank_lines_before_namespace',
+ 'ordered_use',
+ 'php4_constructor',
+ 'phpdoc_order',
+ '--phpdoc_var_to_type',
+ '--short_array_syntax',
+ '--short_echo_tag',
+ '--strict',
+ '--strict_param',
+ ])->finder($finder);
diff --git a/action.php b/action.php
index b3aab03175..94a096dbbd 100644
--- a/action.php
+++ b/action.php
@@ -71,9 +71,9 @@ case 'copy-fact':
$clipboard = array();
}
$clipboard[$fact_id] = array(
- 'type' =>$type,
- 'factrec'=>$fact->getGedcom(),
- 'fact' =>$fact->getTag()
+ 'type' => $type,
+ 'factrec' => $fact->getGedcom(),
+ 'fact' => $fact->getTag(),
);
// The clipboard only holds 10 facts
while (count($clipboard) > 10) {
@@ -127,7 +127,7 @@ case 'delete-source':
if ($record && Auth::isEditor($record->getTree()) && $record->canShow() && $record->canEdit()) {
// Delete links to this record
foreach (fetch_all_links($record->getXref(), $record->getTree()->getTreeId()) as $xref) {
- $linker = GedcomRecord::getInstance($xref, $WT_TREE);
+ $linker = GedcomRecord::getInstance($xref, $WT_TREE);
$old_gedcom = $linker->getGedcom();
$new_gedcom = remove_links($old_gedcom, $record->getXref());
// fetch_all_links() does not take account of pending changes. The links (or even the
@@ -141,7 +141,7 @@ case 'delete-source':
$family->deleteRecord();
// Delete any remaining link to this family
if ($match) {
- $relict = GedcomRecord::getInstance($match[2][0], $WT_TREE);
+ $relict = GedcomRecord::getInstance($match[2][0], $WT_TREE);
$new_gedcom = $relict->getGedcom();
$new_gedcom = remove_links($new_gedcom, $linker->getXref());
$relict->updateRecord($new_gedcom, false);
@@ -188,7 +188,7 @@ case 'unlink-media':
$target = Filter::post('target', WT_REGEX_XREF);
if ($source && $source->canShow() && $source->canEdit() && $target) {
// Consider the individual and their spouse-family records
- $sources = $source->getSpouseFamilies();
+ $sources = $source->getSpouseFamilies();
$sources[] = $source;
foreach ($sources as $source) {
foreach ($source->getFacts() as $fact) {
diff --git a/addmedia.php b/addmedia.php
index 315e9e9800..d7e420d94e 100644
--- a/addmedia.php
+++ b/addmedia.php
@@ -47,7 +47,7 @@ $controller
->addInlineJavascript('autocomplete();')
->restrictAccess(Auth::isMember($WT_TREE));
-$disp = true;
+$disp = true;
$media = Media::getInstance($pid, $WT_TREE);
if ($media) {
$disp = $media->canShow();
@@ -320,7 +320,7 @@ case 'update': // Save the information from the “editmedia” action
$oldServerFile = $media->getServerFilename('main');
$oldServerThumb = $media->getServerFilename('thumb');
- $newmedia = new Media("xxx", "0 @xxx@ OBJE\n1 FILE " . $newFilename, null, $WT_TREE);
+ $newmedia = new Media("xxx", "0 @xxx@ OBJE\n1 FILE " . $newFilename, null, $WT_TREE);
$newServerFile = $newmedia->getServerFilename('main');
$newServerThumb = $newmedia->getServerFilename('thumb');
@@ -366,9 +366,9 @@ case 'update': // Save the information from the “editmedia” action
// Insert the 1 FILE xxx record into the arrays used by function handle_updates()
$glevels = array_merge(array('1'), $glevels);
- $tag = array_merge(array('FILE'), $tag);
- $islink = array_merge(array(0), $islink);
- $text = array_merge(array($newFilename), $text);
+ $tag = array_merge(array('FILE'), $tag);
+ $islink = array_merge(array(0), $islink);
+ $text = array_merge(array($newFilename), $text);
$record = GedcomRecord::getInstance($pid, $WT_TREE);
$newrec = "0 @$pid@ OBJE\n";
diff --git a/admin_media.php b/admin_media.php
index 129175eaf7..4e5be875a4 100644
--- a/admin_media.php
+++ b/admin_media.php
@@ -50,7 +50,7 @@ if ($delete_file) {
$controller = new AjaxController;
// Only delete valid (i.e. unused) media files
$media_folder = Filter::post('media_folder', null, ''); // MySQL needs an empty string, not NULL
- $disk_files = all_disk_files($media_folder, '', 'include', '');
+ $disk_files = all_disk_files($media_folder, '', 'include', '');
if (in_array($delete_file, $disk_files)) {
$tmp = WT_DATA_DIR . $media_folder . $delete_file;
try {
@@ -107,7 +107,7 @@ case 'load_json':
'media_folder' => $media_folder,
'media_path_2' => Filter::escapeLike($media_path),
'search_1' => Filter::escapeLike($search),
- 'search_2' => Filter::escapeLike($search)
+ 'search_2' => Filter::escapeLike($search),
);
// Unfiltered rows
$SELECT2 =
@@ -120,7 +120,7 @@ case 'load_json':
" AND m_filename NOT LIKE 'https://%'";
$ARGS2 = array(
'media_folder' => $media_folder,
- 'media_path_3' => $media_path
+ 'media_path_3' => $media_path,
);
if ($subfolders == 'exclude') {
@@ -166,7 +166,7 @@ case 'load_json':
$data = array();
foreach ($rows as $row) {
- $media = Media::getInstance($row->xref, Tree::findById($row->gedcom_id), $row->gedcom);
+ $media = Media::getInstance($row->xref, Tree::findById($row->gedcom_id), $row->gedcom);
$data[] = array(
mediaFileInfo($media_folder, $media_path, $row->media_path),
$media->displayImage(),
@@ -184,7 +184,7 @@ case 'load_json':
" AND (m_filename LIKE CONCAT('%', :search_1, '%') OR m_titl LIKE CONCAT('%', :search_2, '%'))";
$ARGS1 = array(
'search_1' => Filter::escapeLike($search),
- 'search_2' => Filter::escapeLike($search)
+ 'search_2' => Filter::escapeLike($search),
);
// Unfiltered rows
$SELECT2 =
@@ -230,7 +230,7 @@ case 'load_json':
$data = array();
foreach ($rows as $row) {
- $media = Media::getInstance($row->xref, Tree::findById($row->gedcom_id), $row->gedcom);
+ $media = Media::getInstance($row->xref, Tree::findById($row->gedcom_id), $row->gedcom);
$data[] = array(
GedcomTag::getLabelValue('URL', $row->m_filename),
$media->displayImage(),
@@ -247,7 +247,7 @@ case 'load_json':
" JOIN `##gedcom_setting` USING (gedcom_id)" .
" WHERE setting_name='MEDIA_DIRECTORY' AND setting_value = :media_folder"
)->execute(array(
- 'media_folder' => $media_folder
+ 'media_folder' => $media_folder,
))->fetchAssoc();
$disk_files = all_disk_files($media_folder, $media_path, $subfolders, $search);
@@ -329,7 +329,7 @@ case 'load_json':
'draw' => Filter::getInteger('draw'), // String, but always an integer
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsFiltered,
- 'data' => $data
+ 'data' => $data,
));
return;
@@ -383,7 +383,7 @@ function media_paths($media_folder) {
* Search a folder (and optional subfolders) for filenames that match a search pattern.
*
* @param string $dir
- * @param boolean $recursive
+ * @param bool $recursive
* @param string $filter
*
* @return string[]
@@ -406,6 +406,7 @@ function scan_dirs($dir, $recursive, $filter) {
}
}
}
+
return $files;
}
@@ -499,6 +500,7 @@ function mediaFileInfo($media_folder, $media_path, $file) {
$html .= '</dl>';
$html .= '<div class="alert alert-danger">' . I18N::translate('This media file does not exist.') . '</div>';
}
+
return $html;
}
@@ -584,7 +586,7 @@ $controller
jQuery("#media-table-' . $table_id . '").dataTable({
processing: true,
serverSide: true,
- ajax: "'.WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&files=' . $files . '&media_folder=' . $media_folder . '&media_path=' . $media_path . '&subfolders=' . $subfolders . '",
+ ajax: "' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&files=' . $files . '&media_folder=' . $media_folder . '&media_path=' . $media_path . '&subfolders=' . $subfolders . '",
' . I18N::datatablesI18N(array(5, 10, 20, 50, 100, 500, 1000, -1)) . ',
autoWidth:false,
pageLength: 10,
diff --git a/admin_media_upload.php b/admin_media_upload.php
index 95c8860c1f..374bf956d2 100644
--- a/admin_media_upload.php
+++ b/admin_media_upload.php
@@ -149,8 +149,8 @@ if ($action == "upload") {
// Now copy the (optional thumbnail)
if (!empty($_FILES['thumbnail' . $i]['name']) && preg_match('/^image\/(png|gif|jpeg)/', $_FILES['thumbnail' . $i]['type'], $match)) {
- $extension = $match[1];
- $thumbFile = preg_replace('/\.[a-z0-9]{3,5}$/', '.' . $extension, $fileName);
+ $extension = $match[1];
+ $thumbFile = preg_replace('/\.[a-z0-9]{3,5}$/', '.' . $extension, $fileName);
$serverFileName = WT_DATA_DIR . $MEDIA_DIRECTORY . 'thumbs/' . $folderName . $thumbFile;
if (move_uploaded_file($_FILES['thumbnail' . $i]['tmp_name'], $serverFileName)) {
FlashMessages::addMessage(I18N::translate('The file %s has been uploaded.', Html::filename($serverFileName)));
diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php
index a1c9e276c1..ad51a6e77d 100644
--- a/admin_pgv_to_wt.php
+++ b/admin_pgv_to_wt.php
@@ -76,7 +76,7 @@ if ($PGV_PATH) {
array(
'/^\s*(include|require).*/m',
'/.*<\?php.*/',
- '/.*\?>.*/'
+ '/.*\?>.*/',
), '', $config_php
);
eval($config_php);
@@ -607,9 +607,9 @@ define('PGV_PRIV_USER', Auth::PRIV_USER);
define('PGV_PRIV_NONE', Auth::PRIV_NONE);
define('PGV_PRIV_HIDE', Auth::PRIV_HIDE);
$PRIV_PUBLIC = Auth::PRIV_PRIVATE;
-$PRIV_USER = Auth::PRIV_USER;
-$PRIV_NONE = Auth::PRIV_NONE;
-$PRIV_HIDE = Auth::PRIV_HIDE;
+$PRIV_USER = Auth::PRIV_USER;
+$PRIV_NONE = Auth::PRIV_NONE;
+$PRIV_HIDE = Auth::PRIV_HIDE;
// Old versions of PhpGedView used a $GEDCOMS[] array.
// New versions used a database.
@@ -725,10 +725,9 @@ foreach ($GEDCOMS as $GEDCOM => $GED_DATA) {
echo '<p>Error - could not read configuration file ', $config, '</p>';
}
- $stmt_default_resn = Database::prepare("INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn) VALUES (?, ?, ?, CASE ? WHEN -1 THEN 'hidden' WHEN 0 THEN 'confidential' WHEN 1 THEN 'privacy' ELSE 'none' END)");
+ $stmt_default_resn = Database::prepare("INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn) VALUES (?, ?, ?, CASE ? WHEN -1 THEN 'hidden' WHEN 0 THEN 'confidential' WHEN 1 THEN 'privacy' ELSE 'none' END)");
$stmt_gedcom_setting = Database::prepare("INSERT INTO `##gedcom_setting` (gedcom_id, setting_name, setting_value) VALUES (?,?,?)");
-
$privacy = str_replace(array('$INDEX_DIRECTORY', '${INDEX_DIRECTORY}'), $INDEX_DIRECTORY, $GED_DATA['privacy']);
if (substr($config, 0, 1) == '.') {
$privacy = $PGV_PATH . '/' . $privacy;
@@ -736,8 +735,8 @@ foreach ($GEDCOMS as $GEDCOM => $GED_DATA) {
if (is_readable($privacy)) {
// initialise this, in case it is missing from the file
$person_privacy = array();
- $person_facts = array();
- $global_facts = array();
+ $person_facts = array();
+ $global_facts = array();
echo '<p>Reading privacy file ', $privacy, '</p>';
require $privacy;
@@ -762,7 +761,6 @@ foreach ($GEDCOMS as $GEDCOM => $GED_DATA) {
}
}
-
} else {
echo '<p>Could not read privacy file ', $privacy, '</p>';
}
diff --git a/admin_site_access.php b/admin_site_access.php
index 74bc863636..8f8d8b1faa 100644
--- a/admin_site_access.php
+++ b/admin_site_access.php
@@ -205,7 +205,7 @@ case 'load':
'draw' => Filter::getInteger('draw'),
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsFiltered,
- 'data' => $data
+ 'data' => $data,
));
break;
diff --git a/admin_site_change.php b/admin_site_change.php
index 8f9d32a6d4..69deca644a 100644
--- a/admin_site_change.php
+++ b/admin_site_change.php
@@ -164,7 +164,7 @@ case 'load_json':
if ($length) {
Auth::user()->setPreference('admin_site_change_page_size', $length);
- $limit = " LIMIT :limit OFFSET :offset";
+ $limit = " LIMIT :limit OFFSET :offset";
$args['limit'] = $length;
$args['offset'] = $start;
} else {
@@ -192,7 +192,7 @@ case 'load_json':
'draw' => Filter::getInteger('draw'),
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsFiltered,
- 'data' => $data
+ 'data' => $data,
));
return;
@@ -208,7 +208,7 @@ $controller
jQuery(".table-site-changes").dataTable( {
processing: true,
serverSide: true,
- ajax: "'.WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&from=' . $from . '&to=' . $to . '&type=' . $type . '&oldged=' . rawurlencode($oldged) . '&newged=' . rawurlencode($newged) . '&xref=' . rawurlencode($xref) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc) . '",
+ ajax: "' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&from=' . $from . '&to=' . $to . '&type=' . $type . '&oldged=' . rawurlencode($oldged) . '&newged=' . rawurlencode($newged) . '&xref=' . rawurlencode($xref) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc) . '",
' . I18N::datatablesI18N(array(10, 20, 50, 100, 500, 1000, -1)) . ',
sorting: [[ 0, "desc" ]],
pageLength: ' . Auth::user()->getPreference('admin_site_change_page_size', 10) . ',
diff --git a/admin_site_clean.php b/admin_site_clean.php
index 931a1e25ef..c20ea58754 100644
--- a/admin_site_clean.php
+++ b/admin_site_clean.php
@@ -21,7 +21,6 @@ use Rhumsaa\Uuid\Uuid;
define('WT_SCRIPT_NAME', 'admin_site_clean.php');
require './includes/session.php';
-
$to_delete = Filter::postArray('to_delete');
if ($to_delete && Filter::checkCsrf()) {
foreach ($to_delete as $path) {
@@ -60,14 +59,14 @@ foreach (Tree::getAll() as $tree) {
if (substr($MEDIA_DIRECTORY, 0, 3) != '../') {
// Just need to add the first part of the path
- $tmp = explode('/', $MEDIA_DIRECTORY);
+ $tmp = explode('/', $MEDIA_DIRECTORY);
$do_not_delete[] = $tmp[0];
}
}
$locked_icon = '<i class="fa fa-ban text-danger"></i>';
-$dir = dir(WT_DATA_DIR);
+$dir = dir(WT_DATA_DIR);
$entries = array();
while (false !== ($entry = $dir->read())) {
if ($entry[0] != '.') {
diff --git a/admin_site_config.php b/admin_site_config.php
index 16293197ce..a261c61b9b 100644
--- a/admin_site_config.php
+++ b/admin_site_config.php
@@ -105,13 +105,13 @@ case 'languages':
// Lists of options for <select> controls.
$SMTP_SSL_OPTIONS = array(
- 'none'=> I18N::translate('none'),
- /* I18N: Secure Sockets Layer - a secure communications protocol*/ 'ssl'=> I18N::translate('ssl'),
- /* I18N: Transport Layer Security - a secure communications protocol */ 'tls'=> I18N::translate('tls'),
+ 'none' => I18N::translate('none'),
+ /* I18N: Secure Sockets Layer - a secure communications protocol*/ 'ssl' => I18N::translate('ssl'),
+ /* I18N: Transport Layer Security - a secure communications protocol */ 'tls' => I18N::translate('tls'),
);
$SMTP_ACTIVE_OPTIONS = array(
- 'internal'=> I18N::translate('Use PHP mail to send messages'),
- 'external'=> I18N::translate('Use SMTP to send messages'),
+ 'internal' => I18N::translate('Use PHP mail to send messages'),
+ 'external' => I18N::translate('Use SMTP to send messages'),
);
$WELCOME_TEXT_AUTH_MODE_OPTIONS = array(
0 => I18N::translate('No predefined text'),
@@ -283,7 +283,7 @@ $controller->pageHeader();
<?php echo /* I18N: A site configuration setting */ I18N::translate('Website URL'); ?>
</label>
<div class="col-sm-9">
- <?php echo select_edit_control('SERVER_URL', array(WT_BASE_URL=>WT_BASE_URL), '', Site::getPreference('SERVER_URL'), 'class="form-control"'); ?>
+ <?php echo select_edit_control('SERVER_URL', array(WT_BASE_URL => WT_BASE_URL), '', Site::getPreference('SERVER_URL'), 'class="form-control"'); ?>
<p class="small text-muted">
<?php echo /* I18N: Help text for the "Website URL" site configuration setting */ I18N::translate('If your website can be reached using more than one URL, such as <b>http://www.example.com/webtrees/</b> and <b>http://webtrees.example.com/</b>, you can specify the preferred URL. Requests for the other URLs will be redirected to the preferred one.'); ?>
<?php echo I18N::translate('If you leave this setting empty, the default value will be used.'); ?>
diff --git a/admin_site_logs.php b/admin_site_logs.php
index afb0cec8ab..4cdfce780a 100644
--- a/admin_site_logs.php
+++ b/admin_site_logs.php
@@ -150,7 +150,7 @@ case 'load_json':
if ($length) {
Auth::user()->setPreference('admin_site_log_page_size', $length);
- $limit = " LIMIT :limit OFFSET :offset";
+ $limit = " LIMIT :limit OFFSET :offset";
$args['limit'] = $length;
$args['offset'] = $start;
} else {
@@ -177,7 +177,7 @@ case 'load_json':
'draw' => Filter::getInteger('draw'),
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsFiltered,
- 'data' => $data
+ 'data' => $data,
));
return;
@@ -193,7 +193,7 @@ $controller
jQuery(".table-site-logs").dataTable( {
processing: true,
serverSide: true,
- ajax: "'.WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&from=' . $from . '&to=' . $to . '&type=' . $type . '&text=' . rawurlencode($text) . '&ip=' . rawurlencode($ip) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc) . '",
+ ajax: "' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=load_json&from=' . $from . '&to=' . $to . '&type=' . $type . '&text=' . rawurlencode($text) . '&ip=' . rawurlencode($ip) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc) . '",
' . I18N::datatablesI18N(array(10, 20, 50, 100, 500, 1000, -1)) . ',
sorting: [[ 0, "desc" ]],
pageLength: ' . Auth::user()->getPreference('admin_site_log_page_size', 10) . ',
@@ -266,7 +266,7 @@ foreach (User::all() as $tmp_user) {
<label for="type">
<?php echo I18N::translate('Type'); ?>
</label>
- <?php echo select_edit_control('type', array(''=>'', 'auth'=>'auth', 'config'=>'config', 'debug'=>'debug', 'edit'=>'edit', 'error'=>'error', 'media'=>'media', 'search'=>'search'), null, $type, 'class="form-control"'); ?>
+ <?php echo select_edit_control('type', array('' => '', 'auth' => 'auth', 'config' => 'config', 'debug' => 'debug', 'edit' => 'edit', 'error' => 'error', 'media' => 'media', 'search' => 'search'), null, $type, 'class="form-control"'); ?>
</div>
<div class="form-group col-xs-6 col-sm-4">
diff --git a/admin_site_merge.php b/admin_site_merge.php
index 18d70dc347..699e89ef0d 100644
--- a/admin_site_merge.php
+++ b/admin_site_merge.php
@@ -131,7 +131,7 @@ if ($rec1 && $rec2 && $rec1->getXref() !== $rec2->getXref() && $rec1::RECORD_TYP
" GROUP BY page_name"
)->execute(array($WT_TREE->getTreeId(), $gid1, $gid2))->fetchAssoc();
- foreach ($hits as $page_name=>$page_count) {
+ foreach ($hits as $page_name => $page_count) {
Database::prepare(
"UPDATE `##hit_counter` SET page_count=?" .
" WHERE gedcom_id=? AND page_name=? AND page_parameter=?"
@@ -143,15 +143,15 @@ if ($rec1 && $rec2 && $rec1->getXref() !== $rec2->getXref() && $rec1::RECORD_TYP
)->execute(array($WT_TREE->getTreeId(), $gid2));
$gedcom = "0 @" . $rec1->getXref() . "@ " . $rec1::RECORD_TYPE;
- foreach ($facts as $fact_id=>$fact) {
+ foreach ($facts as $fact_id => $fact) {
$gedcom .= "\n" . $fact->getGedcom();
}
- foreach ($facts1 as $fact_id=>$fact) {
+ foreach ($facts1 as $fact_id => $fact) {
if (in_array($fact_id, $keep1)) {
$gedcom .= "\n" . $fact->getGedcom();
}
}
- foreach ($facts2 as $fact_id=>$fact) {
+ foreach ($facts2 as $fact_id => $fact) {
if (in_array($fact_id, $keep2)) {
$gedcom .= "\n" . $fact->getGedcom();
}
diff --git a/admin_site_upgrade.php b/admin_site_upgrade.php
index 8bc46c662f..bb1770fbbf 100644
--- a/admin_site_upgrade.php
+++ b/admin_site_upgrade.php
@@ -350,7 +350,7 @@ $num_files = $res['nb'];
reset_timeout();
$start_time = microtime(true);
-$res = $archive->extract(
+$res = $archive->extract(
\PCLZIP_OPT_PATH, $zip_dir,
\PCLZIP_OPT_REMOVE_PATH, 'webtrees',
\PCLZIP_OPT_REPLACE_NEWER
@@ -439,7 +439,7 @@ try {
reset_timeout();
$start_time = microtime(true);
-$res = $archive->extract(
+$res = $archive->extract(
\PCLZIP_OPT_PATH, WT_ROOT,
\PCLZIP_OPT_REMOVE_PATH, 'webtrees',
\PCLZIP_OPT_REPLACE_NEWER
diff --git a/admin_trees_config.php b/admin_trees_config.php
index 914c25bd3a..9708aac63e 100644
--- a/admin_trees_config.php
+++ b/admin_trees_config.php
@@ -59,7 +59,7 @@ for ($n = 1; $n <= 9; ++$n) {
$formats = array(
'' => /* I18N: None of the other options */ I18N::translate('none'),
- 'markdown' => /* I18N: https://en.wikipedia.org/wiki/Markdown */ I18N::translate('markdown')
+ 'markdown' => /* I18N: https://en.wikipedia.org/wiki/Markdown */ I18N::translate('markdown'),
);
$surname_traditions = array(
@@ -93,7 +93,7 @@ $surname_traditions = array(
' ' . /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Wives take their husband’s surname.') .
' ' . /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Surnames are inflected to indicate an individual’s gender and marital status.'),
'none' =>
- I18N::translateContext('Surname tradition', 'none')
+ I18N::translateContext('Surname tradition', 'none'),
);
$source_types = array(
@@ -111,14 +111,14 @@ $PRIVACY_CONSTANTS = array(
'none' => I18N::translate('Show to visitors'),
'privacy' => I18N::translate('Show to members'),
'confidential' => I18N::translate('Show to managers'),
- 'hidden' => I18N::translate('Hide from everyone')
+ 'hidden' => I18N::translate('Hide from everyone'),
);
$privacy = array(
Auth::PRIV_PRIVATE => I18N::translate('Show to visitors'),
- Auth::PRIV_USER => I18N::translate('Show to members'),
- Auth::PRIV_NONE => I18N::translate('Show to managers'),
- Auth::PRIV_HIDE => I18N::translate('Hide from everyone'),
+ Auth::PRIV_USER => I18N::translate('Show to members'),
+ Auth::PRIV_NONE => I18N::translate('Show to managers'),
+ Auth::PRIV_HIDE => I18N::translate('Hide from everyone'),
);
$tags = array_unique(array_merge(
@@ -223,7 +223,7 @@ case 'general':
// e.g. "gregorian_and_jewish"
$WT_TREE->setPreference('CALENDAR_FORMAT', implode('_and_', array_unique(array(
Filter::post('CALENDAR_FORMAT0', 'gregorian|julian|french|jewish|hijri|jalali', 'none'),
- Filter::post('CALENDAR_FORMAT1', 'gregorian|julian|french|jewish|hijri|jalali', 'none')
+ Filter::post('CALENDAR_FORMAT1', 'gregorian|julian|french|jewish|hijri|jalali', 'none'),
))));
$WT_TREE->setPreference('CHART_BOX_TAGS', Filter::post('CHART_BOX_TAGS'));
$WT_TREE->setPreference('COMMON_NAMES_ADD', str_replace(' ', '', Filter::post('COMMON_NAMES_ADD')));
@@ -1058,8 +1058,7 @@ $controller
<?php echo /* I18N: A configuration setting */ I18N::translate('Who can upload new media files?'); ?>
</label>
<div class="col-sm-9">
- <?php echo select_edit_control('MEDIA_UPLOAD', array(Auth::PRIV_USER=> I18N::translate('Show to members'),
- Auth::PRIV_NONE=> I18N::translate('Show to managers'), Auth::PRIV_HIDE=> I18N::translate('Hide from everyone')), null, $WT_TREE->getPreference('MEDIA_UPLOAD'), 'class="form-control"'); ?>
+ <?php echo select_edit_control('MEDIA_UPLOAD', array(Auth::PRIV_USER => I18N::translate('Show to members'), Auth::PRIV_NONE => I18N::translate('Show to managers'), Auth::PRIV_HIDE => I18N::translate('Hide from everyone')), null, $WT_TREE->getPreference('MEDIA_UPLOAD'), 'class="form-control"'); ?>
<p class="small text-muted">
<?php echo /* I18N: Help text for the “Who can upload new media files?” configuration setting */ I18N::translate('If you are concerned that users might upload inappropriate images, you can restrict media uploads to managers only.'); ?>
</p>
@@ -1664,8 +1663,8 @@ $controller
'Show the %1$s %2$s parts of a place name.',
select_edit_control('SHOW_PEDIGREE_PLACES_SUFFIX',
array(
- false=> I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'),
- true => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last')
+ false => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'),
+ true => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last'),
), null, $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX')
),
select_edit_control('SHOW_PEDIGREE_PLACES', $one_to_nine, null, $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES'))
diff --git a/admin_trees_download.php b/admin_trees_download.php
index 6c7d8b69da..39d263f3b0 100644
--- a/admin_trees_download.php
+++ b/admin_trees_download.php
@@ -71,7 +71,7 @@ if ($action === 'download') {
// Create a ZIP file containing the GEDCOM file.
$comment = "Created by " . WT_WEBTREES . " " . WT_VERSION . " on " . date("r") . ".";
$archive = new PclZip($temp_dir . $zip_file);
- $v_list = $archive->add($temp_dir . $download_filename, \PCLZIP_OPT_COMMENT, $comment, \PCLZIP_OPT_REMOVE_PATH, $temp_dir);
+ $v_list = $archive->add($temp_dir . $download_filename, \PCLZIP_OPT_COMMENT, $comment, \PCLZIP_OPT_REMOVE_PATH, $temp_dir);
if ($v_list == 0) {
echo "Error : " . $archive->errorInfo(true);
} else {
diff --git a/admin_trees_duplicates.php b/admin_trees_duplicates.php
index 957071ae51..5e3827fe98 100644
--- a/admin_trees_duplicates.php
+++ b/admin_trees_duplicates.php
@@ -46,6 +46,7 @@ $repositories = Database::prepare(
$repositories = array_map(
function ($x) use ($WT_TREE) {
$tmp = explode(',', $x->xrefs);
+
return array_map(function ($y) use ($WT_TREE) {
return Repository::getInstance($y, $WT_TREE);
}, $tmp);
@@ -66,6 +67,7 @@ $sources = Database::prepare(
$sources = array_map(
function ($x) use ($WT_TREE) {
$tmp = explode(',', $x->xrefs);
+
return array_map(function ($y) use ($WT_TREE) {
return Source::getInstance($y, $WT_TREE);
}, $tmp);
@@ -86,6 +88,7 @@ $individuals = Database::prepare(
$individuals = array_map(
function ($x) use ($WT_TREE) {
$tmp = explode(',', $x->xrefs);
+
return array_map(function ($y) use ($WT_TREE) {
return Individual::getInstance($y, $WT_TREE);
}, $tmp);
@@ -105,6 +108,7 @@ $families = Database::prepare(
$families = array_map(
function ($x) use ($WT_TREE) {
$tmp = explode(',', $x->xrefs);
+
return array_map(function ($y) use ($WT_TREE) {
return Family::getInstance($y, $WT_TREE);
}, $tmp);
@@ -124,6 +128,7 @@ $media = Database::prepare(
$media = array_map(
function ($x) use ($WT_TREE) {
$tmp = explode(',', $x->xrefs);
+
return array_map(function ($y) use ($WT_TREE) {
return Media::getInstance($y, $WT_TREE);
}, $tmp);
@@ -131,10 +136,10 @@ $media = array_map(
);
$all_duplicates = array(
- I18N::translate('Repositories') => $repositories,
- I18N::translate('Sources') => $sources,
- I18N::translate('Individuals') => $individuals,
- I18N::translate('Families') => $families,
+ I18N::translate('Repositories') => $repositories,
+ I18N::translate('Sources') => $sources,
+ I18N::translate('Individuals') => $individuals,
+ I18N::translate('Families') => $families,
I18N::translate('Media objects') => $media,
);
diff --git a/admin_trees_manage.php b/admin_trees_manage.php
index c5d14f802c..348e3aa94a 100644
--- a/admin_trees_manage.php
+++ b/admin_trees_manage.php
@@ -217,11 +217,11 @@ case 'importform':
<?php echo WT_DATA_DIR; ?>
</span>
<?php
- $d = opendir(WT_DATA_DIR);
+ $d = opendir(WT_DATA_DIR);
$files = array();
while (($f = readdir($d)) !== false) {
if (!is_dir(WT_DATA_DIR . $f) && is_readable(WT_DATA_DIR . $f)) {
- $fp = fopen(WT_DATA_DIR . $f, 'rb');
+ $fp = fopen(WT_DATA_DIR . $f, 'rb');
$header = fread($fp, 64);
fclose($fp);
if (preg_match('/^(' . WT_UTF8_BOM . ')?0 *HEAD/', $header)) {
diff --git a/admin_trees_merge.php b/admin_trees_merge.php
index 0b02c1f7b4..9521b08169 100644
--- a/admin_trees_merge.php
+++ b/admin_trees_merge.php
@@ -74,7 +74,7 @@ if ($tree1_id && $tree2_id != $tree1_id) {
") AS other_trees USING (xref)"
)->execute(array(
$tree1_id, $tree1_id, $tree1_id, $tree1_id, $tree1_id,
- $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id
+ $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id, $tree2_id,
))->fetchAssoc();
if ($xrefs) {
diff --git a/admin_trees_places.php b/admin_trees_places.php
index 395c0e048a..dbc3bdaafe 100644
--- a/admin_trees_places.php
+++ b/admin_trees_places.php
@@ -45,7 +45,7 @@ if ($search && $replace) {
foreach ($record->getFacts() as $fact) {
$old_place = $fact->getAttribute('PLAC');
if (preg_match('/(^|, )' . preg_quote($search, '/') . '$/i', $old_place)) {
- $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
+ $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
$changes[$old_place] = $new_place;
if ($confirm == 'update') {
$gedcom = preg_replace('/(\n2 PLAC (?:.*, )*)' . preg_quote($search, '/') . '(\n|$)/i', '$1' . $replace . '$2', $fact->getGedcom());
@@ -66,7 +66,7 @@ if ($search && $replace) {
foreach ($record->getFacts() as $fact) {
$old_place = $fact->getAttribute('PLAC');
if (preg_match('/(^|, )' . preg_quote($search, '/') . '$/i', $old_place)) {
- $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
+ $new_place = preg_replace('/(^|, )' . preg_quote($search, '/') . '$/i', '$1' . $replace, $old_place);
$changes[$old_place] = $new_place;
if ($confirm == 'update') {
$gedcom = preg_replace('/(\n2 PLAC (?:.*, )*)' . preg_quote($search, '/') . '(\n|$)/i', '$1' . $replace . '$2', $fact->getGedcom());
diff --git a/admin_trees_renumber.php b/admin_trees_renumber.php
index 465a2989c8..02823431c3 100644
--- a/admin_trees_renumber.php
+++ b/admin_trees_renumber.php
@@ -59,13 +59,13 @@ $xrefs = Database::prepare(
") AS other_trees USING (xref)"
)->execute(array(
$WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(),
- $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId()
+ $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(),
))->fetchAssoc();
echo '<h1>', $controller->getPageTitle(), '</h1>';
if (Filter::get('action') === 'renumber') {
- foreach ($xrefs as $old_xref=>$type) {
+ foreach ($xrefs as $old_xref => $type) {
Database::beginTransaction();
Database::exec(
"LOCK TABLE `##individuals` WRITE," .
diff --git a/admin_users.php b/admin_users.php
index b2e20638dd..21e63716ac 100644
--- a/admin_users.php
+++ b/admin_users.php
@@ -33,11 +33,11 @@ $controller->restrictAccess(Auth::isAdmin());
// Valid values for form variables
$ALL_EDIT_OPTIONS = array(
- 'none' => /* I18N: Listbox entry; name of a role */ I18N::translate('Visitor'),
- 'access'=> /* I18N: Listbox entry; name of a role */ I18N::translate('Member'),
- 'edit' => /* I18N: Listbox entry; name of a role */ I18N::translate('Editor'),
- 'accept'=> /* I18N: Listbox entry; name of a role */ I18N::translate('Moderator'),
- 'admin' => /* I18N: Listbox entry; name of a role */ I18N::translate('Manager')
+ 'none' => /* I18N: Listbox entry; name of a role */ I18N::translate('Visitor'),
+ 'access' => /* I18N: Listbox entry; name of a role */ I18N::translate('Member'),
+ 'edit' => /* I18N: Listbox entry; name of a role */ I18N::translate('Editor'),
+ 'accept' => /* I18N: Listbox entry; name of a role */ I18N::translate('Moderator'),
+ 'admin' => /* I18N: Listbox entry; name of a role */ I18N::translate('Manager'),
);
// Form actions
@@ -248,7 +248,7 @@ case 'load_json':
'draw' => Filter::getInteger('draw'),
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsFiltered,
- 'data' => $data
+ 'data' => $data,
));
return;
@@ -258,12 +258,12 @@ case 'edit':
if ($user_id === 0) {
$controller->setPageTitle(I18N::translate('Add a new user'));
- $tmp = new \stdClass;
+ $tmp = new \stdClass;
$tmp->user_id = '';
$tmp->user_name = '';
$tmp->real_name = '';
$tmp->email = '';
- $user = new User($tmp);
+ $user = new User($tmp);
} else {
$controller->setPageTitle(I18N::translate('Edit user'));
$user = User::find($user_id);
@@ -279,7 +279,7 @@ case 'edit':
var idNum = fieldIDx.replace("RELATIONSHIP_PATH_LENGTH","");
var newIDx = "gedcomid"+idNum;
if (jQuery("#"+newIDx).val()=="") {
- alert("'. I18N::translate('You must specify an individual record before you can restrict the user to their immediate family.') . '");
+ alert("' . I18N::translate('You must specify an individual record before you can restrict the user to their immediate family.') . '");
jQuery(this).val("");
}
});
diff --git a/ancestry.php b/ancestry.php
index 3c553cd780..d7ad99d29d 100644
--- a/ancestry.php
+++ b/ancestry.php
@@ -119,6 +119,7 @@ $controller
if ($controller->error_message) {
echo '<p class="ui-state-error">', $controller->error_message, '</p>';
+
return;
}
switch ($controller->chart_style) {
diff --git a/app/Auth.php b/app/Auth.php
index 0bda01a7d1..d6aaeecdc7 100644
--- a/app/Auth.php
+++ b/app/Auth.php
@@ -29,7 +29,7 @@ class Auth {
/**
* Are we currently logged in?
*
- * @return boolean
+ * @return bool
*/
public static function check() {
return self::id() !== null;
@@ -40,7 +40,7 @@ class Auth {
*
* @param User|null $user
*
- * @return boolean
+ * @return bool
*/
public static function isAdmin(User $user = null) {
if ($user === null) {
@@ -56,7 +56,7 @@ class Auth {
* @param Tree $tree
* @param User|null $user
*
- * @return boolean
+ * @return bool
*/
public static function isManager(Tree $tree, User $user = null) {
if ($user === null) {
@@ -72,7 +72,7 @@ class Auth {
* @param Tree $tree
* @param User|null $user
*
- * @return boolean
+ * @return bool
*/
public static function isModerator(Tree $tree, User $user = null) {
if ($user === null) {
@@ -88,8 +88,7 @@ class Auth {
* @param Tree $tree
* @param User|null $user
*
- *
- * @return boolean
+ * @return bool
*/
public static function isEditor(Tree $tree, User $user = null) {
if ($user === null) {
@@ -105,7 +104,7 @@ class Auth {
* @param Tree $tree
* @param User|null $user
*
- * @return boolean
+ * @return bool
*/
public static function isMember(Tree $tree, User $user = null) {
if ($user === null) {
@@ -121,7 +120,7 @@ class Auth {
* @param Tree $tree
* @param User|null $user
*
- * @return integer
+ * @return int
*/
public static function accessLevel(Tree $tree, User $user = null) {
if ($user === null) {
@@ -140,7 +139,7 @@ class Auth {
/**
* Is the current visitor a search engine? The global is set in session.php
*
- * @return boolean
+ * @return bool
*/
public static function isSearchEngine() {
global $SEARCH_SPIDER;
@@ -165,11 +164,11 @@ class Auth {
public static function user() {
$user = User::find(self::id());
if ($user === null) {
- $visitor = new \stdClass;
- $visitor->user_id = '';
+ $visitor = new \stdClass;
+ $visitor->user_id = '';
$visitor->user_name = '';
$visitor->real_name = '';
- $visitor->email = '';
+ $visitor->email = '';
return new User($visitor);
} else {
diff --git a/app/Controller/AdvancedSearchController.php b/app/Controller/AdvancedSearchController.php
index 059a3fa7cd..351631f199 100644
--- a/app/Controller/AdvancedSearchController.php
+++ b/app/Controller/AdvancedSearchController.php
@@ -20,10 +20,10 @@ namespace Fisharebest\Webtrees;
* Class AdvancedSearchController - Controller for the advanced search page
*/
class AdvancedSearchController extends SearchController {
- public $fields = array();
- public $values = array();
+ public $fields = array();
+ public $values = array();
public $plusminus = array();
- public $errors = array();
+ public $errors = array();
/**
* Startup activity
@@ -136,6 +136,7 @@ class AdvancedSearchController extends SearchController {
$fields[$field] = strip_tags(GedcomTag::GetLabel($field)); // Custom tags have error markup
}
uksort($fields, __NAMESPACE__ . '\AdvancedSearchController::tagSort');
+
return $fields;
}
@@ -150,7 +151,7 @@ class AdvancedSearchController extends SearchController {
public static function tagSort($x, $y) {
list($x1) = explode(':', $x . ':');
list($y1) = explode(':', $y . ':');
- $tmp = I18N::strcasecmp(GedcomTag::getLabel($x1), GedcomTag::getLabel($y1));
+ $tmp = I18N::strcasecmp(GedcomTag::getLabel($x1), GedcomTag::getLabel($y1));
if ($tmp) {
return $tmp;
} else {
@@ -159,7 +160,7 @@ class AdvancedSearchController extends SearchController {
}
/**
- * @param integer $i
+ * @param int $i
*
* @return string
*/
@@ -168,11 +169,12 @@ class AdvancedSearchController extends SearchController {
if (isset($this->values[$i])) {
$val = $this->values[$i];
}
+
return $val;
}
/**
- * @param integer $i
+ * @param int $i
*
* @return string
*/
@@ -188,7 +190,7 @@ class AdvancedSearchController extends SearchController {
/**
* @param string $field
*
- * @return integer
+ * @return int
*/
public function getIndex($field) {
return array_search($field, $this->fields);
@@ -207,12 +209,12 @@ class AdvancedSearchController extends SearchController {
* Set the field order
*/
private function reorderFields() {
- $i = 0;
+ $i = 0;
$newfields = array();
$newvalues = array();
- $newplus = array();
- $rels = array();
- foreach ($this->fields as $j=>$field) {
+ $newplus = array();
+ $rels = array();
+ foreach ($this->fields as $j => $field) {
if (strpos($this->fields[$j], "FAMC:HUSB:NAME") === 0 || strpos($this->fields[$j], "FAMC:WIFE:NAME") === 0) {
$rels[$this->fields[$j]] = $this->values[$j];
continue;
@@ -226,10 +228,10 @@ class AdvancedSearchController extends SearchController {
}
$i++;
}
- $this->fields = $newfields;
- $this->values = $newvalues;
+ $this->fields = $newfields;
+ $this->values = $newvalues;
$this->plusminus = $newplus;
- foreach ($rels as $field=>$value) {
+ foreach ($rels as $field => $value) {
$this->fields[] = $field;
$this->values[] = $value;
}
@@ -237,14 +239,12 @@ class AdvancedSearchController extends SearchController {
/**
* Perform the search
- *
- * @return void
*/
private function advancedSearch() {
global $WT_TREE;
$this->myindilist = array();
- $fct = count($this->fields);
+ $fct = count($this->fields);
if (!array_filter($this->values)) {
return;
}
@@ -262,7 +262,7 @@ class AdvancedSearchController extends SearchController {
$fam_date = false;
$indi_plac = false;
$fam_plac = false;
- foreach ($this->fields as $n=>$field) {
+ foreach ($this->fields as $n => $field) {
if ($this->values[$n]) {
if (substr($field, 0, 14) == 'FAMC:HUSB:NAME') {
$father_name = true;
@@ -272,14 +272,14 @@ class AdvancedSearchController extends SearchController {
$indi_name = true;
} elseif (strpos($field, ':DATE') !== false) {
if (substr($field, 0, 4) == 'FAMS') {
- $fam_date = true;
+ $fam_date = true;
$spouse_family = true;
} else {
$indi_date = true;
}
} elseif (strpos($field, ':PLAC') !== false) {
if (substr($field, 0, 4) == 'FAMS') {
- $fam_plac = true;
+ $fam_plac = true;
$spouse_family = true;
} else {
$indi_plac = true;
@@ -375,7 +375,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::russell($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "i_n.n_soundex_givn_std LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -391,7 +391,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::daitchMokotoff($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "i_n.n_soundex_givn_dm LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -422,7 +422,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::russell($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "i_n.n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -438,7 +438,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::daitchMokotoff($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "i_n.n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -524,7 +524,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::russell($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "{$table}.n_soundex_givn_std LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -540,7 +540,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::daitchMokotoff($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "{$table}.n_soundex_givn_dm LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -571,7 +571,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::russell($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "{$table}.n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -587,7 +587,7 @@ class AdvancedSearchController extends SearchController {
$sdx = Soundex::daitchMokotoff($value);
if ($sdx) {
$sdx = explode(':', $sdx);
- foreach ($sdx as $k=>$v) {
+ foreach ($sdx as $k => $v) {
$sdx[$k] = "{$table}.n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
$bind[] = $v;
}
@@ -617,7 +617,7 @@ class AdvancedSearchController extends SearchController {
foreach ($rows as $row) {
$person = Individual::getInstance($row->xref, $WT_TREE, $row->gedcom);
// Check for XXXX:PLAC fields, which were only partially matched by SQL
- foreach ($this->fields as $n=>$field) {
+ foreach ($this->fields as $n => $field) {
if ($this->values[$n] && preg_match('/^(' . WT_REGEX_TAG . '):PLAC$/', $field, $match)) {
if (!preg_match('/\n1 ' . $match[1] . '(\n[2-9].*)*\n2 PLAC .*' . preg_quote($this->values[$n], '/') . '/i', $person->getGedcom())) {
continue 2;
diff --git a/app/Controller/AjaxController.php b/app/Controller/AjaxController.php
index b8f436bdf8..2f9475d15b 100644
--- a/app/Controller/AjaxController.php
+++ b/app/Controller/AjaxController.php
@@ -20,7 +20,6 @@ namespace Fisharebest\Webtrees;
* Class AjaxController - Base controller for all popup pages
*/
class AjaxController extends BaseController {
-
/**
* @return $this
*/
@@ -34,7 +33,6 @@ class AjaxController extends BaseController {
}
/**
- * @return void
*/
public function pageFooter() {
// Ajax responses may have Javascript
@@ -44,7 +42,7 @@ class AjaxController extends BaseController {
/**
* Restrict access.
*
- * @param boolean $condition
+ * @param bool $condition
*
* @return $this
*/
diff --git a/app/Controller/AncestryController.php b/app/Controller/AncestryController.php
index 9a260827fe..2de95d9702 100644
--- a/app/Controller/AncestryController.php
+++ b/app/Controller/AncestryController.php
@@ -20,14 +20,13 @@ namespace Fisharebest\Webtrees;
* Class AncestryController - Controller for the ancestry chart
*/
class AncestryController extends ChartController {
-
- /** @var integer Show boxes for cousins */
+ /** @var int Show boxes for cousins */
public $show_cousins;
- /** @var integer Determines style of chart */
+ /** @var int Determines style of chart */
public $chart_style;
- /** @var integer Number of generations to display */
+ /** @var int Number of generations to display */
public $generations;
/**
@@ -57,8 +56,8 @@ class AncestryController extends ChartController {
* print a child ascendancy
*
* @param Individual $individual
- * @param integer $sosa child sosa number
- * @param integer $depth the ascendancy depth to show
+ * @param int $sosa child sosa number
+ * @param int $depth the ascendancy depth to show
*/
public function printChildAscendancy(Individual $individual, $sosa, $depth) {
echo '<li>';
diff --git a/app/Controller/BaseController.php b/app/Controller/BaseController.php
index 1474739107..7d1497b35d 100644
--- a/app/Controller/BaseController.php
+++ b/app/Controller/BaseController.php
@@ -21,9 +21,9 @@ namespace Fisharebest\Webtrees;
*/
class BaseController {
// The controller accumulates Javascript (inline and external), and renders it in the footer
- const JS_PRIORITY_HIGH = 0;
- const JS_PRIORITY_NORMAL = 1;
- const JS_PRIORITY_LOW = 2;
+ const JS_PRIORITY_HIGH = 0;
+ const JS_PRIORITY_NORMAL = 1;
+ const JS_PRIORITY_LOW = 2;
private $inline_javascript = array(
self::JS_PRIORITY_HIGH => array(),
self::JS_PRIORITY_NORMAL => array(),
@@ -67,13 +67,13 @@ class BaseController {
* NOTE: there is no need to use "jQuery(document).ready(function(){...})", etc.
* as this Javascript won’t be inserted until the very end of the page.
*
- * @param string $script
- * @param integer $priority
+ * @param string $script
+ * @param int $priority
*
* @return $this
*/
public function addInlineJavascript($script, $priority = self::JS_PRIORITY_NORMAL) {
- $tmp = & $this->inline_javascript[$priority];
+ $tmp = &$this->inline_javascript[$priority];
$tmp[] = $script;
return $this;
@@ -136,8 +136,6 @@ class BaseController {
/**
* Print the page footer, using the theme
- *
- * @return void
*/
public function pageFooter() {
if (WT_DEBUG_SQL) {
diff --git a/app/Controller/BranchesController.php b/app/Controller/BranchesController.php
index ea72eb185b..f29e28d72f 100644
--- a/app/Controller/BranchesController.php
+++ b/app/Controller/BranchesController.php
@@ -23,10 +23,10 @@ class BranchesController extends PageController {
/** @var string Generate the branches for this surname */
private $surname;
- /** @var boolean Whether to use Standard phonetic matching */
+ /** @var bool Whether to use Standard phonetic matching */
private $soundex_std;
- /** @var boolean Whether to use Daitch-Mokotov phonetic matching */
+ /** @var bool Whether to use Daitch-Mokotov phonetic matching */
private $soundex_dm;
/** @var Individual[] Everyone with the selected surname */
@@ -72,7 +72,7 @@ class BranchesController extends PageController {
/**
* Should we use Standard phonetic matching
*
- * @return boolean
+ * @return bool
*/
public function getSoundexStd() {
return $this->soundex_std;
@@ -81,7 +81,7 @@ class BranchesController extends PageController {
/**
* Should we use Daitch-Mokotov phonetic matching
*
- * @return boolean
+ * @return bool
*/
public function getSoundexDm() {
return $this->soundex_dm;
@@ -133,7 +133,7 @@ class BranchesController extends PageController {
* Load the ancestors of an individual, so we can highlight them in the list
*
* @param Individual $ancestor
- * @param integer $sosa
+ * @param int $sosa
*/
private function loadAncestors(Individual $ancestor, $sosa) {
if ($ancestor) {
@@ -271,7 +271,7 @@ class BranchesController extends PageController {
/**
* Convert a SOSA number into a generation number. e.g. 8 = great-grandfather = 3 generations
*
- * @param integer $sosa
+ * @param int $sosa
*
* @return string
*/
diff --git a/app/Controller/ChartController.php b/app/Controller/ChartController.php
index 028d95dffd..c645c01b03 100644
--- a/app/Controller/ChartController.php
+++ b/app/Controller/ChartController.php
@@ -23,7 +23,7 @@ class ChartController extends PageController {
/** @var Individual Who is chart about? */
public $root;
- /** @var boolean determines the detail shown in the personbox */
+ /** @var bool determines the detail shown in the personbox */
private $show_full;
/** @var string An error message, in case we cannot construct the chart */
@@ -41,7 +41,7 @@ class ChartController extends PageController {
parent::__construct();
- $rootid = Filter::get('rootid', WT_REGEX_XREF);
+ $rootid = Filter::get('rootid', WT_REGEX_XREF);
$this->root = Individual::getInstance($rootid, $WT_TREE);
if (!$this->root) {
// Missing root individual? Show the chart for someone.
@@ -83,22 +83,22 @@ class ChartController extends PageController {
/**
* Find the direct-line ancestors of an individual. Array indexes are SOSA numbers.
*
- * @param integer $generations
+ * @param int $generations
*
* @return Individual[]
*/
public function sosaAncestors($generations) {
$ancestors = array(
- 1 => $this->root
+ 1 => $this->root,
);
// Subtract one generation, as this algorithm includes parents.
$max = pow(2, $generations - 1);
for ($i = 1; $i < $max; $i++) {
- $ancestors[$i * 2] = null;
+ $ancestors[$i * 2] = null;
$ancestors[$i * 2 + 1] = null;
- $person = $ancestors[$i];
+ $person = $ancestors[$i];
if ($person) {
$family = $person->getPrimaryChildFamily();
if ($family) {
@@ -117,6 +117,7 @@ class ChartController extends PageController {
/**
* Function showFull
+ *
* @return bool
*/
public function showFull() {
@@ -125,6 +126,7 @@ class ChartController extends PageController {
/**
* Function boxDimensions
+ *
* @return \stdClass
*/
public function getBoxDimensions() {
diff --git a/app/Controller/CompactController.php b/app/Controller/CompactController.php
index a27a38991b..19713bb725 100644
--- a/app/Controller/CompactController.php
+++ b/app/Controller/CompactController.php
@@ -47,7 +47,7 @@ class CompactController extends ChartController {
}
/**
- * @param integer $n
+ * @param int $n
*
* @return string
*/
@@ -55,7 +55,7 @@ class CompactController extends ChartController {
$indi = $this->treeid[$n];
if ($indi && $indi->canShowName()) {
- $name = $indi->getFullName();
+ $name = $indi->getFullName();
$addname = $indi->getAddName();
if ($this->show_thumbs && $indi->getTree()->getPreference('SHOW_HIGHLIGHT_IMAGES')) {
@@ -98,8 +98,8 @@ class CompactController extends ChartController {
}
/**
- * @param integer $n
- * @param string $arrow_dir
+ * @param int $n
+ * @param string $arrow_dir
*
* @return string
*/
@@ -117,7 +117,7 @@ class CompactController extends ChartController {
if ($indi) {
$title = I18N::translate('Compact tree of %s', $indi->getFullName());
- $text = '<a class="icon-' . $arrow_dir . 'arrow" title="' . strip_tags($title) . '" href="?rootid=' . $indi->getXref();
+ $text = '<a class="icon-' . $arrow_dir . 'arrow" title="' . strip_tags($title) . '" href="?rootid=' . $indi->getXref();
if ($this->show_thumbs) {
$text .= "&amp;show_thumbs=" . $this->show_thumbs;
}
diff --git a/app/Controller/DescendancyController.php b/app/Controller/DescendancyController.php
index 4a634d8892..94065084d3 100644
--- a/app/Controller/DescendancyController.php
+++ b/app/Controller/DescendancyController.php
@@ -22,14 +22,13 @@ use Rhumsaa\Uuid\Uuid;
* Class DescendancyController - Controller for the descendancy chart
*/
class DescendancyController extends ChartController {
-
- /** @var integer Show boxes for cousins */
+ /** @var int Show boxes for cousins */
public $show_cousins;
- /** @var integer Determines style of chart */
+ /** @var int Determines style of chart */
public $chart_style;
- /** @var integer Number of generations to display */
+ /** @var int Number of generations to display */
public $generations;
// d'Aboville numbering system [ http://www.saintclair.org/numbers/numdob.html ]
@@ -62,11 +61,9 @@ class DescendancyController extends ChartController {
* Print a child family
*
* @param Individual $person
- * @param integer $depth the descendancy depth to show
+ * @param int $depth the descendancy depth to show
* @param string $label
* @param string $gpid
- *
- * @return void
*/
public function printChildFamily(Individual $person, $depth, $label = '1.', $gpid = '') {
@@ -86,9 +83,7 @@ class DescendancyController extends ChartController {
* print a child descendancy
*
* @param Individual $person
- * @param integer $depth the descendancy depth to show
- *
- * @return void
+ * @param int $depth the descendancy depth to show
*/
public function printChildDescendancy(Individual $person, $depth) {
echo "<li>";
@@ -124,7 +119,7 @@ class DescendancyController extends ChartController {
}
$this->dabo_num[$level]++;
$this->dabo_num[$level + 1] = 0;
- $this->dabo_sex[$level] = $person->getSex();
+ $this->dabo_sex[$level] = $person->getSex();
for ($i = 0; $i <= $level; $i++) {
$isf = $this->dabo_sex[$i];
if ($isf === 'M') {
@@ -154,9 +149,7 @@ class DescendancyController extends ChartController {
*
* @param Individual $person
* @param Family $family
- * @param integer $depth the descendancy depth to show
- *
- * @return void
+ * @param int $depth the descendancy depth to show
*/
private function printFamilyDescendancy(Individual $person, Family $family, $depth) {
$uid = Uuid::uuid4(); // create a unique ID
@@ -226,7 +219,7 @@ class DescendancyController extends ChartController {
* Find all the individuals that are descended from an individual.
*
* @param Individual $person
- * @param integer $n
+ * @param int $n
* @param Individual[] $array
*
* @return Individual[]
@@ -245,6 +238,7 @@ class DescendancyController extends ChartController {
$array = $this->individualDescendancy($child, $n - 1, $array);
}
}
+
return $array;
}
@@ -252,7 +246,7 @@ class DescendancyController extends ChartController {
* Find all the families that are descended from an individual.
*
* @param Individual $person
- * @param integer $n
+ * @param int $n
* @param Family[] $array
*
* @return Family[]
@@ -267,6 +261,7 @@ class DescendancyController extends ChartController {
$array = $this->familyDescendancy($child, $n - 1, $array);
}
}
+
return $array;
}
}
diff --git a/app/Controller/FamilyBookController.php b/app/Controller/FamilyBookController.php
index 5b59cafbf9..24e0a8f45b 100644
--- a/app/Controller/FamilyBookController.php
+++ b/app/Controller/FamilyBookController.php
@@ -20,19 +20,19 @@ namespace Fisharebest\Webtrees;
* Class FamilyBookController - Controller for the familybook chart
*/
class FamilyBookController extends ChartController {
- /** @var integer Whether to show spouse details */
+ /** @var int Whether to show spouse details */
public $show_spouse;
- /** @var integer Number of descendancy generations to show */
+ /** @var int Number of descendancy generations to show */
public $descent;
- /** @var integer Number of ascendancy generations to show */
+ /** @var int Number of ascendancy generations to show */
public $generations;
- /** @var integer Number of descendancy generations that exist */
+ /** @var int Number of descendancy generations that exist */
private $dgenerations;
- /** @var integer Half height of personbox */
+ /** @var int Half height of personbox */
public $bhalfheight;
/**
@@ -69,9 +69,9 @@ class FamilyBookController extends ChartController {
* Prints descendency of passed in person
*
* @param Individual|null $person
- * @param integer $generation
+ * @param int $generation
*
- * @return integer
+ * @return int
*/
private function printDescendency(Individual $person = null, $generation) {
@@ -178,7 +178,7 @@ class FamilyBookController extends ChartController {
* Prints pedigree of the person passed in
*
* @param Individual $person
- * @param integer $count
+ * @param int $count
*/
private function printPersonPedigree($person, $count) {
if ($count >= $this->generations) {
@@ -306,10 +306,10 @@ class FamilyBookController extends ChartController {
/**
* Calculates number of generations a person has
*
- * @param string $pid
- * @param integer $depth
+ * @param string $pid
+ * @param int $depth
*
- * @return integer
+ * @return int
*/
private function maxDescendencyGenerations($pid, $depth) {
global $WT_TREE;
@@ -343,8 +343,6 @@ class FamilyBookController extends ChartController {
/**
* Print empty box
- *
- * @return void
*/
private function printEmptyBox() {
@@ -355,7 +353,7 @@ class FamilyBookController extends ChartController {
* Print a “Family Book” for an individual
*
* @param Individual $person
- * @param integer $descent_steps
+ * @param int $descent_steps
*/
public function printFamilyBook(Individual $person, $descent_steps) {
if ($descent_steps == 0 || !$person->canShowName()) {
diff --git a/app/Controller/FamilyController.php b/app/Controller/FamilyController.php
index f5c4ea51ac..fc7c424b8f 100644
--- a/app/Controller/FamilyController.php
+++ b/app/Controller/FamilyController.php
@@ -47,6 +47,7 @@ class FamilyController extends GedcomRecordController {
return $individual;
}
}
+
return parent::getSignificantIndividual();
}
@@ -60,6 +61,7 @@ class FamilyController extends GedcomRecordController {
if ($this->record) {
return $this->record;
}
+
return parent::getSignificantFamily();
}
@@ -73,6 +75,7 @@ class FamilyController extends GedcomRecordController {
foreach ($matches[1] as &$match) {
$match = 'pids%5B%5D=' . $match;
}
+
return implode('&amp;', $matches[1]);
}
@@ -150,6 +153,7 @@ class FamilyController extends GedcomRecordController {
public function getSignificantSurname() {
if ($this->record && $this->record->getHusband()) {
list($surn) = explode(',', $this->record->getHusband()->getSortname());
+
return $surn;
} else {
return '';
diff --git a/app/Controller/FanchartController.php b/app/Controller/FanchartController.php
index 62bca2d628..05ca297ec4 100644
--- a/app/Controller/FanchartController.php
+++ b/app/Controller/FanchartController.php
@@ -20,13 +20,13 @@ namespace Fisharebest\Webtrees;
* Class FanchartController Controller for the fan chart
*/
class FanchartController extends ChartController {
- /** @var integer Style of fanchart */
+ /** @var int Style of fanchart */
public $fan_style;
- /** @var integer Width of fanchart (a percentage) */
+ /** @var int Width of fanchart (a percentage) */
public $fan_width;
- /** @var integer Number of generations to display */
+ /** @var int Number of generations to display */
public $generations;
/**
@@ -70,8 +70,8 @@ class FanchartController extends ChartController {
/**
* split and center text by lines
*
- * @param string $data input string
- * @param integer $maxlen max length of each line
+ * @param string $data input string
+ * @param int $maxlen max length of each line
*
* @return string $text output string
*/
@@ -85,12 +85,13 @@ class FanchartController extends ChartController {
foreach ($lines as $line) {
$text .= $this->splitAlignText($line, $maxlen) . "\n";
}
+
return $text;
}
// process current line word by word
$split = explode(' ', $data);
- $text = '';
- $line = '';
+ $text = '';
+ $line = '';
// do not split hebrew line
$found = false;
@@ -103,7 +104,7 @@ class FanchartController extends ChartController {
$line = $data;
} else {
foreach ($split as $word) {
- $len = strlen($line);
+ $len = strlen($line);
$wlen = strlen($word);
if (($len + $wlen) < $maxlen) {
if (!empty($line)) {
@@ -126,7 +127,7 @@ class FanchartController extends ChartController {
if (in_array(ord($line{0}), $RTLOrd)) {
$len /= 2;
}
- $p = max(0, (int) (($maxlen - $len) / 2));
+ $p = max(0, (int) (($maxlen - $len) / 2));
$line = str_repeat(' ', $p) . $line; // center alignment using spaces
$text .= $line;
}
@@ -154,7 +155,7 @@ class FanchartController extends ChartController {
$treesize = count($treeid) + 1;
// generations count
- $gen = log($treesize) / log(2) - 1;
+ $gen = log($treesize) / log(2) - 1;
$sosa = $treesize - 1;
// fan size
@@ -163,11 +164,11 @@ class FanchartController extends ChartController {
}
$fandeg = min($fandeg, 360);
$fandeg = max($fandeg, 90);
- $cx = $fanw / 2 - 1; // center x
- $cy = $cx; // center y
- $rx = $fanw - 1;
- $rw = $fanw / ($gen + 1);
- $fanh = $fanw; // fan height
+ $cx = $fanw / 2 - 1; // center x
+ $cy = $cx; // center y
+ $rx = $fanw - 1;
+ $rw = $fanw / ($gen + 1);
+ $fanh = $fanw; // fan height
if ($fandeg == 180) {
$fanh = round($fanh * ($gen + 1) / ($gen * 2));
}
diff --git a/app/Controller/HourglassController.php b/app/Controller/HourglassController.php
index 21ee3ded19..3200f431bc 100644
--- a/app/Controller/HourglassController.php
+++ b/app/Controller/HourglassController.php
@@ -20,37 +20,36 @@ namespace Fisharebest\Webtrees;
* Class HourglassController - Controller for the hourglass chart
*/
class HourglassController extends ChartController {
-
- /** @var integer Whether to show spouse details */
+ /** @var int Whether to show spouse details */
public $show_spouse;
- /** @var integer Number of ascendancy generations to show */
+ /** @var int Number of ascendancy generations to show */
public $generations;
- /** @var integer Number of descendancy generations that exist */
+ /** @var int Number of descendancy generations that exist */
private $dgenerations;
- /** @var integer Half height of personbox */
+ /** @var int Half height of personbox */
public $bhalfheight;
// Left and right get reversed on RTL pages
private $left_arrow;
private $right_arrow;
- /** @var boolean Can the Javascript be loaded by the controller */
+ /** @var bool Can the Javascript be loaded by the controller */
private $canLoadJS;
- const LINK = "<a class='%s' href='%s' data-parms='%s-%s-%s'></a>";
+ const LINK = "<a class='%s' href='%s' data-parms='%s-%s-%s'></a>";
const SWITCH_LINK = "<a href='hourglass.php?rootid=%s&amp;show_spouse=%s&amp;show_full=%s&amp;generations=%s' class='name1'>%s</a>";
/**
- * @param string $rootid
- * @param integer $show_full
- * @param boolean $loadJS
+ * @param string $rootid
+ * @param int $show_full
+ * @param bool $loadJS
*/
public function __construct($rootid = '', $show_full = 1, $loadJS = true) {
global $WT_TREE;
-
+
parent::__construct($show_full);
// Extract parameters from
@@ -61,10 +60,10 @@ class HourglassController extends ChartController {
//-- flip the arrows for RTL languages
if (I18N::direction() === 'ltr') {
- $this->left_arrow = 'icon-larrow';
+ $this->left_arrow = 'icon-larrow';
$this->right_arrow = 'icon-rarrow';
} else {
- $this->left_arrow = 'icon-rarrow';
+ $this->left_arrow = 'icon-rarrow';
$this->right_arrow = 'icon-larrow';
}
@@ -83,7 +82,7 @@ class HourglassController extends ChartController {
* Prints pedigree of the person passed in. Which is the descendancy
*
* @param Individual $person ID of person to print the pedigree for
- * @param integer $count generation count, so it recursively calls itself
+ * @param int $count generation count, so it recursively calls itself
*/
public function printPersonPedigree(Individual $person, $count) {
@@ -181,10 +180,10 @@ class HourglassController extends ChartController {
* Prints descendency of passed in person
*
* @param Individual $person person to print descendency for
- * @param integer $count count of generations to print
- * @param boolean $showNav
+ * @param int $count count of generations to print
+ * @param bool $showNav
*
- * @return integer
+ * @return int
*/
public function printDescendency($person, $count, $showNav = true) {
global $lastGenSecondFam;
@@ -193,7 +192,7 @@ class HourglassController extends ChartController {
return 0;
}
- $pid = $person->getXref();
+ $pid = $person->getXref();
$tablealign = 'right';
$otablealign = 'left';
if (I18N::direction() === 'rtl') {
@@ -211,9 +210,9 @@ class HourglassController extends ChartController {
echo "<table id='table_$pid' class='hourglassChart' style='float:$tablealign'>";
echo '<tr>';
echo "<td style='text-align:$tablealign'>";
- $numkids = 0;
+ $numkids = 0;
$families = $person->getSpouseFamilies();
- $famNum = 0;
+ $famNum = 0;
$children = array();
if ($count < $this->dgenerations) {
// Put all of the children in a common array
@@ -229,7 +228,7 @@ class HourglassController extends ChartController {
echo "<table style='position: relative; top: auto; float: $tablealign;'>";
for ($i = 0; $i < $ct; $i++) {
$person2 = $children[$i];
- $chil = $person2->getXref();
+ $chil = $person2->getXref();
echo '<tr>';
echo '<td id="td_', $chil, '" class="', I18N::direction(), '" style="text-align:', $otablealign, '">';
$kids = $this->printDescendency($person2, $count + 1);
@@ -294,7 +293,7 @@ class HourglassController extends ChartController {
$this->getBoxDimensions()->width -= 10;
$this->getBoxDimensions()->height -= 10;
print_pedigree_person($family->getSpouse($person), $this->showFull());
- $this->getBoxDimensions()->width = $tempw;
+ $this->getBoxDimensions()->width = $tempw;
$this->getBoxDimensions()->height = $temph;
$numkids += 0.95;
echo "</td><td></td>";
@@ -314,7 +313,7 @@ class HourglassController extends ChartController {
$famids = $person->getSpouseFamilies();
//-- make sure there is more than 1 child in the family with parents
$cfamids = $person->getChildFamilies();
- $num = 0;
+ $num = 0;
foreach ($cfamids as $family) {
$num += $family->getNumberOfChildren();
}
@@ -377,10 +376,10 @@ class HourglassController extends ChartController {
/**
* Calculates number of generations a person has
*
- * @param Individual $individual Individual to see how far down the descendency goes
- * @param integer $depth Pass in 0 and it calculates how far down descendency goes
+ * @param Individual $individual Start individual
+ * @param int $depth Pass in 0 and it calculates how far down descendency goes
*
- * @return integer Number of generations the descendency actually goes
+ * @return int Number of generations the descendency actually goes
*/
private function maxDescendencyGenerations(Individual $individual, $depth) {
if ($depth > $this->generations) {
@@ -409,7 +408,6 @@ class HourglassController extends ChartController {
/**
* setup all of the javascript that is needed for the hourglass chart
- *
*/
public function setupJavascript() {
$js = "
diff --git a/app/Controller/IndividualController.php b/app/Controller/IndividualController.php
index 99c3bda206..0d8752d7ca 100644
--- a/app/Controller/IndividualController.php
+++ b/app/Controller/IndividualController.php
@@ -20,7 +20,7 @@ namespace Fisharebest\Webtrees;
* Class IndividualController - Controller for the individual page
*/
class IndividualController extends GedcomRecordController {
- public $name_count = 0;
+ public $name_count = 0;
public $total_names = 0;
public $tabs;
@@ -41,7 +41,6 @@ class IndividualController extends GedcomRecordController {
parent::__construct();
-
// If we can display the details, add them to the page header
if ($this->record && $this->record->canShow()) {
$this->setPageTitle($this->record->getFullName() . ' ' . $this->record->getLifespan());
@@ -59,6 +58,7 @@ class IndividualController extends GedcomRecordController {
if ($this->record) {
return $this->record;
}
+
return parent::getSignificantIndividual();
}
@@ -77,6 +77,7 @@ class IndividualController extends GedcomRecordController {
return $family;
}
}
+
return parent::getSignificantFamily();
}
@@ -126,7 +127,7 @@ class IndividualController extends GedcomRecordController {
null,
$event->getParent()->getTree()
);
- $all_names = $dummy->getAllNames();
+ $all_names = $dummy->getAllNames();
$primary_name = $all_names[0];
$this->name_count++;
@@ -278,7 +279,7 @@ class IndividualController extends GedcomRecordController {
$menu->addSubmenu($submenu);
$has_sex_record = false;
- $submenu = new Menu(I18N::translate('Edit gender'), '#', 'menu-indi-editsex');
+ $submenu = new Menu(I18N::translate('Edit gender'), '#', 'menu-indi-editsex');
foreach ($this->record->getFacts() as $fact) {
if ($fact->getTag() == 'SEX' && $fact->canEdit()) {
$submenu->setOnclick("return edit_record('" . $this->record->getXref() . "', '" . $fact->getFactId() . "');");
@@ -350,6 +351,7 @@ class IndividualController extends GedcomRecordController {
} elseif ($person->isPendingAddtion()) {
$class .= ' new';
}
+
return $class;
}
@@ -362,6 +364,7 @@ class IndividualController extends GedcomRecordController {
public function getSignificantSurname() {
if ($this->record) {
list($surn) = explode(',', $this->record->getSortname());
+
return $surn;
} else {
return '';
@@ -376,9 +379,9 @@ class IndividualController extends GedcomRecordController {
public function getSideBarContent() {
global $controller;
- $html = '';
+ $html = '';
$active = 0;
- $n = 0;
+ $n = 0;
foreach (Module::getActiveSidebars($this->record->getTree()) as $mod) {
if ($mod->hasSidebarContent()) {
$html .= '<h3 id="' . $mod->getName() . '"><a href="#">' . $mod->getTitle() . '</a></h3>';
diff --git a/app/Controller/LifespanController.php b/app/Controller/LifespanController.php
index afca613a07..7d94240bb5 100644
--- a/app/Controller/LifespanController.php
+++ b/app/Controller/LifespanController.php
@@ -22,19 +22,19 @@ use Fisharebest\ExtCalendar\GregorianCalendar;
* Class LifespanController - Controller for the timeline chart
*/
class LifespanController extends PageController {
- private $pids = array();
- public $people = array();
- public $place = '';
+ private $pids = array();
+ public $people = array();
+ public $place = '';
public $beginYear = 0;
- public $endYear = 0;
- public $YrowLoc = 125;
+ public $endYear = 0;
+ public $YrowLoc = 125;
// The following colours are deliberately omitted from the $colors list:
// Blue, Red, Black, White, Green
- private $colors = array('Aliceblue', 'Antiquewhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque', 'Blanchedalmond', 'Blueviolet', 'Brown', 'Burlywood', 'Cadetblue', 'Chartreuse', 'Chocolate', 'Coral', 'Cornflowerblue', 'Cornsilk', 'Crimson', 'Cyan', 'Darkcyan', 'Darkgoldenrod', 'Darkgray', 'Darkgreen', 'Darkkhaki', 'Darkmagenta', 'Darkolivegreen', 'Darkorange', 'Darkorchid', 'Darkred', 'Darksalmon', 'Darkseagreen', 'Darkslateblue', 'Darkturquoise', 'Darkviolet', 'Deeppink', 'Deepskyblue', 'Dimgray', 'Dodgerblue', 'Firebrick', 'Floralwhite', 'Forestgreen', 'Fuchsia', 'Gainsboro', 'Ghostwhite', 'Gold', 'Goldenrod', 'Gray', 'Greenyellow', 'Honeydew', 'Hotpink', 'Indianred', 'Ivory', 'Khaki', 'Lavender', 'Lavenderblush', 'Lawngreen', 'Lemonchiffon', 'Lightblue', 'Lightcoral', 'Lightcyan', 'Lightgoldenrodyellow', 'Lightgreen', 'Lightgrey', 'Lightpink', 'Lightsalmon', 'Lightseagreen', 'Lightskyblue', 'Lightslategray', 'Lightsteelblue', 'Lightyellow', 'Lime', 'Limegreen', 'Linen', 'Magenta', 'Maroon', 'Mediumaqamarine', ' Mediumblue', 'Mediumorchid', 'Mediumpurple', 'Mediumseagreen', 'Mediumslateblue', 'Mediumspringgreen', 'Mediumturquoise', 'Mediumvioletred', 'Mintcream', 'Mistyrose', 'Moccasin', 'Navajowhite', 'Oldlace', 'Olive', 'Olivedrab', 'Orange', 'Orangered', 'Orchid', 'Palegoldenrod', 'Palegreen', 'Paleturquoise', 'Palevioletred', 'Papayawhip', 'Peachpuff', 'Peru', 'Pink', 'Plum', 'Powderblue', 'Purple', 'Rosybrown', 'Royalblue', 'Saddlebrown', 'Salmon', 'Sandybrown', 'Seagreen', 'Seashell', 'Sienna', 'Silver', 'Skyblue', 'Slateblue', 'Slategray', 'Snow', 'Springgreen', 'Steelblue', 'Tan', 'Teal', 'Thistle', 'Tomato', 'Turquoise', 'Violet', 'Wheat', 'Whitesmoke', 'Yellow', 'YellowGreen');
- private $malecolorR = array(' 100', ' 110', ' 120', ' 130', ' 140', ' 150', ' 160', ' 170', ' 180', ' 190', ' 200', ' 210', ' 220', ' 230', ' 240', ' 250');
- private $malecolorG = array(' 100', ' 110', ' 120', ' 130', ' 140', ' 150', ' 160', ' 170', ' 180', ' 190', ' 200', ' 210', ' 220', ' 230', ' 240', ' 250');
- private $malecolorB = 255;
+ private $colors = array('Aliceblue', 'Antiquewhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque', 'Blanchedalmond', 'Blueviolet', 'Brown', 'Burlywood', 'Cadetblue', 'Chartreuse', 'Chocolate', 'Coral', 'Cornflowerblue', 'Cornsilk', 'Crimson', 'Cyan', 'Darkcyan', 'Darkgoldenrod', 'Darkgray', 'Darkgreen', 'Darkkhaki', 'Darkmagenta', 'Darkolivegreen', 'Darkorange', 'Darkorchid', 'Darkred', 'Darksalmon', 'Darkseagreen', 'Darkslateblue', 'Darkturquoise', 'Darkviolet', 'Deeppink', 'Deepskyblue', 'Dimgray', 'Dodgerblue', 'Firebrick', 'Floralwhite', 'Forestgreen', 'Fuchsia', 'Gainsboro', 'Ghostwhite', 'Gold', 'Goldenrod', 'Gray', 'Greenyellow', 'Honeydew', 'Hotpink', 'Indianred', 'Ivory', 'Khaki', 'Lavender', 'Lavenderblush', 'Lawngreen', 'Lemonchiffon', 'Lightblue', 'Lightcoral', 'Lightcyan', 'Lightgoldenrodyellow', 'Lightgreen', 'Lightgrey', 'Lightpink', 'Lightsalmon', 'Lightseagreen', 'Lightskyblue', 'Lightslategray', 'Lightsteelblue', 'Lightyellow', 'Lime', 'Limegreen', 'Linen', 'Magenta', 'Maroon', 'Mediumaqamarine', ' Mediumblue', 'Mediumorchid', 'Mediumpurple', 'Mediumseagreen', 'Mediumslateblue', 'Mediumspringgreen', 'Mediumturquoise', 'Mediumvioletred', 'Mintcream', 'Mistyrose', 'Moccasin', 'Navajowhite', 'Oldlace', 'Olive', 'Olivedrab', 'Orange', 'Orangered', 'Orchid', 'Palegoldenrod', 'Palegreen', 'Paleturquoise', 'Palevioletred', 'Papayawhip', 'Peachpuff', 'Peru', 'Pink', 'Plum', 'Powderblue', 'Purple', 'Rosybrown', 'Royalblue', 'Saddlebrown', 'Salmon', 'Sandybrown', 'Seagreen', 'Seashell', 'Sienna', 'Silver', 'Skyblue', 'Slateblue', 'Slategray', 'Snow', 'Springgreen', 'Steelblue', 'Tan', 'Teal', 'Thistle', 'Tomato', 'Turquoise', 'Violet', 'Wheat', 'Whitesmoke', 'Yellow', 'YellowGreen');
+ private $malecolorR = array(' 100', ' 110', ' 120', ' 130', ' 140', ' 150', ' 160', ' 170', ' 180', ' 190', ' 200', ' 210', ' 220', ' 230', ' 240', ' 250');
+ private $malecolorG = array(' 100', ' 110', ' 120', ' 130', ' 140', ' 150', ' 160', ' 170', ' 180', ' 190', ' 200', ' 210', ' 220', ' 230', ' 240', ' 250');
+ private $malecolorB = 255;
private $femalecolorR = 255;
private $femalecolorG = array(' 100', ' 110', ' 120', ' 130', ' 140', ' 150', ' 160', ' 170', ' 180', ' 190', ' 200', ' 210', ' 220', ' 230', ' 240', ' 250');
private $femalecolorB = array('250', ' 240', ' 230', ' 220', ' 210', ' 200', ' 190', ' 180', ' 170', ' 160', ' 150', ' 140', ' 130', ' 120', ' 110', ' 100');
@@ -54,7 +54,7 @@ class LifespanController extends PageController {
private $currentsex;
private $nonfacts = array(
- 'FAMS', 'FAMC', 'MAY', 'BLOB', 'OBJE', 'SEX', 'NAME', 'SOUR', 'NOTE', 'BAPL', 'ENDL', 'SLGC', 'SLGS', '_TODO', '_WT_OBJE_SORT', 'CHAN', 'HUSB', 'WIFE', 'CHIL', 'BIRT', 'DEAT', 'BURI'
+ 'FAMS', 'FAMC', 'MAY', 'BLOB', 'OBJE', 'SEX', 'NAME', 'SOUR', 'NOTE', 'BAPL', 'ENDL', 'SLGC', 'SLGS', '_TODO', '_WT_OBJE_SORT', 'CHAN', 'HUSB', 'WIFE', 'CHIL', 'BIRT', 'DEAT', 'BURI',
);
/**
@@ -194,7 +194,7 @@ class LifespanController extends PageController {
* Add a person (and optionally their immediate family members) to the pids array
*
* @param Individual $person
- * @param boolean $add_family
+ * @param bool $add_family
*/
private function addFamily(Individual $person, $add_family) {
$this->pids[] = $person->getXref();
@@ -224,10 +224,10 @@ class LifespanController extends PageController {
/**
* Sets the start year and end year to a factor of 5
*
- * @param integer $year
- * @param integer $key
+ * @param int $year
+ * @param int $key
*
- * @return integer
+ * @return int
*/
private function modifyYear($year, $key) {
$temp = $year;
@@ -259,8 +259,8 @@ class LifespanController extends PageController {
/**
* Prints the time line
*
- * @param integer $startYear
- * @param integer $endYear
+ * @param int $startYear
+ * @param int $endYear
*/
public function printTimeline($startYear, $endYear) {
$leftPosition = 14; //start point
@@ -285,9 +285,9 @@ class LifespanController extends PageController {
* Method used to place the person boxes onto the timeline
*
* @param Individual[] $ar
- * @param integer $top
+ * @param int $top
*
- * @return integer
+ * @return int
*/
public function fillTimeline($ar, $top) {
global $maxX, $zindex;
@@ -553,8 +553,8 @@ class LifespanController extends PageController {
/**
* Search for people who had events in a given year range
*
- * @param integer $startyear
- * @param integer $endyear
+ * @param int $startyear
+ * @param int $endyear
*
* @return Individual[]
*/
diff --git a/app/Controller/MediaController.php b/app/Controller/MediaController.php
index 22ab213b70..291e0bf683 100644
--- a/app/Controller/MediaController.php
+++ b/app/Controller/MediaController.php
@@ -26,7 +26,7 @@ class MediaController extends GedcomRecordController {
public function __construct() {
global $WT_TREE;
- $xref = Filter::get('mid', WT_REGEX_XREF);
+ $xref = Filter::get('mid', WT_REGEX_XREF);
$this->record = Media::getInstance($xref, $WT_TREE);
parent::__construct();
diff --git a/app/Controller/PageController.php b/app/Controller/PageController.php
index 5782a1b36d..36e0fd312e 100644
--- a/app/Controller/PageController.php
+++ b/app/Controller/PageController.php
@@ -29,7 +29,7 @@ class PageController extends BaseController {
/** @var string <head><title> $page_title </title></head> */
private $page_title = WT_WEBTREES;
- /** @var boolean Is this a popup window? */
+ /** @var bool Is this a popup window? */
private $popup;
/**
@@ -101,7 +101,7 @@ class PageController extends BaseController {
/**
* Restrict access
*
- * @param boolean $condition
+ * @param bool $condition
*
* @return $this
*/
@@ -116,8 +116,6 @@ class PageController extends BaseController {
/**
* Print the page footer, using the theme
- *
- * @return void
*/
public function pageFooter() {
echo
@@ -140,8 +138,6 @@ class PageController extends BaseController {
/**
* Print the page footer, using the theme
* Note that popup windows are deprecated
- *
- * @return void
*/
public function pageFooterPopupWindow() {
echo
@@ -164,7 +160,7 @@ class PageController extends BaseController {
/**
* Print the page header, using the theme
*
- * @param boolean $popup Is this a popup window
+ * @param bool $popup Is this a popup window
*
* @return $this
*/
diff --git a/app/Controller/PedigreeController.php b/app/Controller/PedigreeController.php
index 6a0a5a5808..1c7d1a342a 100644
--- a/app/Controller/PedigreeController.php
+++ b/app/Controller/PedigreeController.php
@@ -20,7 +20,6 @@ namespace Fisharebest\Webtrees;
* Class PedigreeController - Controller for the pedigree chart
*/
class PedigreeController extends ChartController {
-
/**
* Chart orientation codes
* Dont change them! the offset calculations rely on this order
@@ -29,23 +28,23 @@ class PedigreeController extends ChartController {
const LANDSCAPE = 1;
const OLDEST_AT_TOP = 2;
const OLDEST_AT_BOTTOM = 3;
- const MENU_ITEM = '<a href="pedigree.php?rootid=%s&amp;show_full=%s&amp;PEDIGREE_GENERATIONS=%s&amp;orientation=%s" class="%s noprint">%s</a>';
+ const MENU_ITEM = '<a href="pedigree.php?rootid=%s&amp;show_full=%s&amp;PEDIGREE_GENERATIONS=%s&amp;orientation=%s" class="%s noprint">%s</a>';
/**
* Next and previous generation arrow size
*/
const ARROW_SIZE = 22; //pixels
- /** @var integer Selected chart layout */
+ /** @var int Selected chart layout */
public $orientation;
- /** @var integer Number of generation to display */
+ /** @var int Number of generation to display */
public $generations;
/** @var array data pertaining to each chart node */
public $nodes = array();
- /** @var integer Number of nodes in the chart */
+ /** @var int Number of nodes in the chart */
public $treesize;
/** @var bool Are there ancestors beyond the bounds of this chart */
@@ -105,20 +104,20 @@ class PedigreeController extends ChartController {
case self::LANDSCAPE:
$this->arrows->prevGen = I18N::direction() === 'rtl' ? 'icon-larrow' : 'icon-rarrow';
$this->arrows->menu = I18N::direction() === 'rtl' ? 'icon-rarrow' : 'icon-larrow';
- $addoffset['x'] = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
- $addoffset['y'] = 0;
+ $addoffset['x'] = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
+ $addoffset['y'] = 0;
break;
case self::OLDEST_AT_TOP:
$this->arrows->prevGen = 'icon-uarrow';
$this->arrows->menu = 'icon-darrow';
- $addoffset['x'] = 0;
- $addoffset['y'] = $this->root->getSpouseFamilies() ? self::ARROW_SIZE : 0;
+ $addoffset['x'] = 0;
+ $addoffset['y'] = $this->root->getSpouseFamilies() ? self::ARROW_SIZE : 0;
break;
case self::OLDEST_AT_BOTTOM:
$this->arrows->prevGen = 'icon-darrow';
$this->arrows->menu = 'icon-uarrow';
- $addoffset['x'] = 0;
- $addoffset['y'] = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
+ $addoffset['x'] = 0;
+ $addoffset['y'] = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
break;
}
@@ -137,10 +136,10 @@ class PedigreeController extends ChartController {
$boxpos = $i - pow(2, $this->generations - $curgen);
// -- offset multiple for current generation
if ($this->orientation < self::OLDEST_AT_TOP) {
- $genoffset = pow(2, $curgen - $this->orientation);
+ $genoffset = pow(2, $curgen - $this->orientation);
$boxspacing = $this->getBoxDimensions()->height + $byspacing;
} else {
- $genoffset = pow(2, $curgen - 1);
+ $genoffset = pow(2, $curgen - 1);
$boxspacing = $this->getBoxDimensions()->width + $byspacing;
}
// -- calculate the yoffset position in the generation put child between parents
@@ -161,7 +160,7 @@ class PedigreeController extends ChartController {
$yoffset = $yoffset + (($boxspacing / 2) * ($curgen - 1));
}
$parent = (int) (($i - 1) / 2);
- $pgen = $curgen;
+ $pgen = $curgen;
while ($parent > 0) {
if ($parent % 2 == 0) {
$yoffset = $yoffset - (($boxspacing / 2) * $pgen);
@@ -243,7 +242,6 @@ class PedigreeController extends ChartController {
return $item['y'];
}, $this->nodes));
-
$this->chartsize['x'] = $max_xoffset + $bxspacing + $this->getBoxDimensions()->width + $addoffset['x'];
$this->chartsize['y'] = $max_yoffset + $byspacing + $this->getBoxDimensions()->height + $addoffset['y'];
}
@@ -257,7 +255,7 @@ class PedigreeController extends ChartController {
*/
public function get_menu() {
$famids = $this->root->getSpouseFamilies();
- $html = '';
+ $html = '';
if ($famids) {
$html = sprintf('<div id="childarrow"><a href="#" class="menuselect noprint %s"></a><div id="childbox">', $this->arrows->menu);
@@ -291,6 +289,7 @@ class PedigreeController extends ChartController {
'</div>' . // #childbox
'</div>'; // #childarrow
}
+
return $html;
}
@@ -299,7 +298,8 @@ class PedigreeController extends ChartController {
*
* Create a link to generate a new chart based on the correct parent of the individual with this index
*
- * @param integer $index
+ * @param int $index
+ *
* @return string
*/
public function gotoPreviousGen($index) {
@@ -308,7 +308,7 @@ class PedigreeController extends ChartController {
if ($this->nodes[$index]['indi'] && $this->nodes[$index]['indi']->getChildFamilies()) {
$html .= '<div class="ancestorarrow">';
$rootParentId = 1;
- if ($index > (int)($this->treesize / 2) + (int)($this->treesize / 4)) {
+ if ($index > (int) ($this->treesize / 2) + (int) ($this->treesize / 4)) {
$rootParentId++;
}
$html .= sprintf(self::MENU_ITEM, $this->nodes[$rootParentId]['indi']->getXref(), $this->showFull(), $this->generations, $this->orientation, $this->arrows->prevGen, '');
@@ -317,6 +317,7 @@ class PedigreeController extends ChartController {
$html .= '<div class="spacer"></div>';
}
}
+
return $html;
}
}
diff --git a/app/Controller/RelationshipController.php b/app/Controller/RelationshipController.php
index c40d2d345b..0384953e39 100644
--- a/app/Controller/RelationshipController.php
+++ b/app/Controller/RelationshipController.php
@@ -27,7 +27,7 @@ class RelationshipController extends PageController {
*
* @param Individual $individual1
* @param Individual $individual2
- * @param boolean $all
+ * @param bool $all
*
* @return string[][]
*/
@@ -35,7 +35,7 @@ class RelationshipController extends PageController {
$rows = Database::prepare(
"SELECT l_from, l_to FROM `##link` WHERE l_file = :tree_id AND l_type IN ('FAMS', 'FAMC', 'CHIL', 'HUSB', 'WIFE')"
)->execute(array(
- 'tree_id' => $individual1->getTree()->getTreeId()
+ 'tree_id' => $individual1->getTree()->getTreeId(),
))->fetchAll();
$graph = array();
@@ -60,7 +60,7 @@ class RelationshipController extends PageController {
while (list(, $next) = each($queue)) {
// For each family on the path
for ($n = count($next['path']) - 2; $n >= 1; $n -= 2) {
- $exclude = $next['exclude'];
+ $exclude = $next['exclude'];
$exclude[] = $next['path'][$n];
sort($exclude);
$tmp = implode('-', $exclude);
diff --git a/app/Controller/RepositoryController.php b/app/Controller/RepositoryController.php
index 21ff8c823d..3eb4d924a0 100644
--- a/app/Controller/RepositoryController.php
+++ b/app/Controller/RepositoryController.php
@@ -44,7 +44,7 @@ class RepositoryController extends GedcomRecordController {
$menu = new Menu(I18N::translate('Edit'), '#', 'menu-repo');
if (Auth::isEditor($this->record->getTree())) {
- $fact = $this->record->getFirstFact('NAME');
+ $fact = $this->record->getFirstFact('NAME');
$submenu = new Menu(I18N::translate('Edit repository'), '#', 'menu-repo-edit');
if ($fact) {
// Edit existing name
diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php
index 3c5d84e47a..7daeaa5c32 100644
--- a/app/Controller/SearchController.php
+++ b/app/Controller/SearchController.php
@@ -74,16 +74,16 @@ class SearchController extends PageController {
/** @var string @var string Replace parameter */
public $replace = '';
- /** @var boolean @var string Replace parameter */
+ /** @var bool @var string Replace parameter */
public $replaceNames = false;
- /** @var boolean @var string Replace parameter */
+ /** @var bool @var string Replace parameter */
public $replacePlaces = false;
- /** @var boolean @var string Replace parameter */
+ /** @var bool @var string Replace parameter */
public $replaceAll = false;
- /** @var boolean @var string Replace parameter */
+ /** @var bool @var string Replace parameter */
public $replacePlacesWord = false;
/**
@@ -185,10 +185,10 @@ class SearchController extends PageController {
break;
case 'replace':
$this->search_trees = array($WT_TREE);
- $this->srindi = 'checked';
- $this->srfams = 'checked';
- $this->srsour = 'checked';
- $this->srnote = 'checked';
+ $this->srindi = 'checked';
+ $this->srfams = 'checked';
+ $this->srsour = 'checked';
+ $this->srnote = 'checked';
if (Filter::post('query')) {
$this->searchAndReplace($WT_TREE);
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=replace&query=' . Filter::escapeUrl($this->query) . '&replace=' . Filter::escapeUrl($this->replace) . '&replaceAll=' . $this->replaceAll . '&replaceNames=' . $this->replaceNames . '&replacePlaces=' . $this->replacePlaces . '&replacePlacesWord=' . $this->replacePlacesWord);
@@ -430,9 +430,6 @@ class SearchController extends PageController {
*
* The names' Soundex SQL table contains all the soundex values twice
* The places table contains only one value
- *
- * The code should be improved - see RFE
- *
*/
private function soundexSearch() {
if (((!empty($this->lastname)) || (!empty($this->firstname)) || (!empty($this->place))) && $this->search_trees) {
diff --git a/app/Controller/SimpleController.php b/app/Controller/SimpleController.php
index ecbf3d8422..597cbdc7f4 100644
--- a/app/Controller/SimpleController.php
+++ b/app/Controller/SimpleController.php
@@ -32,7 +32,7 @@ class SimpleController extends PageController {
/**
* Simple (i.e. popup) windows are deprecated.
*
- * @param boolean $popup
+ * @param bool $popup
*
* @return $this
*/
@@ -43,7 +43,7 @@ class SimpleController extends PageController {
/**
* Restrict access
*
- * @param boolean $condition
+ * @param bool $condition
*
* @return $this
*/
diff --git a/app/Controller/SourceController.php b/app/Controller/SourceController.php
index 1c78a02c5a..845f61d5e2 100644
--- a/app/Controller/SourceController.php
+++ b/app/Controller/SourceController.php
@@ -44,7 +44,7 @@ class SourceController extends GedcomRecordController {
$menu = new Menu(I18N::translate('Edit'), '#', 'menu-sour');
if (Auth::isEditor($this->record->getTree())) {
- $fact = $this->record->getFirstFact('TITL');
+ $fact = $this->record->getFirstFact('TITL');
$submenu = new Menu(I18N::translate('Edit source'), '#', 'menu-sour-edit');
if ($fact) {
// Edit existing name
diff --git a/app/Controller/TimelineController.php b/app/Controller/TimelineController.php
index 551f8d93c9..de86a6dd3f 100644
--- a/app/Controller/TimelineController.php
+++ b/app/Controller/TimelineController.php
@@ -20,7 +20,7 @@ namespace Fisharebest\Webtrees;
* Class TimelineController - Controller for the timeline chart
*/
class TimelineController extends PageController {
- /** @var integer Height of the age box */
+ /** @var int Height of the age box */
public $bheight = 30;
/** @var Fact[] The facts to display on the chart */
@@ -35,10 +35,10 @@ class TimelineController extends PageController {
/** @var integer[] Numeric birth days of each individual */
public $birthdays = array();
- /** @var integer Lowest year to display */
+ /** @var int Lowest year to display */
public $baseyear = 0;
- /** @var integer Highest year to display */
+ /** @var int Highest year to display */
public $topyear = 0;
/** @var string[] List of individual XREFs to display */
@@ -50,7 +50,7 @@ class TimelineController extends PageController {
/** @var string URL-encoded list of XREFs */
public $pidlinks = '';
- /** @var integer Vertical scale */
+ /** @var int Vertical scale */
public $scale = 2;
// GEDCOM elements that may have DATE data, but should not be displayed
diff --git a/app/Database.php b/app/Database.php
index 221af0bbbe..8eaecd13e2 100644
--- a/app/Database.php
+++ b/app/Database.php
@@ -63,8 +63,6 @@ class Database {
/**
* Disconnect from the server, so we can connect to another one
- *
- * @return void
*/
public static function disconnect() {
self::$pdo = null;
@@ -96,7 +94,7 @@ class Database {
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,
PDO::ATTR_CASE => PDO::CASE_LOWER,
- PDO::ATTR_AUTOCOMMIT => true
+ PDO::ATTR_AUTOCOMMIT => true,
)
);
self::$pdo->exec("SET NAMES UTF8");
@@ -107,9 +105,9 @@ class Database {
/**
* We don't access $instance directly, only via query(), exec() and prepare()
*
- * @return Database
- *
* @throws \Exception
+ *
+ * @return Database
*/
public static function getInstance() {
if (self::$pdo instanceof PDO) {
@@ -122,7 +120,7 @@ class Database {
/**
* Are we currently connected to a database?
*
- * @return boolean
+ * @return bool
*/
public static function isConnected() {
return self::$pdo instanceof PDO;
@@ -132,11 +130,9 @@ class Database {
* Log the details of a query, for debugging and analysis.
*
* @param string $query
- * @param integer $rows
- * @param double $microtime
+ * @param int $rows
+ * @param float $microtime
* @param string[] $bind_variables
- *
- * @return void
*/
public static function logQuery($query, $rows, $microtime, $bind_variables) {
if (WT_DEBUG_SQL) {
@@ -187,7 +183,7 @@ class Database {
/**
* Determine the number of queries executed, for the page statistics.
*
- * @return integer
+ * @return int
*/
public static function getQueryCount() {
return count(self::$log);
@@ -199,7 +195,7 @@ class Database {
* @return string
*/
public static function getQueryLog() {
- $html = '<table border="1" style="table-layout: fixed; width: 960px;word-wrap: break-word;"><col span="3"><col align="char"><thead><tr><th>#</th><th style="width: 800px;">Query</th><th>Rows</th><th>Time (ms)</th></tr></thead><tbody>' . implode('', self::$log) . '</tbody></table>';
+ $html = '<table border="1" style="table-layout: fixed; width: 960px;word-wrap: break-word;"><col span="3"><col align="char"><thead><tr><th>#</th><th style="width: 800px;">Query</th><th>Rows</th><th>Time (ms)</th></tr></thead><tbody>' . implode('', self::$log) . '</tbody></table>';
self::$log = array();
return $html;
@@ -238,13 +234,13 @@ class Database {
*
* @param string $sql The SQL statement to execute
*
- * @return integer The number of rows affected by this SQL query
+ * @return int The number of rows affected by this SQL query
*/
public static function exec($sql) {
- $sql = str_replace('##', WT_TBLPREFIX, $sql);
+ $sql = str_replace('##', WT_TBLPREFIX, $sql);
$start = microtime(true);
- $rows = self::$pdo->exec($sql);
- $end = microtime(true);
+ $rows = self::$pdo->exec($sql);
+ $end = microtime(true);
self::logQuery($sql, $rows, $end - $start, array());
return $rows;
@@ -255,8 +251,9 @@ class Database {
*
* @param $sql
*
- * @return Statement
* @throws \Exception
+ *
+ * @return Statement
*/
public static function prepare($sql) {
if (!self::$pdo instanceof PDO) {
@@ -286,9 +283,8 @@ class Database {
*
* @param string $schema_dir
* @param string $schema_name
- * @param integer $target_version
+ * @param int $target_version
*
- * @return void
* @throws \Exception
*/
public static function updateSchema($schema_dir, $schema_name, $target_version) {
diff --git a/app/Date.php b/app/Date.php
index 0a7f8b7150..8df95929c3 100644
--- a/app/Date.php
+++ b/app/Date.php
@@ -106,8 +106,9 @@ class Date {
*
* @param string $date
*
- * @return CalendarDate
* @throws \DomainException
+ *
+ * @return CalendarDate
*/
private function parseDate($date) {
// Valid calendar escape specified? - use it
@@ -199,7 +200,6 @@ class Date {
}
}
-
/**
* A list of supported calendars and their names.
*
@@ -219,9 +219,9 @@ class Date {
/**
* Convert a date to the preferred format and calendar(s) display.
*
- * @param boolean|null $url Wrap the date in a link to calendar.php
- * @param string|null $date_format Override the default date format
- * @param boolean|null $convert_calendars Convert the date into other calendars
+ * @param bool|null $url Wrap the date in a link to calendar.php
+ * @param string|null $date_format Override the default date format
+ * @param bool|null $convert_calendars Convert the date into other calendars
*
* @return string
*/
@@ -385,7 +385,7 @@ class Date {
/**
* Get the earliest Julian day number from this GEDCOM date.
*
- * @return integer
+ * @return int
*/
public function minimumJulianDay() {
return $this->minimumDate()->minJD;
@@ -394,7 +394,7 @@ class Date {
/**
* Get the latest Julian day number from this GEDCOM date.
*
- * @return integer
+ * @return int
*/
public function maximumJulianDay() {
return $this->maximumDate()->maxJD;
@@ -406,7 +406,7 @@ class Date {
* For a month-only date, this would be somewhere around the 16th day.
* For a year-only date, this would be somewhere around 1st July.
*
- * @return integer
+ * @return int
*/
public function julianDay() {
return (int) (($this->minimumJulianDay() + $this->maximumJulianDay()) / 2);
@@ -418,8 +418,8 @@ class Date {
* This is typically used to create an estimated death date,
* which is before a certain number of years after the birth date.
*
- * @param integer $years - a number of years, positive or negative
- * @param string $qualifier - typically “BEF” or “AFT”
+ * @param int $years a number of years, positive or negative
+ * @param string $qualifier typically “BEF” or “AFT”
*
* @return Date
*/
@@ -439,12 +439,13 @@ class Date {
/**
* Calculate the the age of a person, on a date.
*
- * @param Date $d1
- * @param Date $d2
- * @param integer $format
+ * @param Date $d1
+ * @param Date $d2
+ * @param int $format
*
- * @return int|string
* @throws \InvalidArgumentException
+ *
+ * @return int|string
*/
public static function getAge(Date $d1, Date $d2 = null, $format = 0) {
if ($d2) {
@@ -497,7 +498,7 @@ class Date {
*
* @param Date $d1
* @param Date|null $d2
- * @param boolean $warn_on_negative
+ * @param bool $warn_on_negative
*
* @return string
*/
@@ -527,7 +528,7 @@ class Date {
* @param Date $a
* @param Date $b
*
- * @return integer
+ * @return int
*/
public static function compare(Date $a, Date $b) {
// Get min/max JD for each date.
@@ -578,7 +579,7 @@ class Date {
* An incomplete date such as "12 AUG" would be invalid, as
* we cannot sort it.
*
- * @return boolean
+ * @return bool
*/
public function isOK() {
return $this->minimumJulianDay() && $this->maximumJulianDay();
@@ -590,12 +591,12 @@ class Date {
* jewish/arabic users. This is only for interfacing with external entities,
* such as the ancestry.com search interface or the dated fact icons.
*
- * @return integer
+ * @return int
*/
public function gregorianYear() {
if ($this->isOK()) {
$gregorian_calendar = new GregorianCalendar;
- list($year) = $gregorian_calendar->jdToYmd($this->julianDay());
+ list($year) = $gregorian_calendar->jdToYmd($this->julianDay());
return $year;
} else {
diff --git a/app/Date/CalendarDate.php b/app/Date/CalendarDate.php
index 9c43571bc9..7e0eed739c 100644
--- a/app/Date/CalendarDate.php
+++ b/app/Date/CalendarDate.php
@@ -41,19 +41,19 @@ class CalendarDate {
/** @var CalendarInterface The calendar system used to represent this date */
protected $calendar;
- /** @var integer Year number */
+ /** @var int Year number */
public $y;
- /** @var integer Month number */
+ /** @var int Month number */
public $m;
- /** @var integer Day number */
+ /** @var int Day number */
public $d;
- /** @var integer Earliest Julian day number (start of month/year for imprecise dates) */
+ /** @var int Earliest Julian day number (start of month/year for imprecise dates) */
public $minJD;
- /** @var integer Latest Julian day number (end of month/year for imprecise dates) */
+ /** @var int Latest Julian day number (end of month/year for imprecise dates) */
public $maxJD;
/**
@@ -67,8 +67,8 @@ class CalendarDate {
public function __construct($date) {
// Construct from an integer (a julian day number)
if (is_integer($date)) {
- $this->minJD = $date;
- $this->maxJD = $date;
+ $this->minJD = $date;
+ $this->maxJD = $date;
list($this->y, $this->m, $this->d) = $this->calendar->jdToYmd($date);
return;
@@ -132,7 +132,7 @@ class CalendarDate {
/**
* Is the current year a leap year?
*
- * @return boolean
+ * @return bool
*/
public function isLeapYear() {
return $this->calendar->isLeapYear($this->y);
@@ -150,8 +150,8 @@ class CalendarDate {
$this->maxJD = $this->calendar->ymdToJd($this->nextYear($this->y), 1, 1) - 1;
} elseif ($this->d == 0) {
list($ny, $nm) = $this->nextMonth();
- $this->minJD = $this->calendar->ymdToJd($this->y, $this->m, 1);
- $this->maxJD = $this->calendar->ymdToJd($ny, $nm, 1) - 1;
+ $this->minJD = $this->calendar->ymdToJd($this->y, $this->m, 1);
+ $this->maxJD = $this->calendar->ymdToJd($ny, $nm, 1) - 1;
} else {
$this->minJD = $this->calendar->ymdToJd($this->y, $this->m, $this->d);
$this->maxJD = $this->minJD;
@@ -163,8 +163,8 @@ class CalendarDate {
*
* We put these in the base class, to save duplicating it in the Julian and Gregorian calendars.
*
- * @param integer $month_number
- * @param boolean $leap_year Some calendars use leap months
+ * @param int $month_number
+ * @param bool $leap_year Some calendars use leap months
*
* @return string
*/
@@ -197,8 +197,8 @@ class CalendarDate {
*
* We put these in the base class, to save duplicating it in the Julian and Gregorian calendars.
*
- * @param integer $month_number
- * @param boolean $leap_year Some calendars use leap months
+ * @param int $month_number
+ * @param bool $leap_year Some calendars use leap months
*
* @return string
*/
@@ -231,8 +231,8 @@ class CalendarDate {
*
* We put these in the base class, to save duplicating it in the Julian and Gregorian calendars.
*
- * @param integer $month_number
- * @param boolean $leap_year Some calendars use leap months
+ * @param int $month_number
+ * @param bool $leap_year Some calendars use leap months
*
* @return string
*/
@@ -265,8 +265,8 @@ class CalendarDate {
*
* We put these in the base class, to save duplicating it in the Julian and Gregorian calendars.
*
- * @param integer $month_number
- * @param boolean $leap_year Some calendars use leap months
+ * @param int $month_number
+ * @param bool $leap_year Some calendars use leap months
*
* @return string
*/
@@ -297,8 +297,8 @@ class CalendarDate {
/**
* Abbreviated month name
*
- * @param integer $month_number
- * @param boolean $leap_year Some calendars use leap months
+ * @param int $month_number
+ * @param bool $leap_year Some calendars use leap months
*
* @return string
*/
@@ -329,7 +329,7 @@ class CalendarDate {
/**
* Full day of th eweek
*
- * @param integer $day_number
+ * @param int $day_number
*
* @return string
*/
@@ -354,7 +354,7 @@ class CalendarDate {
/**
* Abbreviated day of the week
*
- * @param integer $day_number
+ * @param int $day_number
*
* @return string
*/
@@ -379,9 +379,9 @@ class CalendarDate {
/**
* Most years are 1 more than the previous, but not always (e.g. 1BC->1AD)
*
- * @param integer $year
+ * @param int $year
*
- * @return integer
+ * @return int
*/
protected function nextYear($year) {
return $year + 1;
@@ -392,7 +392,7 @@ class CalendarDate {
*
* @param string $year
*
- * @return integer
+ * @return int
*/
protected function extractYear($year) {
return (int) $year;
@@ -404,7 +404,7 @@ class CalendarDate {
* @param CalendarDate $d1
* @param CalendarDate $d2
*
- * @return integer
+ * @return int
*/
public static function compare(CalendarDate $d1, CalendarDate $d2) {
if ($d1->maxJD < $d2->minJD) {
@@ -423,9 +423,9 @@ class CalendarDate {
*
* @todo JewishDate needs to redefine this to cope with leap months
*
- * @param boolean $full true=gedcom style, false=just years
- * @param integer $jd date for calculation
- * @param boolean $warn_on_negative show a warning triangle for negative ages
+ * @param bool $full true=gedcom style, false=just years
+ * @param int $jd date for calculation
+ * @param bool $warn_on_negative show a warning triangle for negative ages
*
* @return string
*/
@@ -443,9 +443,9 @@ class CalendarDate {
return '<i class="icon-warning"></i>';
}
list($y, $m, $d) = $this->calendar->jdToYmd($jd);
- $dy = $y - $this->y;
- $dm = $m - max($this->m, 1);
- $dd = $d - max($this->d, 1);
+ $dy = $y - $this->y;
+ $dm = $m - max($this->m, 1);
+ $dd = $d - max($this->d, 1);
if ($dd < 0) {
$dm--;
}
@@ -500,7 +500,7 @@ class CalendarDate {
/**
* Is this date within the valid range of the calendar
*
- * @return boolean
+ * @return bool
*/
public function inValidRange() {
return $this->minJD >= $this->calendar->jdStart() && $this->maxJD <= $this->calendar->jdEnd();
@@ -509,7 +509,7 @@ class CalendarDate {
/**
* How many months in a year
*
- * @return integer
+ * @return int
*/
public function monthsInYear() {
return $this->calendar->monthsInYear();
@@ -518,7 +518,7 @@ class CalendarDate {
/**
* How many days in the current month
*
- * @return integer
+ * @return int
*/
public function daysInMonth() {
try {
@@ -533,7 +533,7 @@ class CalendarDate {
/**
* How many days in the current week
*
- * @return integer
+ * @return int
*/
public function daysInWeek() {
return $this->calendar->daysInWeek();
@@ -851,7 +851,7 @@ class CalendarDate {
/**
* Convert a decimal number to roman numerals
*
- * @param integer $number
+ * @param int $number
*
* @return string
*/
@@ -876,7 +876,7 @@ class CalendarDate {
*
* @param string $roman
*
- * @return integer
+ * @return int
*/
protected function romanNumeralsToNumber($roman) {
$num = 0;
diff --git a/app/Date/JulianDate.php b/app/Date/JulianDate.php
index a13e994a7e..c0fdb8989d 100644
--- a/app/Date/JulianDate.php
+++ b/app/Date/JulianDate.php
@@ -23,7 +23,7 @@ use Fisharebest\ExtCalendar\JulianCalendar;
* (Proleptic means we extend it backwards, prior to its introduction in 46BC)
*/
class JulianDate extends CalendarDate {
- /** @var boolean True for dates recorded in new-style/old-style format, e.g. 2 FEB 1743/44 */
+ /** @var bool True for dates recorded in new-style/old-style format, e.g. 2 FEB 1743/44 */
private $new_old_style = false;
/** {@inheritdoc} */
diff --git a/app/Fact.php b/app/Fact.php
index 8e79348834..383679f063 100644
--- a/app/Fact.php
+++ b/app/Fact.php
@@ -32,10 +32,10 @@ class Fact {
/** @var string The GEDCOM tag for this record */
private $tag;
- /** @var boolean Is this a recently deleted fact, pending approval? */
+ /** @var bool Is this a recently deleted fact, pending approval? */
private $pending_deletion = false;
- /** @var boolean Is this a recently added fact, pending approval? */
+ /** @var bool Is this a recently added fact, pending approval? */
private $pending_addition = false;
/** @var Date The date of this fact, from the “2 DATE …” attribute */
@@ -44,7 +44,7 @@ class Fact {
/** @var Place The place of this fact, from the “2 PLAC …” attribute */
private $place;
- /** @var integer Temporary(!) variable Used by sort_facts() */
+ /** @var int Temporary(!) variable Used by sort_facts() */
public $sortOrder;
/**
@@ -129,9 +129,9 @@ class Fact {
/**
* Do the privacy rules allow us to display this fact to the current user
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
- * @return boolean
+ * @return bool
*/
public function canShow($access_level = null) {
if ($access_level === null) {
@@ -167,7 +167,7 @@ class Fact {
/**
* Check whether this fact is protected against edit
*
- * @return boolean
+ * @return bool
*/
public function canEdit() {
// Managers can edit anything
@@ -284,7 +284,7 @@ class Fact {
/**
* Is this a newly deleted fact, pending approval.
*
- * @return boolean
+ * @return bool
*/
public function isPendingDeletion() {
return $this->pending_deletion;
@@ -301,7 +301,7 @@ class Fact {
/**
* Is this a newly added fact, pending approval.
*
- * @return boolean
+ * @return bool
*/
public function isPendingAddition() {
return $this->pending_addition;
@@ -415,7 +415,7 @@ class Fact {
* @param Fact $a Fact one
* @param Fact $b Fact two
*
- * @return integer
+ * @return int
*/
public static function compareDate(Fact $a, Fact $b) {
if ($a->getDate()->isOK() && $b->getDate()->isOK()) {
@@ -445,7 +445,7 @@ class Fact {
* @param Fact $a Fact one
* @param Fact $b Fact two
*
- * @return integer
+ * @return int
*/
public static function compareType(Fact $a, Fact $b) {
global $factsort;
diff --git a/app/Family.php b/app/Family.php
index 7cb1a9a59a..11992c4f91 100644
--- a/app/Family.php
+++ b/app/Family.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class Family extends GedcomRecord {
const RECORD_TYPE = 'FAM';
- const URL_PREFIX = 'family.php?famid=';
+ const URL_PREFIX = 'family.php?famid=';
/** @var Individual|null The husband (or first spouse for same-sex couples) */
private $husb;
@@ -164,7 +164,7 @@ class Family extends GedcomRecord {
/**
* Get the (zero, one or two) spouses from this family.
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
* @return Individual[]
*/
@@ -187,7 +187,7 @@ class Family extends GedcomRecord {
/**
* Get a list of this family’s children.
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
* @return Individual[]
*/
@@ -215,7 +215,7 @@ class Family extends GedcomRecord {
* @param Family $x
* @param Family $y
*
- * @return integer
+ * @return int
*/
public static function compareMarrDate(Family $x, Family $y) {
return Date::compare($x->getMarriageDate(), $y->getMarriageDate());
@@ -224,7 +224,7 @@ class Family extends GedcomRecord {
/**
* Number of children - for the individual list
*
- * @return integer
+ * @return int
*/
public function getNumberOfChildren() {
$nchi = count($this->getChildren());
@@ -261,7 +261,7 @@ class Family extends GedcomRecord {
/**
* Get the marriage year - displayed on lists of families
*
- * @return integer
+ * @return int
*/
public function getMarriageYear() {
return $this->getMarriageDate()->minimumDate()->y;
diff --git a/app/File.php b/app/File.php
index 37eda3abc4..ba076674f0 100644
--- a/app/File.php
+++ b/app/File.php
@@ -34,9 +34,9 @@ class File {
* @return null|string
*/
public static function fetchUrl($url, $stream = null) {
- $host = parse_url($url, PHP_URL_HOST);
- $port = parse_url($url, PHP_URL_PORT);
- $path = parse_url($url, PHP_URL_PATH);
+ $host = parse_url($url, PHP_URL_HOST);
+ $port = parse_url($url, PHP_URL_PORT);
+ $path = parse_url($url, PHP_URL_PATH);
$query = parse_url($url, PHP_URL_QUERY);
if (!$port) {
@@ -89,7 +89,7 @@ class File {
*
* @param string $path
*
- * @return boolean Was the file deleted
+ * @return bool Was the file deleted
*/
public static function delete($path) {
if (is_dir($path)) {
@@ -121,7 +121,7 @@ class File {
*
* @param string $path
*
- * @return boolean Does the folder now exist
+ * @return bool Does the folder now exist
*/
public static function mkdir($path) {
if (is_dir($path)) {
diff --git a/app/Filter.php b/app/Filter.php
index 026cb4a6e7..92e50f65c3 100644
--- a/app/Filter.php
+++ b/app/Filter.php
@@ -165,7 +165,7 @@ class Filter {
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', $HTML_PURIFIER_CACHE_DIR);
$purifier = new HTMLPurifier($config);
- $text = $purifier->purify($text);
+ $text = $purifier->purify($text);
return $text;
}
@@ -204,6 +204,7 @@ class Filter {
},
)
);
+
return ($tmp === null || $tmp === false) ? $default : $tmp;
}
}
@@ -234,6 +235,7 @@ class Filter {
),
)
);
+
return $tmp[$variable] ?: array();
} else {
// PHP5.3 requires the $tmp variable
@@ -245,10 +247,11 @@ class Filter {
'filter' => FILTER_CALLBACK,
'options' => function ($x) {
return !function_exists('mb_convert_encoding') || mb_check_encoding($x, 'UTF-8') ? $x : false;
- }
+ },
),
)
);
+
return $tmp[$variable] ?: array();
}
}
@@ -284,7 +287,7 @@ class Filter {
*
* @param string $variable
*
- * @return boolean
+ * @return bool
*/
public static function getBool($variable) {
return (bool) filter_input(INPUT_GET, $variable, FILTER_VALIDATE_BOOLEAN);
@@ -293,15 +296,15 @@ class Filter {
/**
* Validate integer GET parameters
*
- * @param string $variable
- * @param integer $min
- * @param integer $max
- * @param integer $default
+ * @param string $variable
+ * @param int $min
+ * @param int $max
+ * @param int $default
*
- * @return integer
+ * @return int
*/
public static function getInteger($variable, $min = 0, $max = PHP_INT_MAX, $default = 0) {
- return filter_input(INPUT_GET, $variable, FILTER_VALIDATE_INT, array('options'=>array('min_range'=>$min, 'max_range'=>$max, 'default'=>$default)));
+ return filter_input(INPUT_GET, $variable, FILTER_VALIDATE_INT, array('options' => array('min_range' => $min, 'max_range' => $max, 'default' => $default)));
}
/**
@@ -359,7 +362,7 @@ class Filter {
*
* @param string $variable
*
- * @return boolean
+ * @return bool
*/
public static function postBool($variable) {
return (bool) filter_input(INPUT_POST, $variable, FILTER_VALIDATE_BOOLEAN);
@@ -368,15 +371,15 @@ class Filter {
/**
* Validate integer POST parameters
*
- * @param string $variable
- * @param integer $min
- * @param integer $max
- * @param integer $default
+ * @param string $variable
+ * @param int $min
+ * @param int $max
+ * @param int $default
*
- * @return integer
+ * @return int
*/
public static function postInteger($variable, $min = 0, $max = PHP_INT_MAX, $default = 0) {
- return filter_input(INPUT_POST, $variable, FILTER_VALIDATE_INT, array('options'=>array('min_range'=>$min, 'max_range'=>$max, 'default'=>$default)));
+ return filter_input(INPUT_POST, $variable, FILTER_VALIDATE_INT, array('options' => array('min_range' => $min, 'max_range' => $max, 'default' => $default)));
}
/**
@@ -446,7 +449,7 @@ $_SERVER[$variable]))) {
*/
public static function getCsrfToken() {
if (!Session::has('CSRF_TOKEN')) {
- $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz0123456789';
+ $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz0123456789';
$csrf_token = '';
for ($n = 0; $n < 32; ++$n) {
$csrf_token .= substr($charset, mt_rand(0, 61), 1);
@@ -469,7 +472,7 @@ $_SERVER[$variable]))) {
/**
* Check that the POST request contains the CSRF token generated above.
*
- * @return boolean
+ * @return bool
*/
public static function checkCsrf() {
if (self::post('csrf') !== self::getCsrfToken()) {
diff --git a/app/FlashMessages.php b/app/FlashMessages.php
index 34c9bf3549..09c8f1aefe 100644
--- a/app/FlashMessages.php
+++ b/app/FlashMessages.php
@@ -35,7 +35,7 @@ class FlashMessages {
$message->text = $text;
$message->status = $status;
- $messages = Session::get(self::FLASH_KEY, array());
+ $messages = Session::get(self::FLASH_KEY, array());
$messages[] = $message;
Session::put(self::FLASH_KEY, $messages);
}
diff --git a/app/Gedcom/GedcomCodeRela.php b/app/Gedcom/GedcomCodeRela.php
index 3ad0993caf..9020c9532b 100644
--- a/app/Gedcom/GedcomCodeRela.php
+++ b/app/Gedcom/GedcomCodeRela.php
@@ -20,7 +20,6 @@ namespace Fisharebest\Webtrees;
* Class GedcomCodeRela - Functions and logic for GEDCOM "RELA" codes
*/
class GedcomCodeRela {
-
/** @var string[] List of possible values for the RELA tag */
private static $TYPES = array(
'attendant', 'attending', 'best_man', 'bridesmaid', 'buyer',
diff --git a/app/Gedcom/GedcomCodeTemp.php b/app/Gedcom/GedcomCodeTemp.php
index ac24b7b890..33f91ee3a2 100644
--- a/app/Gedcom/GedcomCodeTemp.php
+++ b/app/Gedcom/GedcomCodeTemp.php
@@ -25,7 +25,7 @@ class GedcomCodeTemp {
*
* @param string $tag
*
- * @return boolean
+ * @return bool
*/
public static function isTagLDS($tag) {
return $tag === 'BAPL' || $tag === 'CONL' || $tag === 'ENDL' || $tag === 'SLGC' || $tag === 'SLGS';
diff --git a/app/Gedcom/GedcomTag.php b/app/Gedcom/GedcomTag.php
index 6b101981d5..8d36c18f6f 100644
--- a/app/Gedcom/GedcomTag.php
+++ b/app/Gedcom/GedcomTag.php
@@ -91,7 +91,7 @@ class GedcomTag {
*
* @param string $tag
*
- * @return boolean
+ * @return bool
*/
public static function isTag($tag) {
return in_array($tag, self::$ALL_TAGS);
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php
index 99d38f394c..67b4ea4e6a 100644
--- a/app/GedcomRecord.php
+++ b/app/GedcomRecord.php
@@ -38,22 +38,22 @@ class GedcomRecord {
/** @var Fact[] facts extracted from $gedcom/$pending */
protected $facts;
- /** @var boolean Can we display details of this record to Auth::PRIV_PRIVATE */
+ /** @var bool Can we display details of this record to Auth::PRIV_PRIVATE */
private $disp_public;
- /** @var boolean Can we display details of this record to Auth::PRIV_USER */
+ /** @var bool Can we display details of this record to Auth::PRIV_USER */
private $disp_user;
- /** @var boolean Can we display details of this record to Auth::PRIV_NONE */
+ /** @var bool Can we display details of this record to Auth::PRIV_NONE */
private $disp_none;
/** @var string[][] All the names of this individual */
protected $_getAllNames;
- /** @var integer Cached result */
+ /** @var int Cached result */
protected $_getPrimaryName;
- /** @var integer Cached result */
+ /** @var int Cached result */
protected $_getSecondaryName;
// Allow getInstance() to return references to existing objects
@@ -125,8 +125,9 @@ class GedcomRecord {
* @param Tree $tree
* @param string|null $gedcom
*
- * @return GedcomRecord|null
* @throws \Exception
+ *
+ * @return GedcomRecord|null
*/
public static function getInstance($xref, Tree $tree, $gedcom = null) {
$tree_id = $tree->getTreeId();
@@ -146,10 +147,10 @@ class GedcomRecord {
if (!isset(self::$pending_record_cache[$tree_id])) {
// Fetch all pending records in one database query
self::$pending_record_cache[$tree_id] = array();
- $rows = Database::prepare(
+ $rows = Database::prepare(
"SELECT xref, new_gedcom FROM `##change` WHERE status = 'pending' AND gedcom_id = :tree_id ORDER BY change_id"
)->execute(array(
- 'tree_id' => $tree_id
+ 'tree_id' => $tree_id,
))->fetchAll();
foreach ($rows as $row) {
self::$pending_record_cache[$tree_id][$row->xref] = $row->new_gedcom;
@@ -219,8 +220,8 @@ class GedcomRecord {
/**
* Fetch data from the database
*
- * @param string $xref
- * @param integer $tree_id
+ * @param string $xref
+ * @param int $tree_id
*
* @return null|string
*/
@@ -295,7 +296,7 @@ class GedcomRecord {
/**
* Does this record have a pending change?
*
- * @return boolean
+ * @return bool
*/
public function isPendingAddtion() {
return $this->pending !== null;
@@ -304,7 +305,7 @@ class GedcomRecord {
/**
* Does this record have a pending deletion?
*
- * @return boolean
+ * @return bool
*/
public function isPendingDeletion() {
return $this->pending === '';
@@ -352,9 +353,9 @@ class GedcomRecord {
/**
* Work out whether this record can be shown to a user with a given access level
*
- * @param integer $access_level
+ * @param int $access_level
*
- * @return boolean
+ * @return bool
*/
private function canShowRecord($access_level) {
// This setting would better be called "$ENABLE_PRIVACY"
@@ -396,9 +397,9 @@ class GedcomRecord {
/**
* Each object type may have its own special rules, and re-implement this function.
*
- * @param integer $access_level
+ * @param int $access_level
*
- * @return boolean
+ * @return bool
*/
protected function canShowByType($access_level) {
$fact_privacy = $this->tree->getFactPrivacy();
@@ -415,9 +416,9 @@ class GedcomRecord {
/**
* Can the details of this record be shown?
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
- * @return boolean
+ * @return bool
*/
public function canShow($access_level = null) {
if ($access_level === null) {
@@ -431,16 +432,19 @@ class GedcomRecord {
if ($this->disp_public === null) {
$this->disp_public = $this->canShowRecord(Auth::PRIV_PRIVATE);
}
+
return $this->disp_public;
case Auth::PRIV_USER: // member
if ($this->disp_user === null) {
$this->disp_user = $this->canShowRecord(Auth::PRIV_USER);
}
+
return $this->disp_user;
case Auth::PRIV_NONE: // admin
if ($this->disp_none === null) {
$this->disp_none = $this->canShowRecord(Auth::PRIV_NONE);
}
+
return $this->disp_none;
case Auth::PRIV_HIDE: // hidden from admins
// We use this value to bypass privacy checks. For example,
@@ -455,9 +459,9 @@ class GedcomRecord {
/**
* Can the name of this record be shown?
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
- * @return boolean
+ * @return bool
*/
public function canShowName($access_level = null) {
if ($access_level === null) {
@@ -470,7 +474,7 @@ class GedcomRecord {
/**
* Can we edit this record?
*
- * @return boolean
+ * @return bool
*/
public function canEdit() {
return Auth::isManager($this->tree) || Auth::isEditor($this->tree) && strpos($this->gedcom, "\n1 RESN locked") === false;
@@ -480,7 +484,7 @@ class GedcomRecord {
* Remove private data from the raw gedcom record.
* Return both the visible and invisible data. We need the invisible data when editing.
*
- * @param integer $access_level
+ * @param int $access_level
*
* @return string
*/
@@ -498,6 +502,7 @@ class GedcomRecord {
foreach ($this->getFacts(null, false, $access_level) as $fact) {
$gedrec .= "\n" . $fact->getGedcom();
}
+
return $gedrec;
} else {
// We cannot display the details, but we may be able to display
@@ -509,7 +514,7 @@ class GedcomRecord {
/**
* Generate a private version of this record
*
- * @param integer $access_level
+ * @param int $access_level
*
* @return string
*/
@@ -543,8 +548,8 @@ class GedcomRecord {
* ['full'] = the name as specified in the record, e.g. 'Vincent van Gogh' or 'John Unknown'
* ['sort'] = a sortable version of the name (not for display), e.g. 'Gogh, Vincent' or '@N.N., John'
*
- * @param integer $level
- * @param string $fact_type
+ * @param int $level
+ * @param string $fact_type
* @param Fact[] $facts
*/
protected function extractNamesFromFacts($level, $fact_type, $facts) {
@@ -595,6 +600,7 @@ class GedcomRecord {
$this->addName(static::RECORD_TYPE, I18N::translate('Private'), null);
}
}
+
return $this->_getAllNames;
}
@@ -610,7 +616,7 @@ class GedcomRecord {
/**
* Which of the (possibly several) names of this record is the primary one.
*
- * @return integer
+ * @return int
*/
public function getPrimaryName() {
static $language_script;
@@ -639,7 +645,7 @@ class GedcomRecord {
/**
* Which of the (possibly several) names of this record is the secondary one.
*
- * @return integer
+ * @return int
*/
public function getSecondaryName() {
if (is_null($this->_getSecondaryName)) {
@@ -649,7 +655,7 @@ class GedcomRecord {
$all_names = $this->getAllNames();
if (count($all_names) > 1) {
$primary_script = I18N::textScript($all_names[$this->getPrimaryName()]['sort']);
- foreach ($all_names as $n=>$name) {
+ foreach ($all_names as $n => $name) {
if ($n != $this->getPrimaryName() && $name['type'] != '_MARNM' && I18N::textScript($name['sort']) != $primary_script) {
$this->_getSecondaryName = $n;
break;
@@ -657,13 +663,14 @@ class GedcomRecord {
}
}
}
+
return $this->_getSecondaryName;
}
/**
* Allow the choice of primary name to be overidden, e.g. in a search result
*
- * @param integer $n
+ * @param int $n
*/
public function setPrimaryName($n) {
$this->_getPrimaryName = $n;
@@ -686,7 +693,7 @@ class GedcomRecord {
* @param GedcomRecord $x
* @param GedcomRecord $y
*
- * @return integer
+ * @return int
*/
public static function compare(GedcomRecord $x, GedcomRecord $y) {
if ($x->canShowName()) {
@@ -712,6 +719,7 @@ class GedcomRecord {
public function getFullName() {
if ($this->canShowName()) {
$tmp = $this->getAllNames();
+
return $tmp[$this->getPrimaryName()]['full'];
} else {
return I18N::translate('Private');
@@ -726,6 +734,7 @@ class GedcomRecord {
public function getSortName() {
// The sortable name is never displayed, no need to call canShowName()
$tmp = $this->getAllNames();
+
return $tmp[$this->getPrimaryName()]['sort'];
}
@@ -737,6 +746,7 @@ class GedcomRecord {
public function getAddName() {
if ($this->canShowName() && $this->getPrimaryName() != $this->getSecondaryName()) {
$all_names = $this->getAllNames();
+
return $all_names[$this->getSecondaryName()]['full'];
} else {
return null;
@@ -748,9 +758,9 @@ class GedcomRecord {
* If $find is set, then we are displaying items from a selection list.
* $name allows us to use something other than the record name.
*
- * @param string $tag
- * @param boolean $find
- * @param null $name
+ * @param string $tag
+ * @param bool $find
+ * @param null $name
*
* @return string
*/
@@ -765,6 +775,7 @@ class GedcomRecord {
$html .= ' class="list_item"><b>' . $name . '</b>';
$html .= $this->formatListDetails();
$html = '<' . $tag . '>' . $html . '</a></' . $tag . '>';
+
return $html;
}
@@ -781,8 +792,8 @@ class GedcomRecord {
/**
* Extract/format the first fact from a list of facts.
*
- * @param string $facts
- * @param integer $style
+ * @param string $facts
+ * @param int $style
*
* @return string
*/
@@ -798,6 +809,7 @@ class GedcomRecord {
}
}
}
+
return '';
}
@@ -830,6 +842,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -860,6 +873,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -891,6 +905,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -922,6 +937,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -954,6 +970,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -986,6 +1003,7 @@ class GedcomRecord {
$list[] = $record;
}
}
+
return $list;
}
@@ -1051,10 +1069,10 @@ class GedcomRecord {
/**
* The facts and events for this record.
*
- * @param string $filter
- * @param boolean $sort
- * @param integer|null $access_level
- * @param boolean $override Include private records, to allow us to implement $SHOW_PRIVATE_RELATIONSHIPS and $SHOW_LIVING_NAMES.
+ * @param string $filter
+ * @param bool $sort
+ * @param int|null $access_level
+ * @param bool $override Include private records, to allow us to implement $SHOW_PRIVATE_RELATIONSHIPS and $SHOW_LIVING_NAMES.
*
* @return Fact[]
*/
@@ -1074,6 +1092,7 @@ class GedcomRecord {
if ($sort) {
sort_facts($facts);
}
+
return $facts;
}
@@ -1081,7 +1100,7 @@ class GedcomRecord {
* Get the last-change timestamp for this record, either as a formatted string
* (for display) or as a unix timestamp (for sorting)
*
- * @param boolean $sorting
+ * @param bool $sorting
*
* @return string
*/
@@ -1136,8 +1155,8 @@ class GedcomRecord {
/**
* Add a new fact to this record
*
- * @param string $gedcom
- * @param boolean $update_chan
+ * @param string $gedcom
+ * @param bool $update_chan
*/
public function createFact($gedcom, $update_chan) {
$this->updateFact(null, $gedcom, $update_chan);
@@ -1146,8 +1165,8 @@ class GedcomRecord {
/**
* Delete a fact from this record
*
- * @param string $fact_id
- * @param boolean $update_chan
+ * @param string $fact_id
+ * @param bool $update_chan
*/
public function deleteFact($fact_id, $update_chan) {
$this->updateFact($fact_id, null, $update_chan);
@@ -1156,9 +1175,9 @@ class GedcomRecord {
/**
* Replace a fact with a new gedcom data.
*
- * @param string $fact_id
- * @param string $gedcom
- * @param boolean $update_chan
+ * @param string $fact_id
+ * @param string $gedcom
+ * @param bool $update_chan
*
* @throws \Exception
*/
@@ -1214,7 +1233,7 @@ class GedcomRecord {
$this->xref,
$old_gedcom,
$new_gedcom,
- Auth::id()
+ Auth::id(),
));
$this->pending = $new_gedcom;
@@ -1231,8 +1250,8 @@ class GedcomRecord {
/**
* Update this record
*
- * @param string $gedcom
- * @param boolean $update_chan
+ * @param string $gedcom
+ * @param bool $update_chan
*/
public function updateRecord($gedcom, $update_chan) {
// MSDOS line endings will break things in horrible ways
@@ -1253,7 +1272,7 @@ class GedcomRecord {
$this->xref,
$this->getGedcom(),
$gedcom,
- Auth::id()
+ Auth::id(),
));
// Clear the cache
@@ -1291,7 +1310,7 @@ class GedcomRecord {
}
// Clear the cache
- self::$gedcom_record_cache = null;
+ self::$gedcom_record_cache = null;
self::$pending_record_cache = null;
Log::addEditLog('Delete: ' . static::RECORD_TYPE . ' ' . $this->xref);
@@ -1300,8 +1319,8 @@ class GedcomRecord {
/**
* Remove all links from this record to $xref
*
- * @param string $xref
- * @param boolean $update_chan
+ * @param string $xref
+ * @param bool $update_chan
*/
public function removeLinks($xref, $update_chan) {
$value = '@' . $xref . '@';
@@ -1312,9 +1331,9 @@ class GedcomRecord {
} elseif (preg_match_all('/\n(\d) ' . WT_REGEX_TAG . ' ' . $value . '/', $fact->getGedcom(), $matches, PREG_SET_ORDER)) {
$gedcom = $fact->getGedcom();
foreach ($matches as $match) {
- $next_level = $match[1] + 1;
+ $next_level = $match[1] + 1;
$next_levels = '[' . $next_level . '-9]';
- $gedcom = preg_replace('/' . $match[0] . '(\n' . $next_levels . '.*)*/', '', $gedcom);
+ $gedcom = preg_replace('/' . $match[0] . '(\n' . $next_levels . '.*)*/', '', $gedcom);
}
$this->updateFact($fact->getFactId(), $gedcom, $update_chan);
}
diff --git a/app/HitCounter.php b/app/HitCounter.php
index ffa8f1cf29..c7e542b6ab 100644
--- a/app/HitCounter.php
+++ b/app/HitCounter.php
@@ -27,7 +27,7 @@ class HitCounter {
* @param string $page
* @param string $parameter
*
- * @return integer
+ * @return int
*/
public static function countHit(Tree $tree, $page, $parameter) {
// Don't increment the counter while we stay on the same page.
@@ -78,7 +78,7 @@ class HitCounter {
* @param string $page
* @param string $parameter
*
- * @return integer
+ * @return int
*/
public static function getCount(Tree $tree, $page, $parameter) {
return (int) Database::prepare(
diff --git a/app/I18N.php b/app/I18N.php
index a628dd0ea6..8108b17a69 100644
--- a/app/I18N.php
+++ b/app/I18N.php
@@ -78,18 +78,18 @@ class I18N {
// Characters that are displayed in mirror form in RTL text.
private static $mirror_characters = array(
- '(' => ')',
- ')' => '(',
- '[' => ']',
- ']' => '[',
- '{' => '}',
- '}' => '{',
- '<' => '>',
- '>' => '<',
+ '(' => ')',
+ ')' => '(',
+ '[' => ']',
+ ']' => '[',
+ '{' => '}',
+ '}' => '{',
+ '<' => '>',
+ '>' => '<',
'‹' => '›',
'›' => '‹',
- '«' => '»',
- '»' => '«',
+ '«' => '»',
+ '»' => '«',
'﴾' => '﴿',
'﴿' => '﴾',
'“' => '”',
@@ -245,7 +245,7 @@ class I18N {
*
* Used for years, etc., where we do not want thousands-separators, decimals, etc.
*
- * @param integer $n
+ * @param int $n
*
* @return string
*/
@@ -265,7 +265,7 @@ class I18N {
/**
* What is the first day of the week.
*
- * @return integer Sunday=0, Monday=1, etc.
+ * @return int Sunday=0, Monday=1, etc.
*/
public static function firstDay() {
return self::$locale->territory()->firstDay();
@@ -415,7 +415,7 @@ class I18N {
if ($rebuild_cache) {
$translations = array();
foreach ($translation_files as $translation_file) {
- $translation = new Translation($translation_file);
+ $translation = new Translation($translation_file);
$translations = array_merge($translations, $translation->asArray());
}
file_put_contents($cache_file, '<' . '?php return ' . var_export($translations, true) . ';');
@@ -488,8 +488,8 @@ class I18N {
* fr: 12 345,67
* de: 12.345,67
*
- * @param float $n
- * @param integer $precision
+ * @param float $n
+ * @param int $precision
*
* @return string
*/
@@ -505,8 +505,8 @@ class I18N {
* fr: 12,3 %
* de: 12,3%
*
- * @param float $n
- * @param integer $precision
+ * @param float $n
+ * @param int $precision
*
* @return string
*/
@@ -558,15 +558,15 @@ class I18N {
$text = strtr($text, self::$mirror_characters);
$reversed = '';
- $digits = '';
+ $digits = '';
while ($text != '') {
$letter = mb_substr($text, 0, 1);
- $text = mb_substr($text, 1);
+ $text = mb_substr($text, 1);
if (strpos(self::DIGITS, $letter) !== false) {
$digits .= $letter;
} else {
$reversed = $letter . $digits . $reversed;
- $digits = '';
+ $digits = '';
}
}
@@ -603,7 +603,7 @@ class I18N {
* @param string $string1
* @param string $string2
*
- * @return integer
+ * @return int
*/
public static function strcasecmp($string1, $string2) {
$strpos1 = 0;
@@ -731,26 +731,26 @@ class I18N {
$string = strip_tags($string); // otherwise HTML tags show up as latin
$string = html_entity_decode($string, ENT_QUOTES, 'UTF-8'); // otherwise HTML entities show up as latin
$string = str_replace(array('@N.N.', '@P.N.'), '', $string); // otherwise unknown names show up as latin
- $pos = 0;
+ $pos = 0;
$strlen = strlen($string);
while ($pos < $strlen) {
// get the Unicode Code Point for the character at position $pos
$byte1 = ord($string[$pos]);
if ($byte1 < 0x80) {
$code_point = $byte1;
- $chrlen = 1;
+ $chrlen = 1;
} elseif ($byte1 < 0xC0) {
// Invalid continuation character
return 'Latn';
} elseif ($byte1 < 0xE0) {
$code_point = (($byte1 & 0x1F) << 6) + (ord($string[$pos + 1]) & 0x3F);
- $chrlen = 2;
+ $chrlen = 2;
} elseif ($byte1 < 0xF0) {
$code_point = (($byte1 & 0x0F) << 12) + ((ord($string[$pos + 1]) & 0x3F) << 6) + (ord($string[$pos + 2]) & 0x3F);
- $chrlen = 3;
+ $chrlen = 3;
} elseif ($byte1 < 0xF8) {
$code_point = (($byte1 & 0x07) << 24) + ((ord($string[$pos + 1]) & 0x3F) << 12) + ((ord($string[$pos + 2]) & 0x3F) << 6) + (ord($string[$pos + 3]) & 0x3F);
- $chrlen = 3;
+ $chrlen = 3;
} else {
// Invalid UTF
return 'Latn';
@@ -771,7 +771,7 @@ class I18N {
/**
* Convert a number of seconds into a relative time. For example, 630 => "10 hours, 30 minutes ago"
*
- * @param integer $seconds
+ * @param int $seconds
*
* @return string
*/
@@ -784,18 +784,23 @@ class I18N {
if ($seconds > $year) {
$years = (int) ($seconds / $year);
+
return self::plural('%s year ago', '%s years ago', $years, self::number($years));
} elseif ($seconds > $month) {
$months = (int) ($seconds / $month);
+
return self::plural('%s month ago', '%s months ago', $months, self::number($months));
} elseif ($seconds > $day) {
$days = (int) ($seconds / $day);
+
return self::plural('%s day ago', '%s days ago', $days, self::number($days));
} elseif ($seconds > $hour) {
$hours = (int) ($seconds / $hour);
+
return self::plural('%s hour ago', '%s hours ago', $hours, self::number($hours));
} elseif ($seconds > $minute) {
$minutes = (int) ($seconds / $minute);
+
return self::plural('%s minute ago', '%s minutes ago', $minutes, self::number($minutes));
} else {
return self::plural('%s second ago', '%s seconds ago', $seconds, self::number($seconds));
@@ -845,7 +850,7 @@ class I18N {
/**
* What is the last day of the weekend.
*
- * @return integer Sunday=0, Monday=1, etc.
+ * @return int Sunday=0, Monday=1, etc.
*/
public static function weekendEnd() {
return self::$locale->territory()->weekendEnd();
@@ -854,7 +859,7 @@ class I18N {
/**
* What is the first day of the weekend.
*
- * @return integer Sunday=0, Monday=1, etc.
+ * @return int Sunday=0, Monday=1, etc.
*/
public static function weekendStart() {
return self::$locale->territory()->weekendStart();
diff --git a/app/Individual.php b/app/Individual.php
index 56fa3c620b..7a8f023a7e 100644
--- a/app/Individual.php
+++ b/app/Individual.php
@@ -23,7 +23,7 @@ use Fisharebest\ExtCalendar\GregorianCalendar;
*/
class Individual extends GedcomRecord {
const RECORD_TYPE = 'INDI';
- const URL_PREFIX = 'individual.php?pid=';
+ const URL_PREFIX = 'individual.php?pid=';
public $generation; // used in some lists to keep track of this individual’s generation in that list
@@ -112,7 +112,7 @@ class Individual extends GedcomRecord {
// Dead people...
if ($this->tree->getPreference('SHOW_DEAD_PEOPLE') >= $access_level && $this->isDead()) {
- $keep_alive = false;
+ $keep_alive = false;
$KEEP_ALIVE_YEARS_BIRTH = $this->tree->getPreference('KEEP_ALIVE_YEARS_BIRTH');
if ($KEEP_ALIVE_YEARS_BIRTH) {
preg_match_all('/\n1 (?:' . WT_EVENTS_BIRT . ').*(?:\n[2-9].*)*(?:\n2 DATE (.+))/', $this->gedcom, $matches, PREG_SET_ORDER);
@@ -154,9 +154,9 @@ class Individual extends GedcomRecord {
* For relationship privacy calculations - is this individual a close relative?
*
* @param Individual $target
- * @param integer $distance
+ * @param int $distance
*
- * @return boolean
+ * @return bool
*/
private static function isRelated(Individual $target, $distance) {
static $cache = null;
@@ -268,7 +268,7 @@ class Individual extends GedcomRecord {
* @param Individual $x
* @param Individual $y
*
- * @return integer
+ * @return int
*/
public static function compareBirthDate(Individual $x, Individual $y) {
return Date::compare($x->getEstimatedBirthDate(), $y->getEstimatedBirthDate());
@@ -280,7 +280,7 @@ class Individual extends GedcomRecord {
* @param Individual $x
* @param Individual $y
*
- * @return integer
+ * @return int
*/
public static function compareDeathDate(Individual $x, Individual $y) {
return Date::compare($x->getEstimatedDeathDate(), $y->getEstimatedDeathDate());
@@ -290,7 +290,7 @@ class Individual extends GedcomRecord {
* Calculate whether this individual is living or dead.
* If not known to be dead, then assume living.
*
- * @return boolean
+ * @return bool
*/
public function isDead() {
$MAX_ALIVE_AGE = $this->tree->getPreference('MAX_ALIVE_AGE');
@@ -406,7 +406,7 @@ class Individual extends GedcomRecord {
continue;
}
$level = $match[1];
- $prim = $media->isPrimary();
+ $prim = $media->isPrimary();
if ($prim == 'N') {
continue;
}
@@ -694,7 +694,7 @@ class Individual extends GedcomRecord {
if ($min && $max) {
$gregorian_calendar = new GregorianCalendar;
- list($year) = $gregorian_calendar->jdToYmd((int) ((max($min) + min($max)) / 2));
+ list($year) = $gregorian_calendar->jdToYmd((int) ((max($min) + min($max)) / 2));
$this->_getEstimatedBirthDate = new Date('EST ' . $year);
} else {
$this->_getEstimatedBirthDate = new Date(''); // always return a date object
@@ -782,7 +782,7 @@ class Individual extends GedcomRecord {
/**
* Get a list of this individual’s spouse families
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
* @return Family[]
*/
@@ -813,7 +813,7 @@ class Individual extends GedcomRecord {
* @return Individual|null
*/
public function getCurrentSpouse() {
- $tmp = $this->getSpouseFamilies();
+ $tmp = $this->getSpouseFamilies();
$family = end($tmp);
if ($family) {
return $family->getSpouse($this);
@@ -825,7 +825,7 @@ class Individual extends GedcomRecord {
/**
* Count the children belonging to this individual.
*
- * @return integer
+ * @return int
*/
public function getNumberOfChildren() {
if (preg_match('/\n1 NCHI (\d+)(?:\n|$)/', $this->getGedcom(), $match)) {
@@ -845,7 +845,7 @@ class Individual extends GedcomRecord {
/**
* Get a list of this individual’s child families (i.e. their parents).
*
- * @param integer|null $access_level
+ * @param int|null $access_level
*
* @return Family[]
*/
@@ -919,7 +919,7 @@ class Individual extends GedcomRecord {
*/
public function getChildStepFamilies() {
$step_families = array();
- $families = $this->getChildFamilies();
+ $families = $this->getChildFamilies();
foreach ($families as $family) {
$father = $family->getHusband();
if ($father) {
@@ -949,7 +949,7 @@ class Individual extends GedcomRecord {
*/
public function getSpouseStepFamilies() {
$step_families = array();
- $families = $this->getSpouseFamilies();
+ $families = $this->getSpouseFamilies();
foreach ($families as $family) {
$spouse = $family->getSpouse($this);
if ($spouse) {
@@ -1030,7 +1030,6 @@ class Individual extends GedcomRecord {
}
/**
- *
* @todo this function does not belong in this class
*
* @param Family $family
@@ -1138,11 +1137,11 @@ class Individual extends GedcomRecord {
////////////////////////////////////////////////////////////////////////////
$sublevel = 1 + (int) $gedcom[0];
- $NPFX = preg_match("/\n{$sublevel} NPFX (.+)/", $gedcom, $match) ? $match[1] : '';
- $GIVN = preg_match("/\n{$sublevel} GIVN (.+)/", $gedcom, $match) ? $match[1] : '';
- $SURN = preg_match("/\n{$sublevel} SURN (.+)/", $gedcom, $match) ? $match[1] : '';
- $NSFX = preg_match("/\n{$sublevel} NSFX (.+)/", $gedcom, $match) ? $match[1] : '';
- $NICK = preg_match("/\n{$sublevel} NICK (.+)/", $gedcom, $match) ? $match[1] : '';
+ $NPFX = preg_match("/\n{$sublevel} NPFX (.+)/", $gedcom, $match) ? $match[1] : '';
+ $GIVN = preg_match("/\n{$sublevel} GIVN (.+)/", $gedcom, $match) ? $match[1] : '';
+ $SURN = preg_match("/\n{$sublevel} SURN (.+)/", $gedcom, $match) ? $match[1] : '';
+ $NSFX = preg_match("/\n{$sublevel} NSFX (.+)/", $gedcom, $match) ? $match[1] : '';
+ $NICK = preg_match("/\n{$sublevel} NICK (.+)/", $gedcom, $match) ? $match[1] : '';
// SURN is an comma-separated list of surnames...
if ($SURN) {
@@ -1210,7 +1209,7 @@ class Individual extends GedcomRecord {
// Add placeholder for unknown given name
if (!$GIVN) {
$GIVN = '@P.N.';
- $pos = strpos($full, '/');
+ $pos = strpos($full, '/');
$full = substr($full, 0, $pos) . '@P.N. ' . substr($full, $pos);
}
@@ -1255,7 +1254,7 @@ class Individual extends GedcomRecord {
$full = preg_replace('/([^ >]*)\*/', '<span class="starredname">\\1</span>', $full);
// Remove prefered-name indicater - they don’t go in the database
- $GIVN = str_replace('*', '', $GIVN);
+ $GIVN = str_replace('*', '', $GIVN);
$fullNN = str_replace('*', '', $fullNN);
foreach ($SURNS as $SURN) {
@@ -1312,20 +1311,20 @@ class Individual extends GedcomRecord {
$char = ($bwidth / 6.5);
}
if ($this->canShowName()) {
- $tmp = $this->getAllNames();
- $givn = $tmp[$this->getPrimaryName()]['givn'];
- $surn = $tmp[$this->getPrimaryName()]['surname'];
- $new_givn = explode(' ', $givn);
+ $tmp = $this->getAllNames();
+ $givn = $tmp[$this->getPrimaryName()]['givn'];
+ $surn = $tmp[$this->getPrimaryName()]['surname'];
+ $new_givn = explode(' ', $givn);
$count_givn = count($new_givn);
- $len_givn = mb_strlen($givn);
- $len_surn = mb_strlen($surn);
- $len = $len_givn + $len_surn;
- $i = 1;
+ $len_givn = mb_strlen($givn);
+ $len_surn = mb_strlen($surn);
+ $len = $len_givn + $len_surn;
+ $i = 1;
while ($len > $char && $i <= $count_givn) {
$new_givn[$count_givn - $i] = mb_substr($new_givn[$count_givn - $i], 0, 1);
- $givn = implode(' ', $new_givn);
- $len_givn = mb_strlen($givn);
- $len = $len_givn + $len_surn;
+ $givn = implode(' ', $new_givn);
+ $len_givn = mb_strlen($givn);
+ $len = $len_givn + $len_surn;
$i++;
}
$max_surn = $char - $i * 2;
diff --git a/app/Log.php b/app/Log.php
index b483be05ca..8cc7bae34f 100644
--- a/app/Log.php
+++ b/app/Log.php
@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
namespace Fisharebest\Webtrees;
/**
@@ -51,7 +50,7 @@ class Log {
$message,
WT_CLIENT_IP,
Auth::id(),
- $tree ? $tree->getTreeId() : null
+ $tree ? $tree->getTreeId() : null,
));
}
diff --git a/app/Mail.php b/app/Mail.php
index a654d2efc9..fd32cc79b9 100644
--- a/app/Mail.php
+++ b/app/Mail.php
@@ -52,7 +52,7 @@ class Mail {
* @param string $subject
* @param string $message
*
- * @return boolean
+ * @return bool
*/
public static function send(Tree $tree, $to_email, $to_name, $replyto_email, $replyto_name, $subject, $message) {
try {
@@ -77,12 +77,12 @@ class Mail {
/**
* Send an automated system message (such as a password reminder) from a tree to a user.
*
- * @param Tree $tree
- * @param User $user
- * @param string $subject
- * @param string $message
+ * @param Tree $tree
+ * @param User $user
+ * @param string $subject
+ * @param string $message
*
- * @return boolean
+ * @return bool
*/
public static function systemMessage(Tree $tree, User $user, $subject, $message) {
return self::send(
diff --git a/app/Media.php b/app/Media.php
index 39607bf7bc..a4b9333044 100644
--- a/app/Media.php
+++ b/app/Media.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class Media extends GedcomRecord {
const RECORD_TYPE = 'OBJE';
- const URL_PREFIX = 'mediaviewer.php?mid=';
+ const URL_PREFIX = 'mediaviewer.php?mid=';
// TODO: these should be private, with getTitle() and getFilename() functions
/** @var string The "TITL" value from the GEDCOM */
@@ -74,7 +74,7 @@ class Media extends GedcomRecord {
$linked_ids = Database::prepare(
"SELECT l_from FROM `##link` WHERE l_to = ? AND l_file = ?"
)->execute(array(
- $this->xref, $this->tree->getTreeId()
+ $this->xref, $this->tree->getTreeId(),
))->fetchOneColumn();
foreach ($linked_ids as $linked_id) {
$linked_record = GedcomRecord::getInstance($linked_id, $this->tree);
@@ -241,7 +241,7 @@ class Media extends GedcomRecord {
*
* @param string $which specify either 'main' or 'thumb'
*
- * @return boolean
+ * @return bool
*/
public function fileExists($which = 'main') {
return file_exists($this->getServerFilename($which));
@@ -249,6 +249,7 @@ class Media extends GedcomRecord {
/**
* Determine if the file is an external url
+ *
* @return bool
*/
public function isExternal() {
@@ -275,7 +276,7 @@ class Media extends GedcomRecord {
*
* @param string $which specify either 'main' or 'thumb'
*
- * @return integer
+ * @return int
*/
public function getFilesizeraw($which = 'main') {
try {
@@ -290,7 +291,7 @@ class Media extends GedcomRecord {
*
* @param string $which specify either 'main' or 'thumb'
*
- * @return integer
+ * @return int
*/
public function getFiletime($which = 'main') {
try {
@@ -323,7 +324,6 @@ class Media extends GedcomRecord {
* Deprecated? This does not need to be a function here.
*
* @return string
- *
*/
public function getMediaType() {
if (preg_match('/\n\d TYPE (.+)/', $this->gedcom, $match)) {
@@ -349,9 +349,9 @@ class Media extends GedcomRecord {
/**
* get image properties
*
- * @param string $which specify either 'main' or 'thumb'
- * @param integer $addWidth amount to add to width
- * @param integer $addHeight amount to add to height
+ * @param string $which specify either 'main' or 'thumb'
+ * @param int $addWidth amount to add to width
+ * @param int $addHeight amount to add to height
*
* @return array
*/
@@ -393,13 +393,13 @@ class Media extends GedcomRecord {
if (!is_array($imgsize) || empty($imgsize['0'])) {
// this is not an image, OR the file doesn’t exist OR it is a url
- $imgsize[0] = 0;
- $imgsize[1] = 0;
- $imgsize['adjW'] = 0;
- $imgsize['adjH'] = 0;
- $imgsize['ext'] = '';
- $imgsize['mime'] = '';
- $imgsize['WxH'] = '';
+ $imgsize[0] = 0;
+ $imgsize[1] = 0;
+ $imgsize['adjW'] = 0;
+ $imgsize['adjH'] = 0;
+ $imgsize['ext'] = '';
+ $imgsize['mime'] = '';
+ $imgsize['WxH'] = '';
$imgsize['imgWH'] = '';
if ($this->isExternal()) {
// don’t let large external images break the dislay
@@ -410,7 +410,7 @@ class Media extends GedcomRecord {
if (empty($imgsize['mime'])) {
// this is not an image, OR the file doesn’t exist OR it is a url
// set file type equal to the file extension - can’t use parse_url because this may not be a full url
- $exp = explode('?', $this->file);
+ $exp = explode('?', $this->file);
$imgsize['ext'] = strtoupper(pathinfo($exp[0], PATHINFO_EXTENSION));
// all mimetypes we wish to serve with the media firewall must be added to this array.
$mime = array(
@@ -445,15 +445,15 @@ class Media extends GedcomRecord {
/**
* Generate a URL directly to the media file
*
- * @param string $which
- * @param boolean $download
+ * @param string $which
+ * @param bool $download
*
* @return string
*/
public function getHtmlUrlDirect($which = 'main', $download = false) {
// “cb” is “cache buster”, so clients will make new request if anything significant about the user or the file changes
// The extension is there so that image viewers (e.g. colorbox) can do something sensible
- $thumbstr = ($which == 'thumb') ? '&amp;thumb=1' : '';
+ $thumbstr = ($which == 'thumb') ? '&amp;thumb=1' : '';
$downloadstr = ($download) ? '&dl=1' : '';
return
@@ -546,7 +546,7 @@ class Media extends GedcomRecord {
if ($this->isExternal() || !file_exists($this->getServerFilename('thumb'))) {
// Use an icon
$mime_type = str_replace('/', '-', $this->mimeType());
- $image =
+ $image =
'<i' .
' dir="' . 'auto' . '"' . // For the tool-tip
' class="' . 'icon-mime-' . $mime_type . '"' .
diff --git a/app/Menu.php b/app/Menu.php
index a5459bd7bb..604c587b8b 100644
--- a/app/Menu.php
+++ b/app/Menu.php
@@ -117,9 +117,9 @@ class Menu {
* @param string $iconclass
*/
public function addClass($menuclass, $submenuclass = '', $iconclass = '') {
- $this->menuclass = $menuclass;
+ $this->menuclass = $menuclass;
$this->submenuclass = $submenuclass;
- $this->iconclass = $iconclass;
+ $this->iconclass = $iconclass;
}
/**
diff --git a/app/Module.php b/app/Module.php
index 61e794c3e5..2347a94715 100644
--- a/app/Module.php
+++ b/app/Module.php
@@ -49,7 +49,7 @@ class Module {
Database::prepare(
"UPDATE `##module` SET status = 'disabled' WHERE module_name = :module_name"
)->execute(array(
- 'module_name' => $module_name
+ 'module_name' => $module_name,
));
}
}
@@ -85,7 +85,7 @@ class Module {
$array = array();
foreach ($module_names as $module_name) {
$interface = __NAMESPACE__ . '\Module' . ucfirst($component) . 'Interface';
- $module = self::getModuleByName($module_name);
+ $module = self::getModuleByName($module_name);
if ($module instanceof $interface) {
$array[$module_name] = $module;
}
@@ -123,7 +123,7 @@ class Module {
$array = array();
foreach ($module_names as $module_name) {
$interface = __NAMESPACE__ . '\Module' . ucfirst($component) . 'Interface';
- $module = self::getModuleByName($module_name);
+ $module = self::getModuleByName($module_name);
if ($module instanceof $interface) {
$array[$module_name] = $module;
}
@@ -325,9 +325,7 @@ class Module {
* After creating a new family tree, we need to assign the default access
* rights for each module.
*
- * @param integer $tree_id
- *
- * @return void
+ * @param int $tree_id
*/
public static function setDefaultAccess($tree_id) {
foreach (self::getInstalledModules('disabled') as $module) {
diff --git a/app/Module/AbstractModule.php b/app/Module/AbstractModule.php
index 9f6d617a1e..c5a7a90314 100644
--- a/app/Module/AbstractModule.php
+++ b/app/Module/AbstractModule.php
@@ -40,7 +40,7 @@ abstract class AbstractModule {
}
/**
- * @param integer $block_id
+ * @param int $block_id
* @param string $setting_name
* @param string|null $default_value
*
@@ -58,7 +58,7 @@ abstract class AbstractModule {
}
/**
- * @param integer $block_id
+ * @param int $block_id
* @param string $setting_name
* @param string|null $setting_value
*
@@ -104,7 +104,7 @@ abstract class AbstractModule {
*
* Some modules are aimed at admins or managers, and are not generally shown to users.
*
- * @return integer
+ * @return int
*/
public function defaultAccessLevel() {
// Returns one of: Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_USER, WT_PRIV_ADMIN
@@ -125,8 +125,6 @@ abstract class AbstractModule {
*
* Since modules may have many settings, and will probably want to use
* lots of them, load them all at once and cache them.
- *
- * @return void
*/
private function loadAllSettings() {
if ($this->settings === null) {
@@ -199,9 +197,9 @@ abstract class AbstractModule {
* Get a the current access level for a module
*
* @param Tree $tree
- * @param string $component - tab, block, menu, etc
+ * @param string $component tab, block, menu, etc
*
- * @return integer
+ * @return int
*/
public function getAccessLevel(Tree $tree, $component) {
$access_level = Database::prepare(
diff --git a/app/Module/AhnentafelReportModule.php b/app/Module/AhnentafelReportModule.php
index 384b240d41..014442afb0 100644
--- a/app/Module/AhnentafelReportModule.php
+++ b/app/Module/AhnentafelReportModule.php
@@ -42,7 +42,7 @@ class AhnentafelReportModule extends AbstractModule implements ModuleReportInter
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/AlbumModule.php b/app/Module/AlbumModule.php
index 1e6decc75e..2cfc5c2fa0 100644
--- a/app/Module/AlbumModule.php
+++ b/app/Module/AlbumModule.php
@@ -44,7 +44,6 @@ class AlbumModule extends AbstractModule implements ModuleTabInterface {
return Auth::isEditor($WT_TREE) || $this->getMedia();
}
-
/** {@inheritdoc} */
public function isGrayedOut() {
return !$this->getMedia();
@@ -153,6 +152,7 @@ class AlbumModule extends AbstractModule implements ModuleTabInterface {
}
$html .= '</ul>';
$html .= '</td></tr></table>';
+
return $html;
}
@@ -197,6 +197,7 @@ class AlbumModule extends AbstractModule implements ModuleTabInterface {
return array_search($x->getXref(), $wt_obje_sort) - array_search($y->getXref(), $wt_obje_sort);
});
}
+
return $this->media_list;
}
diff --git a/app/Module/BatchUpdate/BatchUpdateBasePlugin.php b/app/Module/BatchUpdate/BatchUpdateBasePlugin.php
index f65b74bd7a..c2fa070bdf 100644
--- a/app/Module/BatchUpdate/BatchUpdateBasePlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateBasePlugin.php
@@ -68,11 +68,11 @@ class BatchUpdateBasePlugin {
if (Auth::user()->getPreference('auto_accept')) {
return array(
BatchUpdateModule::createSubmitButton(I18N::translate('Update'), $xref, 'update'),
- BatchUpdateModule::createSubmitButton(I18N::translate('Update all'), $xref, 'update_all')
+ BatchUpdateModule::createSubmitButton(I18N::translate('Update all'), $xref, 'update_all'),
);
} else {
return array(
- BatchUpdateModule::createSubmitButton(I18N::translate('Update'), $xref, 'update')
+ BatchUpdateModule::createSubmitButton(I18N::translate('Update'), $xref, 'update'),
);
}
}
@@ -91,8 +91,8 @@ class BatchUpdateBasePlugin {
$lcs = self::longestCommonSubsequence($old_lines, $new_lines, 0, count($old_lines) - 1, 0, count($new_lines) - 1);
$diff_lines = array();
- $last_old = -1;
- $last_new = -1;
+ $last_old = -1;
+ $last_new = -1;
while ($lcs) {
list($old, $new) = array_shift($lcs);
while ($last_old < $old - 1) {
@@ -102,8 +102,8 @@ class BatchUpdateBasePlugin {
$diff_lines[] = self::decorateInsertedText($new_lines[++$last_new]);
}
$diff_lines[] = $new_lines[$new];
- $last_old = $old;
- $last_new = $new;
+ $last_old = $old;
+ $last_new = $new;
}
while ($last_old < count($old_lines) - 1) {
$diff_lines[] = self::decorateDeletedText($old_lines[++$last_old]);
@@ -120,10 +120,10 @@ class BatchUpdateBasePlugin {
*
* @param string[] $X
* @param string[] $Y
- * @param integer $x1
- * @param integer $x2
- * @param integer $y1
- * @param integer $y2
+ * @param int $x1
+ * @param int $x2
+ * @param int $y1
+ * @param int $y2
*
* @return array
*/
@@ -133,16 +133,19 @@ class BatchUpdateBasePlugin {
// Match at start of sequence
$tmp = self::longestCommonSubsequence($X, $Y, $x1 + 1, $x2, $y1 + 1, $y2);
array_unshift($tmp, array($x1, $y1));
+
return $tmp;
} elseif ($X[$x2] == $Y[$y2]) {
// Match at end of sequence
$tmp = self::longestCommonSubsequence($X, $Y, $x1, $x2 - 1, $y1, $y2 - 1);
array_push($tmp, array($x2, $y2));
+
return $tmp;
} else {
// No match. Look for subsequences
$tmp1 = self::longestCommonSubsequence($X, $Y, $x1, $x2, $y1, $y2 - 1);
$tmp2 = self::longestCommonSubsequence($X, $Y, $x1, $x2 - 1, $y1, $y2);
+
return count($tmp1) > count($tmp2) ? $tmp1 : $tmp2;
}
} else {
diff --git a/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPlugin.php b/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPlugin.php
index 16a7542c8d..e767f015d7 100644
--- a/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPlugin.php
@@ -53,7 +53,7 @@ class BatchUpdateDuplicateLinksPlugin extends BatchUpdateBasePlugin {
* @param string $xref
* @param string $gedrec
*
- * @return boolean
+ * @return bool
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
return
@@ -75,7 +75,7 @@ class BatchUpdateDuplicateLinksPlugin extends BatchUpdateBasePlugin {
array(
'/(\n1.*@.+@.*(?:(?:\n[2-9].*)*))((?:\n1.*(?:\n[2-9].*)*)*\1)/',
'/(\n2.*@.+@.*(?:(?:\n[3-9].*)*))((?:\n2.*(?:\n[3-9].*)*)*\1)/',
- '/(\n3.*@.+@.*(?:(?:\n[4-9].*)*))((?:\n3.*(?:\n[4-9].*)*)*\1)/'
+ '/(\n3.*@.+@.*(?:(?:\n[4-9].*)*))((?:\n3.*(?:\n[4-9].*)*)*\1)/',
),
'$2',
$gedrec
diff --git a/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php b/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
index 371a11705f..3755863e80 100644
--- a/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
@@ -47,7 +47,7 @@ class BatchUpdateMarriedNamesPlugin extends BatchUpdateBasePlugin {
* @param string $xref
* @param string $gedrec
*
- * @return boolean
+ * @return bool
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
return preg_match('/^1 SEX F/m', $gedrec) && preg_match('/^1 NAME /m', $gedrec) && self::surnamesToAdd($xref, $gedrec);
@@ -67,7 +67,7 @@ class BatchUpdateMarriedNamesPlugin extends BatchUpdateBasePlugin {
$SURNAME_TRADITION = $WT_TREE->getPreference('SURNAME_TRADITION');
preg_match('/^1 NAME (.*)/m', $gedrec, $match);
- $wife_name = $match[1];
+ $wife_name = $match[1];
$married_names = array();
foreach (self::surnamesToAdd($xref, $gedrec) as $surname) {
switch ($this->surname) {
@@ -82,6 +82,7 @@ class BatchUpdateMarriedNamesPlugin extends BatchUpdateBasePlugin {
break;
}
}
+
return preg_replace('/(^1 NAME .*([\r\n]+[2-9].*)*)/m', '\\1' . implode('', $married_names), $gedrec, 1);
}
@@ -92,14 +93,14 @@ class BatchUpdateMarriedNamesPlugin extends BatchUpdateBasePlugin {
* @return string[]
*/
private function surnamesToAdd($xref, $gedrec) {
- $wife_surnames = self::surnames($xref, $gedrec);
- $husb_surnames = array();
+ $wife_surnames = self::surnames($xref, $gedrec);
+ $husb_surnames = array();
$missing_surnames = array();
preg_match_all('/^1 FAMS @(.+)@/m', $gedrec, $fmatch);
foreach ($fmatch[1] as $famid) {
$famrec = BatchUpdateModule::getLatestRecord($famid, 'FAM');
if (preg_match('/^1 MARR/m', $famrec) && preg_match('/^1 HUSB @(.+)@/m', $famrec, $hmatch)) {
- $husbrec = BatchUpdateModule::getLatestRecord($hmatch[1], 'INDI');
+ $husbrec = BatchUpdateModule::getLatestRecord($hmatch[1], 'INDI');
$husb_surnames = array_unique(array_merge($husb_surnames, self::surnames($hmatch[1], $husbrec)));
}
}
diff --git a/app/Module/BatchUpdate/BatchUpdateMissingDeathPlugin.php b/app/Module/BatchUpdate/BatchUpdateMissingDeathPlugin.php
index cdee3380d2..ecbed8795a 100644
--- a/app/Module/BatchUpdate/BatchUpdateMissingDeathPlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateMissingDeathPlugin.php
@@ -44,7 +44,7 @@ class BatchUpdateMissingDeathPlugin extends BatchUpdateBasePlugin {
* @param string $xref
* @param string $gedrec
*
- * @return boolean
+ * @return bool
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
global $WT_TREE;
diff --git a/app/Module/BatchUpdate/BatchUpdateNameFormatPlugin.php b/app/Module/BatchUpdate/BatchUpdateNameFormatPlugin.php
index c3728070d0..27d3c03526 100644
--- a/app/Module/BatchUpdate/BatchUpdateNameFormatPlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateNameFormatPlugin.php
@@ -44,7 +44,7 @@ class BatchUpdateNameFormatPlugin extends BatchUpdateBasePlugin {
* @param string $xref
* @param string $gedrec
*
- * @return boolean
+ * @return bool
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
return
diff --git a/app/Module/BatchUpdate/BatchUpdateSearchReplacePlugin.php b/app/Module/BatchUpdate/BatchUpdateSearchReplacePlugin.php
index 2a032c24f4..c022c428fc 100644
--- a/app/Module/BatchUpdate/BatchUpdateSearchReplacePlugin.php
+++ b/app/Module/BatchUpdate/BatchUpdateSearchReplacePlugin.php
@@ -60,7 +60,7 @@ class BatchUpdateSearchReplacePlugin extends BatchUpdateBasePlugin {
* @param string $xref
* @param string $gedrec
*
- * @return boolean
+ * @return bool
*/
public function doesRecordNeedUpdate($xref, $gedrec) {
return !$this->error && preg_match('/(?:' . $this->regex . ')/mu' . $this->case, $gedrec);
diff --git a/app/Module/BatchUpdate/BirthDeathMarriageReportModule.php b/app/Module/BatchUpdate/BirthDeathMarriageReportModule.php
index ca6f82b9a0..d2d743a4a9 100644
--- a/app/Module/BatchUpdate/BirthDeathMarriageReportModule.php
+++ b/app/Module/BatchUpdate/BirthDeathMarriageReportModule.php
@@ -42,7 +42,7 @@ class BirthDeathMarriageReportModule extends AbstractModule implements ModuleRep
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/BatchUpdateModule.php b/app/Module/BatchUpdateModule.php
index 414872a83c..431d956d41 100644
--- a/app/Module/BatchUpdateModule.php
+++ b/app/Module/BatchUpdateModule.php
@@ -118,7 +118,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
$this->xref = $this->findNextXref($this->xref);
break;
case 'update_all':
- foreach ($this->all_xrefs as $xref=>$type) {
+ foreach ($this->all_xrefs as $xref => $type) {
$record = self::getLatestRecord($xref, $type);
if ($this->PLUGIN->doesRecordNeedUpdate($xref, $record)) {
$newrecord = $this->PLUGIN->updateRecord($xref, $record);
@@ -173,7 +173,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
$html .= '<option value="" selected></option>';
}
- foreach ($this->plugins as $class=>$plugin) {
+ foreach ($this->plugins as $class => $plugin) {
$html .= '<option value="' . $class . '" ' . ($this->plugin == $class ? 'selected' : '') . '>' . $plugin->getName() . '</option>';
}
$html .= '</select>';
@@ -235,6 +235,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
}
}
}
+
return null;
}
@@ -254,6 +255,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
}
}
}
+
return null;
}
@@ -263,28 +265,28 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
private function getAllXrefs() {
global $WT_TREE;
- $sql = array();
+ $sql = array();
$vars = array();
foreach ($this->PLUGIN->getRecordTypesToUpdate() as $type) {
switch ($type) {
case 'INDI':
- $sql[] = "SELECT i_id, 'INDI' FROM `##individuals` WHERE i_file=?";
+ $sql[] = "SELECT i_id, 'INDI' FROM `##individuals` WHERE i_file=?";
$vars[] = $WT_TREE->getTreeId();
break;
case 'FAM':
- $sql[] = "SELECT f_id, 'FAM' FROM `##families` WHERE f_file=?";
+ $sql[] = "SELECT f_id, 'FAM' FROM `##families` WHERE f_file=?";
$vars[] = $WT_TREE->getTreeId();
break;
case 'SOUR':
- $sql[] = "SELECT s_id, 'SOUR' FROM `##sources` WHERE s_file=?";
+ $sql[] = "SELECT s_id, 'SOUR' FROM `##sources` WHERE s_file=?";
$vars[] = $WT_TREE->getTreeId();
break;
case 'OBJE':
- $sql[] = "SELECT m_id, 'OBJE' FROM `##media` WHERE m_file=?";
+ $sql[] = "SELECT m_id, 'OBJE' FROM `##media` WHERE m_file=?";
$vars[] = $WT_TREE->getTreeId();
break;
default:
- $sql[] = "SELECT o_id, ? FROM `##other` WHERE o_type=? AND o_file=?";
+ $sql[] = "SELECT o_id, ? FROM `##other` WHERE o_type=? AND o_file=?";
$vars[] = $type;
$vars[] = $type;
$vars[] = $WT_TREE->getTreeId();
@@ -303,11 +305,11 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
* @return BatchUpdateBasePlugin[]
*/
private function getPluginList() {
- $plugins = array();
+ $plugins = array();
$dir_handle = opendir(__DIR__ . '/BatchUpdate');
while (($file = readdir($dir_handle)) !== false) {
if (substr($file, -10) == 'Plugin.php' && $file !== 'BatchUpdateBasePlugin.php') {
- $class = __NAMESPACE__ . '\\' . basename($file, '.php');
+ $class = __NAMESPACE__ . '\\' . basename($file, '.php');
$plugins[$class] = new $class;
}
}
@@ -387,5 +389,4 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface
return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin_batch_update';
}
-
}
diff --git a/app/Module/BirthReportModule.php b/app/Module/BirthReportModule.php
index 7c7bea4ebe..ec14fa1e41 100644
--- a/app/Module/BirthReportModule.php
+++ b/app/Module/BirthReportModule.php
@@ -42,7 +42,7 @@ class BirthReportModule extends AbstractModule implements ModuleReportInterface
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/CemeteryReportModule.php b/app/Module/CemeteryReportModule.php
index c26bcf70a2..d7e3cc52ab 100644
--- a/app/Module/CemeteryReportModule.php
+++ b/app/Module/CemeteryReportModule.php
@@ -42,7 +42,7 @@ class CemeteryReportModule extends AbstractModule implements ModuleReportInterfa
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/CensusAssistantModule.php b/app/Module/CensusAssistantModule.php
index 2775f4be84..b64b57b536 100644
--- a/app/Module/CensusAssistantModule.php
+++ b/app/Module/CensusAssistantModule.php
@@ -54,7 +54,7 @@ class CensusAssistantModule extends AbstractModule {
*/
private static function mediaFind() {
global $WT_TREE;
-
+
$controller = new SimpleController;
$filter = Filter::get('filter');
$multiple = Filter::getBool('multiple');
@@ -116,7 +116,7 @@ class CensusAssistantModule extends AbstractModule {
echo '<button onclick="window.close();">', I18N::translate('close'), '</button>';
echo "<br>";
- $filter = trim($filter);
+ $filter = trim($filter);
$filter_array = explode(' ', preg_replace('/ {2,}/', ' ', $filter));
echo "<table class=\"tabs_table width90\"><tr>";
$myindilist = search_indis_names($filter_array, array($WT_TREE));
@@ -126,13 +126,13 @@ class CensusAssistantModule extends AbstractModule {
foreach ($myindilist as $indi) {
$nam = Filter::escapeHtml($indi->getFullName());
echo "<li><a href=\"#\" onclick=\"pasterow(
- '".$indi->getXref() . "' ,
- '".$nam . "' ,
- '".$indi->getSex() . "' ,
- '".$indi->getbirthyear() . "' ,
- '".(1901 - $indi->getbirthyear()) . "' ,
- '".$indi->getbirthplace() . "'); return false;\">
- <b>".$indi->getFullName() . "</b>&nbsp;&nbsp;&nbsp;";
+ '" . $indi->getXref() . "' ,
+ '" . $nam . "' ,
+ '" . $indi->getSex() . "' ,
+ '" . $indi->getbirthyear() . "' ,
+ '" . (1901 - $indi->getbirthyear()) . "' ,
+ '" . $indi->getbirthplace() . "'); return false;\">
+ <b>" . $indi->getFullName() . "</b>&nbsp;&nbsp;&nbsp;";
$born = GedcomTag::getLabel('BIRT');
echo "</span><br><span class=\"list_item\">", $born, " ", $indi->getbirthyear(), "&nbsp;&nbsp;&nbsp;", $indi->getbirthplace(), "</span></a></li>";
@@ -268,7 +268,7 @@ class CensusAssistantModule extends AbstractModule {
$postamble = Filter::escapeHtml($match[5]);
$fmt_headers = array();
- foreach ($headers as $key=>$value) {
+ foreach ($headers as $key => $value) {
$fmt_headers['.b.' . $key] = '<span title="' . Filter::escapeHtml($value) . '">' . $key . '</span>';
}
diff --git a/app/Module/ChangeReportModule.php b/app/Module/ChangeReportModule.php
index f4f570b232..65f22614c4 100644
--- a/app/Module/ChangeReportModule.php
+++ b/app/Module/ChangeReportModule.php
@@ -42,7 +42,7 @@ class ChangeReportModule extends AbstractModule implements ModuleReportInterface
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/ChartsBlockModule.php b/app/Module/ChartsBlockModule.php
index 9ae2aba114..68a67a977e 100644
--- a/app/Module/ChartsBlockModule.php
+++ b/app/Module/ChartsBlockModule.php
@@ -56,7 +56,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface {
$person = Individual::getInstance($pid, $WT_TREE);
}
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype == 'gedcom' && Auth::isManager($WT_TREE) || $ctype == 'user' && Auth::check()) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
@@ -110,7 +110,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface {
case 'treenav':
$title .= I18N::translate('Interactive tree of %s', $person->getFullName());
$mod = new InteractiveTreeModule(WT_MODULES_DIR . 'tree');
- $tv = new TreeView;
+ $tv = new TreeView;
$content .= '<td>';
$content .= '<script>jQuery("head").append(\'<link rel="stylesheet" href="' . $mod->css() . '" type="text/css" />\');</script>';
$content .= '<script src="' . $mod->js() . '"></script>';
@@ -175,7 +175,8 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface {
'pedigree' => I18N::translate('Pedigree'),
'descendants' => I18N::translate('Descendants'),
'hourglass' => I18N::translate('Hourglass chart'),
- 'treenav' => I18N::translate('Interactive tree')),
+ 'treenav' => I18N::translate('Interactive tree'),
+ ),
null, $type); ?>
</td>
</tr>
diff --git a/app/Module/CkeditorModule.php b/app/Module/CkeditorModule.php
index 47d503c1fe..d2cd3ab9f8 100644
--- a/app/Module/CkeditorModule.php
+++ b/app/Module/CkeditorModule.php
@@ -37,8 +37,6 @@ class CkeditorModule extends AbstractModule {
* before we have sent the page footer.
*
* @param BaseController $controller
- *
- * @return void
*/
public static function enableEditor($controller) {
$controller
diff --git a/app/Module/ClippingsCart/ClippingsCart.php b/app/Module/ClippingsCart/ClippingsCart.php
index 67c463aa3f..b4d98034f6 100644
--- a/app/Module/ClippingsCart/ClippingsCart.php
+++ b/app/Module/ClippingsCart/ClippingsCart.php
@@ -46,13 +46,13 @@ class ClippingsCart {
/** @var string Whether to download as ZIP file */
private $Zip;
- /** @var integer The number of ancestor generations (individuals) to add */
+ /** @var int The number of ancestor generations (individuals) to add */
public $level1;
- /** @var integer The number of ancestor generations (families) to add */
+ /** @var int The number of ancestor generations (families) to add */
public $level2;
- /** @var integer The number of descendent generations to add */
+ /** @var int The number of descendent generations to add */
public $level3;
/**
@@ -215,7 +215,7 @@ class ClippingsCart {
$record = str_replace($match[0], '', $record);
}
}
- $record = convert_media_path($record, $this->conv_path);
+ $record = convert_media_path($record, $this->conv_path);
$savedRecord = $record; // Save this for the "does this file exist" check
if ($convert === 'yes') {
$record = utf8_decode($record);
@@ -239,7 +239,7 @@ class ClippingsCart {
// This autoloads the PclZip library, so we can use its constants.
new PclZip('');
- $ft = preg_match_all("/\n\d FILE (.+)/", $savedRecord, $match, PREG_SET_ORDER);
+ $ft = preg_match_all("/\n\d FILE (.+)/", $savedRecord, $match, PREG_SET_ORDER);
$MEDIA_DIRECTORY = $WT_TREE->getPreference('MEDIA_DIRECTORY');
for ($k = 0; $k < $ft; $k++) {
// Skip external files and non-existant files
@@ -270,7 +270,7 @@ class ClippingsCart {
}
$filetext .= "0 TRLR\n";
//-- make sure the preferred line endings are used
- $filetext = preg_replace("/[\r\n]+/", WT_EOL, $filetext);
+ $filetext = preg_replace("/[\r\n]+/", WT_EOL, $filetext);
$this->download_data = $filetext;
$this->downloadClipping();
}
@@ -281,23 +281,23 @@ class ClippingsCart {
*/
private function zipCart() {
$tempFileName = 'clipping' . rand() . '.ged';
- $fp = fopen(WT_DATA_DIR . $tempFileName, "wb");
+ $fp = fopen(WT_DATA_DIR . $tempFileName, "wb");
if ($fp) {
flock($fp, LOCK_EX);
fwrite($fp, $this->download_data);
flock($fp, LOCK_UN);
fclose($fp);
$zipName = "clippings" . rand(0, 1500) . ".zip";
- $fname = WT_DATA_DIR . $zipName;
+ $fname = WT_DATA_DIR . $zipName;
$comment = "Created by " . WT_WEBTREES . " " . WT_VERSION . " on " . date("d M Y") . ".";
$archive = new PclZip($fname);
// add the ged file to the root of the zip file (strip off the data folder)
$this->media_list[] = array(\PCLZIP_ATT_FILE_NAME => WT_DATA_DIR . $tempFileName, \PCLZIP_ATT_FILE_NEW_FULL_NAME => $tempFileName);
- $v_list = $archive->create($this->media_list, \PCLZIP_OPT_COMMENT, $comment);
+ $v_list = $archive->create($this->media_list, \PCLZIP_OPT_COMMENT, $comment);
if ($v_list == 0) {
echo "Error : " . $archive->errorInfo(true) . "</td></tr>";
} else {
- $openedFile = fopen($fname, "rb");
+ $openedFile = fopen($fname, "rb");
$this->download_data = fread($openedFile, filesize($fname));
fclose($openedFile);
unlink($fname);
@@ -334,7 +334,7 @@ class ClippingsCart {
*/
public function addClipping(GedcomRecord $record) {
if ($record->canShowName()) {
- $cart = Session::get('cart');
+ $cart = Session::get('cart');
$cart[$record->getTree()->getTreeId()][$record->getXref()] = true;
// Add directly linked records
preg_match_all('/\n\d (?:OBJE|NOTE|SOUR|REPO) @(' . WT_REGEX_XREF . ')@/', $record->getGedcom(), $matches);
@@ -349,7 +349,7 @@ class ClippingsCart {
* Recursive function to traverse the tree
*
* @param Family|null $family
- * @param integer $level
+ * @param int $level
*/
public function addFamilyDescendancy(Family $family = null, $level = PHP_INT_MAX) {
if (!$family) {
@@ -391,7 +391,7 @@ class ClippingsCart {
* Recursively add direct-line ancestors to cart
*
* @param Individual|null $person
- * @param integer $level
+ * @param int $level
*/
public function addAncestorsToCart(Individual $person = null, $level = 0) {
if (!$person) {
@@ -411,7 +411,7 @@ class ClippingsCart {
* Recursively adds direct-line ancestors and their families to the cart
*
* @param Individual|null $person
- * @param integer $level
+ * @param int $level
*/
public function addAncestorsToCartFamilies(Individual $person = null, $level = 0) {
if (!$person) {
@@ -432,7 +432,7 @@ class ClippingsCart {
* @param string $a
* @param string $b
*
- * @return integer
+ * @return int
*/
private static function compareClippings($a, $b) {
global $WT_TREE;
diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php
index c2190696cc..087e11d144 100644
--- a/app/Module/ClippingsCartModule.php
+++ b/app/Module/ClippingsCartModule.php
@@ -20,7 +20,6 @@ namespace Fisharebest\Webtrees;
* Class ClippingsCartModule
*/
class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, ModuleSidebarInterface {
-
/** {@inheritdoc} */
public function getTitle() {
return /* I18N: Name of a module */ I18N::translate('Clippings cart');
@@ -49,7 +48,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
$MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
- $cart = Session::get('cart');
+ $cart = Session::get('cart');
$clip_ctrl = new ClippingsCart;
$controller = new PageController;
@@ -472,6 +471,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
$submenu = new Menu(I18N::translate('Add to the clippings cart'), 'module.php?mod=clippings&amp;mod_action=index&amp;action=add&amp;id=' . $controller->record->getXref(), 'menu-clippingsadd');
$menu->addSubmenu($submenu);
}
+
return $menu;
}
@@ -530,7 +530,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
} elseif ($add1) {
$record = Individual::getInstance($add1, $WT_TREE);
if ($record) {
- $clip_ctrl->id = $record->getXref();
+ $clip_ctrl->id = $record->getXref();
$clip_ctrl->type = $record::RECORD_TYPE;
if ($others == 'parents') {
foreach ($record->getChildFamilies() as $family) {
@@ -629,6 +629,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
if ($record && !array_key_exists($record->getXref(), $cart[$WT_TREE->getTreeId()])) {
$out .= '<br><a href="module.php?mod=' . $this->getName() . '&amp;mod_action=ajax&amp;sb_action=clippings&amp;add=' . $pid . '&amp;pid=' . $pid . '" class="add_cart"><i class="icon-clippings"></i> ' . I18N::translate('Add %s to the clippings cart', $record->getFullName()) . '</a>';
}
+
return $out;
}
@@ -651,14 +652,14 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
$out .= '<form method="get" action="module.php">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
- <input type="hidden" name="pid" value="' .$pid . '">
+ <input type="hidden" name="pid" value="' . $pid . '">
<input type="hidden" name="action" value="download">
<table>
- <tr><td colspan="2" class="topbottombar"><h2>'. I18N::translate('Download') . '</h2></td></tr>
- <tr><td class="descriptionbox width50 wrap">'. I18N::translate('Zip file(s)') . '</td>
+ <tr><td colspan="2" class="topbottombar"><h2>' . I18N::translate('Download') . '</h2></td></tr>
+ <tr><td class="descriptionbox width50 wrap">' . I18N::translate('Zip file(s)') . '</td>
<td class="optionbox"><input type="checkbox" name="Zip" value="yes" checked></td></tr>
- <tr><td class="descriptionbox width50 wrap">'. I18N::translate('Include media (automatically zips files)') . '</td>
+ <tr><td class="descriptionbox width50 wrap">' . I18N::translate('Include media (automatically zips files)') . '</td>
<td class="optionbox"><input type="checkbox" name="IncludeMedia" value="yes" checked></td></tr>
';
@@ -681,23 +682,23 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
}
$out .= '
- <tr><td class="descriptionbox width50 wrap">'. I18N::translate('Convert from UTF-8 to ISO-8859-1') . '</td>
+ <tr><td class="descriptionbox width50 wrap">' . I18N::translate('Convert from UTF-8 to ISO-8859-1') . '</td>
<td class="optionbox"><input type="checkbox" name="convert" value="yes"></td></tr>
<tr>
- <td class="descriptionbox width50 wrap">'. I18N::translate('Add the GEDCOM media path to filenames') . '</td>
+ <td class="descriptionbox width50 wrap">' . I18N::translate('Add the GEDCOM media path to filenames') . '</td>
<td class="optionbox">
<input type="checkbox" name="conv_path" value="' . Filter::escapeHtml($WT_TREE->getPreference('GEDCOM_MEDIA_PATH')) . '">
<span dir="auto">' . Filter::escapeHtml($WT_TREE->getPreference('GEDCOM_MEDIA_PATH')) . '</span></td>
</tr>
- <input type="hidden" name="conv_path" value="'.$clip_ctrl->conv_path . '">
+ <input type="hidden" name="conv_path" value="' . $clip_ctrl->conv_path . '">
</td></tr>
<tr><td class="topbottombar" colspan="2">
- <input type="button" value="'. I18N::translate('Cancel') . '" onclick="cancelDownload();">
- <input type="submit" value="'. I18N::translate('Download') . '">
+ <input type="button" value="' . I18N::translate('Cancel') . '" onclick="cancelDownload();">
+ <input type="submit" value="' . I18N::translate('Download') . '">
</form>';
return $out;
diff --git a/app/Module/DeathReportModule.php b/app/Module/DeathReportModule.php
index 84bc6f4079..2c24edc056 100644
--- a/app/Module/DeathReportModule.php
+++ b/app/Module/DeathReportModule.php
@@ -42,7 +42,7 @@ class DeathReportModule extends AbstractModule implements ModuleReportInterface
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/DescendancyModule.php b/app/Module/DescendancyModule.php
index 3d5a08bb7c..99b2bea9d4 100644
--- a/app/Module/DescendancyModule.php
+++ b/app/Module/DescendancyModule.php
@@ -125,7 +125,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
/**
* @param Individual $person
- * @param integer $generations
+ * @param int $generations
*
* @return string
*/
@@ -148,7 +148,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
/**
* @param Family $family
* @param Individual $person
- * @param integer $generations
+ * @param int $generations
*
* @return string
*/
@@ -163,7 +163,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
}
$marryear = $family->getMarriageYear();
- $marr = $marryear ? '<i class="icon-rings"></i>' . $marryear : '';
+ $marr = $marryear ? '<i class="icon-rings"></i>' . $marryear : '';
return
'<li class="sb_desc_indi_li">' .
@@ -212,7 +212,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
/**
* @param Individual $person
- * @param integer $generations
+ * @param int $generations
*
* @return string
*/
@@ -231,8 +231,8 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
}
/**
- * @param Family $family
- * @param integer $generations
+ * @param Family $family
+ * @param int $generations
*
* @return string
*/
diff --git a/app/Module/DescendancyReportModule.php b/app/Module/DescendancyReportModule.php
index 82b4b2c558..b7ea4b7a20 100644
--- a/app/Module/DescendancyReportModule.php
+++ b/app/Module/DescendancyReportModule.php
@@ -42,7 +42,7 @@ class DescendancyReportModule extends AbstractModule implements ModuleReportInte
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/ExtraInformationModule.php b/app/Module/ExtraInformationModule.php
index 30d2e8148f..12f91ab546 100644
--- a/app/Module/ExtraInformationModule.php
+++ b/app/Module/ExtraInformationModule.php
@@ -75,7 +75,7 @@ class ExtraInformationModule extends AbstractModule implements ModuleSidebarInte
*
* @param Fact $fact
*
- * @return boolean
+ * @return bool
*/
public static function showFact(Fact $fact) {
switch ($fact->getTag()) {
diff --git a/app/Module/FactSourcesReportModule.php b/app/Module/FactSourcesReportModule.php
index 2fdfe299d0..4949828c74 100644
--- a/app/Module/FactSourcesReportModule.php
+++ b/app/Module/FactSourcesReportModule.php
@@ -42,7 +42,7 @@ class FactSourcesReportModule extends AbstractModule implements ModuleReportInte
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/FamiliesSidebarModule.php b/app/Module/FamiliesSidebarModule.php
index 8451a4ca41..90a7c391f9 100644
--- a/app/Module/FamiliesSidebarModule.php
+++ b/app/Module/FamiliesSidebarModule.php
@@ -104,7 +104,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
if (!famloadedNames[surname]) {
jQuery.ajax({
- url: "module.php?mod='.$this->getName() . '&mod_action=ajax&sb_action=families&alpha="+alpha+"&surname="+surname,
+ url: "module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=families&alpha="+alpha+"&surname="+surname,
cache: false,
success: function(html) {
jQuery("#sb_fam_"+surname+" div").html(html);
@@ -129,7 +129,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
');
$out = '<form method="post" action="module.php?mod=' . $this->getName() . '&amp;mod_action=ajax" onsubmit="return false;"><input type="search" name="sb_fam_name" id="sb_fam_name" placeholder="' . I18N::translate('Search') . '"><p>';
- foreach ($initials as $letter=>$count) {
+ foreach ($initials as $letter => $count) {
switch ($letter) {
case '@':
$html = $UNKNOWN_NN;
@@ -163,7 +163,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
*/
private function getAlphaSurnames(Tree $tree, $alpha) {
$surnames = QueryName::surnames($tree, '', $alpha, true, true);
- $out = '<ul>';
+ $out = '<ul>';
foreach (array_keys($surnames) as $surname) {
$out .= '<li id="sb_fam_' . $surname . '" class="sb_fam_surname_li"><a href="' . $surname . '" title="' . $surname . '" alt="' . $alpha . '" class="sb_fam_surname">' . $surname . '</a>';
$out .= '<div class="name_tree_div"></div>';
@@ -183,7 +183,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
*/
public function getSurnameFams(Tree $tree, $alpha, $surname) {
$families = QueryName::families($tree, $surname, $alpha, '', true);
- $out = '<ul>';
+ $out = '<ul>';
foreach ($families as $family) {
if ($family->canShowName()) {
$out .= '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . ' ';
@@ -233,17 +233,17 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
$vars = array();
if (empty($ids)) {
//-- no match : search for FAM id
- $where = "f_id LIKE CONCAT('%', ?, '%')";
+ $where = "f_id LIKE CONCAT('%', ?, '%')";
$vars[] = $query;
} else {
//-- search for spouses
- $qs = implode(',', array_fill(0, count($ids), '?'));
+ $qs = implode(',', array_fill(0, count($ids), '?'));
$where = "(f_husb IN ($qs) OR f_wife IN ($qs))";
- $vars = array_merge($vars, $ids, $ids);
+ $vars = array_merge($vars, $ids, $ids);
}
$vars[] = $tree->getTreeId();
- $rows = Database::prepare("SELECT f_id AS xref, f_file AS gedcom_id, f_gedcom AS gedcom FROM `##families` WHERE {$where} AND f_file=?")
+ $rows = Database::prepare("SELECT f_id AS xref, f_file AS gedcom_id, f_gedcom AS gedcom FROM `##families` WHERE {$where} AND f_file=?")
->execute($vars)
->fetchAll();
diff --git a/app/Module/FamilyGroupReportModule.php b/app/Module/FamilyGroupReportModule.php
index 8c3194d381..ef956cbf80 100644
--- a/app/Module/FamilyGroupReportModule.php
+++ b/app/Module/FamilyGroupReportModule.php
@@ -42,7 +42,7 @@ class FamilyGroupReportModule extends AbstractModule implements ModuleReportInte
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;famid=' . $controller->getSignificantFamily()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/FamilyNavigatorModule.php b/app/Module/FamilyNavigatorModule.php
index a707c2d82d..524bf18dbf 100644
--- a/app/Module/FamilyNavigatorModule.php
+++ b/app/Module/FamilyNavigatorModule.php
@@ -20,7 +20,6 @@ namespace Fisharebest\Webtrees;
* Class FamilyNavigatorModule
*/
class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInterface {
-
const TTL = "<div class='flyout2'>%s</div>";
const LNK = "<div class='flyout3' data-href='%s'>%s</div>";
const MSG = "<div class='flyout4'>(%s)</div>"; // class flyout4 not used in standard themes
@@ -156,8 +155,8 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
}
/**
- * @param $person
- * @param boolean $showUnknown
+ * @param $person
+ * @param bool $showUnknown
*
* @return string
*/
@@ -179,7 +178,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
private function getParents(Individual $person) {
$father = null;
$mother = null;
- $html = sprintf(self::TTL, I18N::translate('Parents'));
+ $html = sprintf(self::TTL, I18N::translate('Parents'));
$family = $person->getPrimaryChildFamily();
if (!Auth::isSearchEngine() && $person->canShowName() && $family !== null) {
$father = $family->getHusband();
@@ -207,6 +206,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
if (!($father instanceof Individual || $mother instanceof Individual)) {
$html .= sprintf(self::MSG, I18N::translateContext('unknown family', 'unknown'));
}
+
return $html;
}
@@ -234,6 +234,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
if (!$html) {
$html = sprintf(self::MSG, I18N::translate('none'));
}
+
return sprintf(self::TTL, I18N::translate('Family')) . $html;
}
diff --git a/app/Module/FamilyTreeFavoritesModule.php b/app/Module/FamilyTreeFavoritesModule.php
index 870864fc5e..de67daa00d 100644
--- a/app/Module/FamilyTreeFavoritesModule.php
+++ b/app/Module/FamilyTreeFavoritesModule.php
@@ -99,7 +99,7 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
$userfavs = array();
}
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
$title = $this->getTitle();
@@ -111,7 +111,7 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
$content = '';
if ($userfavs) {
- foreach ($userfavs as $key=>$favorite) {
+ foreach ($userfavs as $key => $favorite) {
if (isset($favorite['id'])) {
$key = $favorite['id'];
}
@@ -195,6 +195,7 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -234,9 +235,9 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
/**
* Delete a favorite from the database
*
- * @param integer $favorite_id
+ * @param int $favorite_id
*
- * @return boolean
+ * @return bool
*/
public static function deleteFavorite($favorite_id) {
return (bool)
@@ -249,7 +250,7 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
*
* @param $favorite
*
- * @return boolean
+ * @return bool
*/
public static function addFavorite($favorite) {
// -- make sure a favorite is added
@@ -288,7 +289,7 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt
/**
* Get favorites for a user or family tree
*
- * @param integer $gedcom_id
+ * @param int $gedcom_id
*
* @return string[][]
*/
diff --git a/app/Module/FamilyTreeStatisticsModule.php b/app/Module/FamilyTreeStatisticsModule.php
index d7eec9541c..53c95b6bc1 100644
--- a/app/Module/FamilyTreeStatisticsModule.php
+++ b/app/Module/FamilyTreeStatisticsModule.php
@@ -65,7 +65,7 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn
}
}
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype === 'gedcom' && Auth::isManager($WT_TREE) || $ctype === 'user' && Auth::check()) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
@@ -81,7 +81,7 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn
if ($show_last_update) {
$content .= '<div>' . /* I18N: %s is a date */ I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) . '</div>';
}
-/** Responsive Design */
+ /** Responsive Design */
$content .= '<div class="stat-table1">';
if ($stat_indi) {
diff --git a/app/Module/FrequentlyAskedQuestionsModule.php b/app/Module/FrequentlyAskedQuestionsModule.php
index 764c03908b..e0d6818875 100644
--- a/app/Module/FrequentlyAskedQuestionsModule.php
+++ b/app/Module/FrequentlyAskedQuestionsModule.php
@@ -78,7 +78,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen
)->execute(array(
'tree_id' => Filter::postInteger('gedcom_id'),
'block_order' => Filter::postInteger('block_order'),
- 'block_id' => $block_id
+ 'block_id' => $block_id,
));
} else {
Database::prepare(
@@ -243,7 +243,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen
)->execute(array(
'block_order' => $block_order,
'module_name_1' => $this->getName(),
- 'module_name_2' => $this->getName()
+ 'module_name_2' => $this->getName(),
))->fetchOneRow();
if ($swap_block) {
Database::prepare(
diff --git a/app/Module/GoogleMapsModule.php b/app/Module/GoogleMapsModule.php
index bf06203da9..e7d266e3ce 100644
--- a/app/Module/GoogleMapsModule.php
+++ b/app/Module/GoogleMapsModule.php
@@ -37,14 +37,13 @@ use PDOException;
* Hence, use "Google Maps™ mapping service" where appropriate.
*/
class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface, ModuleTabInterface {
-
/** @var array of ancestors of root person */
private $ancestors = array();
- /** @var integer Number of generation to display */
+ /** @var int Number of generation to display */
private $generations;
- /** @var integer Number of nodes in the chart */
+ /** @var int Number of nodes in the chart */
private $treesize;
/** {@inheritdoc} */
@@ -190,6 +189,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// end
echo '</td></tr></table>';
echo '<script>loadMap();</script>';
+
return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
} else {
$html = '<table class="facts_table">';
@@ -200,6 +200,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$html .= '<a href="module.php?mod=googlemap&amp;mod_action=admin_config">' . I18N::translate('Google Maps™ preferences') . '</a>';
$html .= '</td></tr>';
}
+
return $html;
}
}
@@ -270,10 +271,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$controller->pageHeader();
$map_types = array(
- 'ROADMAP' => I18N::translate('Map'),
+ 'ROADMAP' => I18N::translate('Map'),
'SATELLITE' => I18N::translate('Satellite'),
- 'HYBRID' => I18N::translate('Hybrid'),
- 'TERRAIN' => I18N::translate('Terrain'),
+ 'HYBRID' => I18N::translate('Hybrid'),
+ 'TERRAIN' => I18N::translate('Terrain'),
);
?>
@@ -320,7 +321,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
</tr>
<tr>
<th><?php echo /* I18N: http://en.wikipedia.org/wiki/Google_street_view */ I18N::translate('Google Street View™'); ?></th>
- <td><?php echo radio_buttons('GM_USE_STREETVIEW', array(false=> I18N::translate('hide'), true=> I18N::translate('show')), $this->getSetting('GM_USE_STREETVIEW'), 'class="radio-inline"'); ?></td>
+ <td><?php echo radio_buttons('GM_USE_STREETVIEW', array(false => I18N::translate('hide'), true => I18N::translate('show')), $this->getSetting('GM_USE_STREETVIEW'), 'class="radio-inline"'); ?></td>
</tr>
<tr>
<th><?php echo I18N::translate('Size of map (in pixels)'); ?></th>
@@ -612,7 +613,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<?php
}
$countryList = array();
- $placesDir = scandir(WT_MODULES_DIR . 'googlemap/places/');
+ $placesDir = scandir(WT_MODULES_DIR . 'googlemap/places/');
for ($i = 0; $i < count($country); $i++) {
if (count(preg_grep('/' . $country[$i] . '/', $placesDir)) != 0) {
$rep = opendir(WT_MODULES_DIR . 'googlemap/places/' . $country[$i] . '/');
@@ -659,7 +660,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<td class="optionbox" colspan="4">
<select name="COUNTRYSELECT" dir="ltr" onchange="selectCountry()">
<option value="Countries"><?php echo I18N::translate('Countries'); ?></option>
- <?php foreach ($countryList as $country_key=>$country_name) {
+ <?php foreach ($countryList as $country_key => $country_name) {
echo '<option value="', $country_key, '" ';
if ($countrySelected == $country_key) {
echo 'selected';
@@ -703,7 +704,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<td class="optionbox" colspan="4">
<select name="STATESELECT" dir="ltr" onchange="selectCountry()">
<option value="States"><?php echo /* I18N: Part of a country, state/region/county */ I18N::translate('Subdivision'); ?></option>
- <?php foreach ($stateList as $state_key=>$state_name) {
+ <?php foreach ($stateList as $state_key => $state_name) {
echo '<option value="', $state_key, '" ';
if ($stateSelected == $state_key) {
echo 'selected';
@@ -745,10 +746,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
- $controller = new ChartController();
+ $controller = new ChartController();
$this->generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
- $this->treesize = pow(2, $this->generations) - 1;
- $this->ancestors = array_values($controller->sosaAncestors($this->generations));
+ $this->treesize = pow(2, $this->generations) - 1;
+ $this->ancestors = array_values($controller->sosaAncestors($this->generations));
// Start of internal configuration variables
// Limit this to match available number of icons.
@@ -809,15 +810,15 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<!-- count records by type -->
<?php
- $curgen = 1;
- $priv = 0;
- $count = 0;
+ $curgen = 1;
+ $priv = 0;
+ $count = 0;
$miscount = 0;
- $missing = '';
+ $missing = '';
$latlongval = array();
- $lat = array();
- $lon = array();
+ $lat = array();
+ $lon = array();
for ($i = 0; $i < ($this->treesize); $i++) {
// -- check to see if we have moved to the next generation
if ($i + 1 >= pow(2, $curgen)) {$curgen++; }
@@ -941,7 +942,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// Set CSS styles for the DIV containing the control
// Setting padding to 5 px will offset the control from the edge of the map
'controlDiv.style.paddingTop = "5px";
- controlDiv.style.paddingRight = "0px";'.
+ controlDiv.style.paddingRight = "0px";' .
// Set CSS for the control border
'var controlUI = document.createElement("DIV");
controlUI.style.backgroundColor = "white";
@@ -953,15 +954,15 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
controlUI.style.cursor = "pointer";
controlUI.style.textAlign = "center";
controlUI.title = "";
- controlDiv.appendChild(controlUI);'.
+ controlDiv.appendChild(controlUI);' .
// Set CSS for the control interior
'var controlText = document.createElement("DIV");
controlText.style.fontFamily = "Arial,sans-serif";
controlText.style.fontSize = "12px";
controlText.style.paddingLeft = "15px";
controlText.style.paddingRight = "15px";
- controlText.innerHTML = "<b>'. I18N::translate('Redraw map') . '<\/b>";
- controlUI.appendChild(controlText);'.
+ controlText.innerHTML = "<b>' . I18N::translate('Redraw map') . '<\/b>";
+ controlUI.appendChild(controlText);' .
// Setup the click event listeners: simply set the map to original LatLng
'google.maps.event.addDomListener(controlUI, "click", function() {
pm_map.setMapTypeId(google.maps.MapTypeId.TERRAIN),
@@ -972,14 +973,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
document.getElementById(lastlinkid).className = "person_box:target";
}
});
- }'.
+ }' .
// This function picks up the click and opens the corresponding info window
'function myclick(i) {
if (document.getElementById(lastlinkid) != null) {
document.getElementById(lastlinkid).className = "person_box:target";
}
google.maps.event.trigger(gmarkers[i], "click");
- }'.
+ }' .
// this variable will collect the html which will eventually be placed in the side_bar
'var side_bar_html = "";' .
// arrays to hold copies of the markers and html used by the side_bar
@@ -987,7 +988,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
'var gmarkers = [];
var i = 0;
var lastlinkid;
- var infowindow = new google.maps.InfoWindow({});'.
+ var infowindow = new google.maps.InfoWindow({});' .
// === Create an associative array of GIcons()
'var gicons = [];
gicons["1"] = new google.maps.MarkerImage(WT_STATIC_URL+WT_MODULES_DIR+"googlemap/images/icon1.png")
@@ -1247,10 +1248,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
new google.maps.Size(24, 24), // Image size
new google.maps.Point(0, 0), // Image origin
new google.maps.Point(2, 22) // Image anchor
- );'.
+ );' .
// / A function to create the marker and set up the event window
'function createMarker(point, name, html, mhtml, icontype) {
- var contentString = "<div id=\'iwcontent_edit\'>"+mhtml+"<\/div>";'.
+ var contentString = "<div id=\'iwcontent_edit\'>"+mhtml+"<\/div>";' .
// Create a marker with the requested icon
'var marker = new google.maps.Marker({
icon: gicons[icontype],
@@ -1269,14 +1270,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
document.getElementById(lastlinkid).className = "person_box:target";
}
lastlinkid=linkid;
- });'.
+ });' .
// save the info we need to use later for the side_bar
'gmarkers[i] = marker;' .
// add a line to the side_bar html
'side_bar_html += "<br><div id=\'"+linkid+"\' onclick=\'myclick(" + i + ")\'>" + html +"<br></div>";
i++;
return marker;
- };'.
+ };' .
// create the map
'var myOptions = {
zoom: 6,
@@ -1298,12 +1299,12 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
document.getElementById(lastlinkid).className = "person_box:target";
}
infowindow.close();
- });'.
+ });' .
// Create the DIV to hold the control and call HomeControl() passing in this DIV. --
'var homeControlDiv = document.createElement("DIV");
var homeControl = new HomeControl(homeControlDiv, pm_map);
homeControlDiv.index = 1;
- pm_map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);'.
+ pm_map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);' .
// create the map bounds
'var bounds = new google.maps.LatLngBounds();';
// add the points
@@ -1393,9 +1394,9 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$js .= '
var linecolor;
var plines;
- var lines = [new google.maps.LatLng('.$lat[$i] . ',' . $lon[$i] . '),
- new google.maps.LatLng('.$lat[$to_child] . ',' . $lon[$to_child] . ')];
- linecolor = "'.$colored_line[$curgen] . '";
+ var lines = [new google.maps.LatLng(' . $lat[$i] . ',' . $lon[$i] . '),
+ new google.maps.LatLng(' . $lat[$to_child] . ',' . $lon[$to_child] . ')];
+ linecolor = "' . $colored_line[$curgen] . '";
plines = new google.maps.Polygon({
paths: lines,
strokeColor: linecolor,
@@ -1420,17 +1421,17 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// Close the sidebar highlight when the infowindow is closed
'google.maps.event.addListener(infowindow, "closeclick", function() {
document.getElementById(lastlinkid).className = "person_box:target";
- });'.
+ });' .
// put the assembled side_bar_html contents into the side_bar div
'document.getElementById("side_bar").innerHTML = side_bar_html;' .
// create the context menu div
'var contextmenu = document.createElement("div");
contextmenu.style.visibility="hidden";
- contextmenu.innerHTML = "<a href=\'#\' onclick=\'zoomIn()\'><div class=\'optionbox\'>&nbsp;&nbsp;'. I18N::translate('Zoom in') . '&nbsp;&nbsp;</div></a>"
- + "<a href=\'#\' onclick=\'zoomOut()\'><div class=\'optionbox\'>&nbsp;&nbsp;'. I18N::translate('Zoom out') . '&nbsp;&nbsp;</div></a>"
- + "<a href=\'#\' onclick=\'zoomInHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;'. I18N::translate('Zoom in here') . '</div></a>"
- + "<a href=\'#\' onclick=\'zoomOutHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;'. I18N::translate('Zoom out here') . '&nbsp;&nbsp;</div></a>"
- + "<a href=\'#\' onclick=\'centreMapHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;'. I18N::translate('Center map here') . '&nbsp;&nbsp;</div></a>";' .
+ contextmenu.innerHTML = "<a href=\'#\' onclick=\'zoomIn()\'><div class=\'optionbox\'>&nbsp;&nbsp;' . I18N::translate('Zoom in') . '&nbsp;&nbsp;</div></a>"
+ + "<a href=\'#\' onclick=\'zoomOut()\'><div class=\'optionbox\'>&nbsp;&nbsp;' . I18N::translate('Zoom out') . '&nbsp;&nbsp;</div></a>"
+ + "<a href=\'#\' onclick=\'zoomInHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;' . I18N::translate('Zoom in here') . '</div></a>"
+ + "<a href=\'#\' onclick=\'zoomOutHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;' . I18N::translate('Zoom out here') . '&nbsp;&nbsp;</div></a>"
+ + "<a href=\'#\' onclick=\'centreMapHere()\'><div class=\'optionbox\'>&nbsp;&nbsp;' . I18N::translate('Center map here') . '&nbsp;&nbsp;</div></a>";' .
// listen for singlerightclick
'google.maps.event.addListener(pm_map,"singlerightclick", function(pixel,tile) {' .
// store the "pixel" info in case we need it later
@@ -1446,7 +1447,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
pos.apply(contextmenu);
contextmenu.style.visibility = "visible";
});
- '.
+ ' .
// functions that perform the context menu options
'function zoomIn() {' .
// perform the requested operation
@@ -1454,34 +1455,34 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// hide the context menu now that it has been used
'contextmenu.style.visibility="hidden";
}
- function zoomOut() {'.
+ function zoomOut() {' .
// perform the requested operation
'pm_map.zoomOut();' .
// hide the context menu now that it has been used
'contextmenu.style.visibility="hidden";
}
- function zoomInHere() {'.
+ function zoomInHere() {' .
// perform the requested operation
'var point = pm_map.fromContainerPixelToLatLng(clickedPixel)
- pm_map.zoomIn(point,true);'.
+ pm_map.zoomIn(point,true);' .
// hide the context menu now that it has been used
'contextmenu.style.visibility="hidden";
}
- function zoomOutHere() {'.
+ function zoomOutHere() {' .
// perform the requested operation
'var point = pm_map.fromContainerPixelToLatLng(clickedPixel)
- pm_map.setCenter(point,pm_map.getZoom()-1);'.
+ pm_map.setCenter(point,pm_map.getZoom()-1);' .
// There is no pm_map.zoomOut() equivalent
// hide the context menu now that it has been used
'contextmenu.style.visibility="hidden";
}
- function centreMapHere() {'.
+ function centreMapHere() {' .
// perform the requested operation
'var point = pm_map.fromContainerPixelToLatLng(clickedPixel)
- pm_map.setCenter(point);'.
+ pm_map.setCenter(point);' .
// hide the context menu now that it has been used
'contextmenu.style.visibility="hidden";
- }'.
+ }' .
// If the user clicks on the map, close the context menu
'google.maps.event.addListener(pm_map, "click", function() {
contextmenu.style.visibility="hidden";
@@ -1548,7 +1549,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<option value="XYZ">', I18N::translate('All'), '</option>';
$rows = Database::prepare("SELECT pl_id, pl_place FROM `##placelocation` WHERE pl_level=0 ORDER BY pl_place")
->fetchAssoc();
- foreach ($rows as $id=>$place) {
+ foreach ($rows as $id => $place) {
echo '<option value="', Filter::escapeHtml($place), '" ';
if ($place == $country) {
echo 'selected';
@@ -1586,7 +1587,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
echo '<div id="gm_check_title">', Tree::findById($gedcom_id)->getTitleHtml(), '</div>';
//Select all '2 PLAC ' tags in the file and create array
$place_list = array();
- $ged_data = Database::prepare("SELECT i_gedcom FROM `##individuals` WHERE i_gedcom LIKE ? AND i_file=?")
+ $ged_data = Database::prepare("SELECT i_gedcom FROM `##individuals` WHERE i_gedcom LIKE ? AND i_file=?")
->execute(array("%\n2 PLAC %", $gedcom_id))
->fetchOneColumn();
foreach ($ged_data as $ged_datum) {
@@ -1623,11 +1624,11 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$i = count($place_list);
//calculate maximum no. of levels to display
- $x = 0;
+ $x = 0;
$max = 0;
while ($x < $i) {
- $levels = explode(",", $place_list[$x]);
- $parts = count($levels);
+ $levels = explode(",", $place_list[$x]);
+ $parts = count($levels);
if ($parts > $max) $max = $parts;
$x++; }
$x = 0;
@@ -1671,34 +1672,34 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
echo '</tr>';
$countrows = 0;
- $matched = array();
+ $matched = array();
while ($x < $i) {
$placestr = "";
- $levels = explode(",", $place_list[$x]);
- $parts = count($levels);
- $levels = array_reverse($levels);
+ $levels = explode(",", $place_list[$x]);
+ $parts = count($levels);
+ $levels = array_reverse($levels);
$placestr .= "<a href=\"placelist.php?action=show";
- foreach ($levels as $pindex=>$ppart) {
+ foreach ($levels as $pindex => $ppart) {
$ppart = urlencode(trim($ppart));
$placestr .= "&amp;parent[$pindex]=" . $ppart . "";
}
$placestr .= "\">" . $place_list[$x] . "</a>";
- $gedplace = "<tr><td>" . $placestr . "</td>";
- $z = 0;
- $id = 0;
- $level = 0;
+ $gedplace = "<tr><td>" . $placestr . "</td>";
+ $z = 0;
+ $id = 0;
+ $level = 0;
$matched[$x] = 0; // used to exclude places where the gedcom place is matched at all levels
$mapstr_edit = "<a href=\"#\" onclick=\"edit_place_location('";
- $mapstr_add = "<a href=\"#\" onclick=\"add_place_location('";
- $mapstr3 = "";
- $mapstr4 = "";
- $mapstr5 = "')\" title='";
- $mapstr6 = "' >";
- $mapstr7 = "')\">";
- $mapstr8 = "</a>";
- $plac = array();
- $lati = array();
- $long = array();
+ $mapstr_add = "<a href=\"#\" onclick=\"add_place_location('";
+ $mapstr3 = "";
+ $mapstr4 = "";
+ $mapstr5 = "')\" title='";
+ $mapstr6 = "' >";
+ $mapstr7 = "')\">";
+ $mapstr8 = "</a>";
+ $plac = array();
+ $lati = array();
+ $long = array();
while ($z < $parts) {
if ($levels[$z] == ' ' || $levels[$z] == '')
$levels[$z] = "unknown"; // GoogleMap module uses "unknown" while GEDCOM uses , ,
@@ -1706,7 +1707,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$levels[$z] = rtrim(ltrim($levels[$z]));
$placelist = $this->createPossiblePlaceNames($levels[$z], $z + 1); // add the necessary prefix/postfix values to the place name
- foreach ($placelist as $key=>$placename) {
+ foreach ($placelist as $key => $placename) {
$row =
Database::prepare("SELECT pl_id, pl_place, pl_long, pl_lati, pl_zoom FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place")
->execute(array($z, $id, $placename))
@@ -1788,7 +1789,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
*
* @param Individual $individual
*
- * @return boolean
+ * @return bool
*/
private function checkMapData(Individual $individual) {
$statement = Database::prepare(
@@ -1874,8 +1875,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param string $placename
- * @param integer $level
+ * @param string $placename
+ * @param int $level
*
* @return string[]
*/
@@ -1943,7 +1944,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// Create the markers list array
$gmarks = array();
- $i = 0;
+ $i = 0;
foreach ($indifacts as $fact) {
if (!$fact->getPlace()->isEmpty()) {
@@ -2354,7 +2355,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// Add the markers to the map from the $gmarks array
var locations = [
- <?php foreach ($gmarks as $n=>$gmark) { ?>
+ <?php foreach ($gmarks as $n => $gmark) { ?>
<?php echo $n ? ',' : ''; ?>
{
"event": "<?php echo Filter::escapeJs($gmark['fact_label']); ?>",
@@ -2495,7 +2496,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/**
* @param string $place
*
- * @return integer
+ * @return int
*/
private function getPlaceLocationId($place) {
$par = explode(',', strip_tags($place));
@@ -2513,7 +2514,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$pl_id = (int) Database::prepare(
"SELECT pl_id FROM `##placelocation` WHERE pl_level = :level AND pl_parent_id = :parent_id AND pl_place LIKE :placename"
)->execute(array(
- 'level' => $i,
+ 'level' => $i,
'parent_id' => $place_id,
'placename' => $placename,
))->fetchOne();
@@ -2533,7 +2534,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/**
* @param string $place
*
- * @return integer
+ * @return int
*/
private function getPlaceId($place) {
global $WT_TREE;
@@ -2550,8 +2551,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$pl_id = (int) Database::prepare(
"SELECT p_id FROM `##places` WHERE p_parent_id = :place_id AND p_file = :tree_id AND p_place = :placename"
)->execute(array(
- 'place_id' => $place_id,
- 'tree_id' => $WT_TREE->getTreeId(),
+ 'place_id' => $place_id,
+ 'tree_id' => $WT_TREE->getTreeId(),
'placename' => $placename,
))->fetchOne();
if ($pl_id) {
@@ -2568,10 +2569,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param integer $level
+ * @param int $level
* @param string[] $parent
*
- * @return integer
+ * @return int
*/
private function setPlaceIdMap($level, $parent) {
$fullplace = '';
@@ -2588,10 +2589,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param integer $level
+ * @param int $level
* @param string[] $parent
*
- * @return integer
+ * @return int
*/
private function setLevelMap($level, $parent) {
$fullplace = '';
@@ -2620,7 +2621,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
global $level, $levelm, $plzoom, $controller, $WT_TREE;
$STREETVIEW = $this->getSetting('GM_USE_STREETVIEW');
- $parent = Filter::getArray('parent');
+ $parent = Filter::getArray('parent');
// create the map
echo '<table style="margin:20px auto 0 auto;"><tr valign="top"><td>';
@@ -2740,8 +2741,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param integer $numls
- * @param integer $levelm
+ * @param int $numls
+ * @param int $levelm
*
* @return integer[]
*/
@@ -2758,7 +2759,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param integer $level
+ * @param int $level
* @param string[] $parent
*/
private function printHowManyPeople($level, $parent) {
@@ -2785,12 +2786,12 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/**
* @param string[] $place2
- * @param integer $level
+ * @param int $level
* @param string[] $parent
- * @param integer $levelm
+ * @param int $levelm
* @param string $linklevels
* @param string $placelevels
- * @param boolean $lastlevel
+ * @param bool $lastlevel
*/
private function printGoogleMapMarkers($place2, $level, $parent, $levelm, $linklevels, $placelevels, $lastlevel = false) {
if (!$place2['lati'] || !$place2['long']) {
@@ -2931,8 +2932,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/**
* Called by placelist.php
*
- * @param integer $numfound
- * @param integer $level
+ * @param int $numfound
+ * @param int $level
* @param string[] $parent
* @param string $linklevels
* @param string $placelevels
@@ -2991,13 +2992,13 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// Creates a marker whose info window displays the given name
function createMarker(point, html, icon, name) {
// Choose icon and shadow ============
- if (icon.image && '.$level . '<=3) {
- if (icon.image!="'.WT_STATIC_URL . WT_MODULES_DIR . 'googlemap/images/marker_yellow.png") {
+ if (icon.image && ' . $level . '<=3) {
+ if (icon.image!="' . WT_STATIC_URL . WT_MODULES_DIR . 'googlemap/images/marker_yellow.png") {
var iconImage = new google.maps.MarkerImage(icon.image,
new google.maps.Size(25, 15),
new google.maps.Point(0,0),
new google.maps.Point(12, 15));
- var iconShadow = new google.maps.MarkerImage("'.WT_STATIC_URL . WT_MODULES_DIR . 'googlemap/images/flag_shadow.png",
+ var iconShadow = new google.maps.MarkerImage("' . WT_STATIC_URL . WT_MODULES_DIR . 'googlemap/images/flag_shadow.png",
new google.maps.Size(35, 45),
new google.maps.Point(0,0),
new google.maps.Point(1, 45));
@@ -3063,10 +3064,10 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
');
- $levelm = $this->setLevelMap($level, $parent);
+ $levelm = $this->setLevelMap($level, $parent);
if (isset($levelo[0])) $levelo[0] = 0;
- $numls = count($parent) - 1;
- $levelo = $this->checkWhereAmI($numls, $levelm);
+ $numls = count($parent) - 1;
+ $levelo = $this->checkWhereAmI($numls, $levelm);
if ($numfound < 2 && ($level == 1 || !isset($levelo[$level - 1]))) {
$controller->addInlineJavascript('map.maxZoom=6;');
} elseif ($numfound < 2 && !isset($levelo[$level - 2])) {
@@ -3089,7 +3090,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// re-calculate the hierarchy information required to display the current place
$thisloc = $parent;
array_pop($thisloc);
- $thislevel = $level - 1;
+ $thislevel = $level - 1;
$thislinklevels = substr($linklevels, 0, strrpos($linklevels, '&amp;'));
if (strpos($placelevels, ',', 1)) {
$thisplacelevels = substr($placelevels, strpos($placelevels, ',', 1));
@@ -3106,9 +3107,9 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// display any sub-places
$placeidlist = array();
foreach ($place_names as $placename) {
- $thisloc = $parent;
- $thisloc[] = $placename;
- $this_levelm = $this->setLevelMap($level + 1, $thisloc);
+ $thisloc = $parent;
+ $thisloc[] = $placename;
+ $this_levelm = $this->setLevelMap($level + 1, $thisloc);
if ($this_levelm) $placeidlist[] = $this_levelm;
}
@@ -3143,7 +3144,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
* e.g. 0=>"Top level", 16=>"England", 19=>"London", 217=>"Westminster"
* NB This function exists in both places.php and places_edit.php
*
- * @param integer $id
+ * @param int $id
*
* @return string[]
*/
@@ -3176,8 +3177,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/**
* Find all of the places in the hierarchy
*
- * @param integer $parent_id
- * @param boolean $inactive
+ * @param int $parent_id
+ * @param bool $inactive
*
* @return array[]
*/
@@ -3209,11 +3210,11 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
foreach ($rows as $row) {
$placelist[] = array(
'place_id' => $row->pl_id,
- 'place' => $row->pl_place,
- 'lati' => $row->pl_lati,
- 'long' => $row->pl_long,
- 'zoom' => $row->pl_zoom,
- 'icon' => $row->pl_icon,
+ 'place' => $row->pl_place,
+ 'lati' => $row->pl_lati,
+ 'long' => $row->pl_long,
+ 'zoom' => $row->pl_zoom,
+ 'icon' => $row->pl_icon,
);
}
@@ -3221,7 +3222,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
/**
- * @param integer $parent_id
+ * @param int $parent_id
*/
private function outputLevel($parent_id) {
$tmp = $this->placeIdToHierarchy($parent_id);
@@ -3293,7 +3294,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
->pageHeader();
$where_am_i = $this->placeIdToHierarchy($placeid);
- $level = count($where_am_i);
+ $level = count($where_am_i);
if ($action == 'addrecord' && Auth::isAdmin()) {
$statement =
@@ -3336,7 +3337,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
Filter::get('svbear'),
Filter::get('svelev'),
Filter::get('svzoom'),
- $placeid
+ $placeid,
));
$controller->addInlineJavaScript('window.close();');
exit;
@@ -3348,18 +3349,18 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
Database::prepare("SELECT pl_place, pl_lati, pl_long, pl_icon, pl_parent_id, pl_level, pl_zoom FROM `##placelocation` WHERE pl_id=?")
->execute(array($placeid))
->fetchOneRow();
- $place_name = $row->pl_place;
- $place_icon = $row->pl_icon;
+ $place_name = $row->pl_place;
+ $place_icon = $row->pl_icon;
$selected_country = explode("/", $place_icon);
if (isset($selected_country[1]) && $selected_country[1] != "flags")
$selected_country = $selected_country[1];
else
$selected_country = "Countries";
- $parent_id = $row->pl_parent_id;
- $level = $row->pl_level;
- $zoomfactor = $row->pl_zoom;
- $parent_lati = "0.0";
- $parent_long = "0.0";
+ $parent_id = $row->pl_parent_id;
+ $level = $row->pl_level;
+ $zoomfactor = $row->pl_zoom;
+ $parent_lati = "0.0";
+ $parent_long = "0.0";
if ($row->pl_lati !== null && $row->pl_long !== null) {
$place_lati = (float) (str_replace(array('N', 'S', ','), array('', '-', '.'), $row->pl_lati));
$place_long = (float) (str_replace(array('E', 'W', ','), array('', '-', '.'), $row->pl_long));
@@ -3395,13 +3396,13 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
// --- find the parent place in the file
if ($placeid != 0) {
if (!isset($place_name)) $place_name = '';
- $place_lati = null;
- $place_long = null;
- $zoomfactor = 1;
- $parent_lati = '0.0';
- $parent_long = '0.0';
- $place_icon = '';
- $parent_id = $placeid;
+ $place_lati = null;
+ $place_long = null;
+ $zoomfactor = 1;
+ $parent_lati = '0.0';
+ $parent_long = '0.0';
+ $place_icon = '';
+ $parent_id = $placeid;
do {
$row =
Database::prepare("SELECT pl_lati, pl_long, pl_parent_id, pl_zoom, pl_level FROM `##placelocation` WHERE pl_id=?")
@@ -3410,7 +3411,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
if ($row->pl_lati !== null && $row->pl_long !== null) {
$parent_lati = str_replace(array('N', 'S', ','), array('', '-', '.'), $row->pl_lati);
$parent_long = str_replace(array('E', 'W', ','), array('', '-', '.'), $row->pl_long);
- $zoomfactor = $row->pl_zoom;
+ $zoomfactor = $row->pl_zoom;
if ($zoomfactor > $GM_MAX_ZOOM) {
$zoomfactor = $GM_MAX_ZOOM;
}
@@ -3421,14 +3422,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
else {
if (!isset($place_name)) $place_name = '';
- $place_lati = null;
- $place_long = null;
- $parent_lati = "0.0";
- $parent_long = "0.0";
- $place_icon = '';
- $parent_id = 0;
- $level = 0;
- $zoomfactor = $this->getSetting('GM_MIN_ZOOM');
+ $place_lati = null;
+ $place_long = null;
+ $parent_lati = "0.0";
+ $parent_long = "0.0";
+ $place_icon = '';
+ $parent_id = 0;
+ $level = 0;
+ $zoomfactor = $this->getSetting('GM_MIN_ZOOM');
}
$selected_country = 'Countries';
@@ -4109,11 +4110,11 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$controller->restrictAccess(Auth::isAdmin());
if ($action == 'ExportFile' && Auth::isAdmin()) {
- $tmp = $this->placeIdToHierarchy($parent);
- $maxLevel = $this->getHighestLevel();
+ $tmp = $this->placeIdToHierarchy($parent);
+ $maxLevel = $this->getHighestLevel();
if ($maxLevel > 8) $maxLevel = 8;
- $tmp[0] = 'places';
- $outputFileName = preg_replace('/[:;\/\\\(\)\{\}\[\] $]/', '_', implode('-', $tmp)) . '.csv';
+ $tmp[0] = 'places';
+ $outputFileName = preg_replace('/[:;\/\\\(\)\{\}\[\] $]/', '_', implode('-', $tmp)) . '.csv';
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $outputFileName . '"');
echo '"', I18N::translate('Level'), '";"', I18N::translate('Country'), '";';
@@ -4162,18 +4163,18 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<?php
if ($action == 'ImportGedcom') {
- $placelist = array();
- $j = 0;
+ $placelist = array();
+ $j = 0;
$gedcom_records =
Database::prepare("SELECT i_gedcom FROM `##individuals` WHERE i_file=? UNION ALL SELECT f_gedcom FROM `##families` WHERE f_file=?")
->execute(array($WT_TREE->getTreeId(), $WT_TREE->getTreeId()))
->fetchOneColumn();
foreach ($gedcom_records as $gedrec) {
- $i = 1;
+ $i = 1;
$placerec = get_sub_record(2, '2 PLAC', $gedrec, $i);
while (!empty($placerec)) {
if (preg_match("/2 PLAC (.+)/", $placerec, $match)) {
- $placelist[$j] = array();
+ $placelist[$j] = array();
$placelist[$j]['place'] = trim($match[1]);
if (preg_match("/4 LATI (.*)/", $placerec, $match)) {
$placelist[$j]['lati'] = trim($match[1]);
@@ -4197,26 +4198,26 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
}
else $placelist[$j]['long'] = null;
- $j = $j + 1;
+ $j = $j + 1;
}
- $i = $i + 1;
+ $i = $i + 1;
$placerec = get_sub_record(2, '2 PLAC', $gedrec, $i);
}
}
asort($placelist);
- $prevPlace = '';
- $prevLati = '';
- $prevLong = '';
+ $prevPlace = '';
+ $prevLati = '';
+ $prevLong = '';
$placelistUniq = array();
- $j = 0;
- foreach ($placelist as $k=>$place) {
+ $j = 0;
+ foreach ($placelist as $k => $place) {
if ($place['place'] != $prevPlace) {
- $placelistUniq[$j] = array();
+ $placelistUniq[$j] = array();
$placelistUniq[$j]['place'] = $place['place'];
- $placelistUniq[$j]['lati'] = $place['lati'];
- $placelistUniq[$j]['long'] = $place['long'];
- $j = $j + 1;
+ $placelistUniq[$j]['lati'] = $place['lati'];
+ $placelistUniq[$j]['long'] = $place['long'];
+ $j = $j + 1;
} elseif (($place['place'] == $prevPlace) && (($place['lati'] != $prevLati) || ($place['long'] != $prevLong))) {
if (($placelistUniq[$j - 1]['lati'] == 0) || ($placelistUniq[$j - 1]['long'] == 0)) {
$placelistUniq[$j - 1]['lati'] = $place['lati'];
@@ -4226,21 +4227,21 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
}
$prevPlace = $place['place'];
- $prevLati = $place['lati'];
- $prevLong = $place['long'];
+ $prevLati = $place['lati'];
+ $prevLong = $place['long'];
}
$highestIndex = $this->getHighestIndex();
$default_zoom_level = array(4, 7, 10, 12);
- foreach ($placelistUniq as $k=>$place) {
- $parent = preg_split('/ *, */', $place['place']);
- $parent = array_reverse($parent);
+ foreach ($placelistUniq as $k => $place) {
+ $parent = preg_split('/ *, */', $place['place']);
+ $parent = array_reverse($parent);
$parent_id = 0;
for ($i = 0; $i < count($parent); $i++) {
if (!isset($default_zoom_level[$i]))
$default_zoom_level[$i] = $default_zoom_level[$i - 1];
- $escparent = $parent[$i];
+ $escparent = $parent[$i];
if ($escparent == '') {
$escparent = 'Unknown';
}
@@ -4297,7 +4298,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<td>
<select name="localfile">
<option></option>
- <?php foreach ($placefiles as $p=>$placefile) { ?>
+ <?php foreach ($placefiles as $p => $placefile) { ?>
<option value="<?php echo Filter::escapeHtml($placefile); ?>"><?php
if (substr($placefile, 0, 1) == "/") echo substr($placefile, 1);
else echo $placefile; ?></option>
@@ -4330,8 +4331,8 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
if ($action === 'ImportFile2') {
$country_names = array();
- $stats = new Stats($WT_TREE);
- foreach ($stats->iso3166() as $key=>$value) {
+ $stats = new Stats($WT_TREE);
+ foreach ($stats->iso3166() as $key => $value) {
$country_names[$key] = I18N::translate($key);
}
if (isset($_POST['cleardatabase'])) {
@@ -4348,14 +4349,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
asort($lines);
$highestIndex = $this->getHighestIndex();
- $placelist = array();
- $j = 0;
- $maxLevel = 0;
+ $placelist = array();
+ $j = 0;
+ $maxLevel = 0;
foreach ($lines as $p => $placerec) {
- $fieldrec = explode(';', $placerec);
+ $fieldrec = explode(';', $placerec);
if ($fieldrec[0] > $maxLevel) $maxLevel = $fieldrec[0];
}
- $fields = count($fieldrec);
+ $fields = count($fieldrec);
$set_icon = true;
if (!is_dir(WT_MODULES_DIR . 'googlemap/places/flags/')) {
$set_icon = false;
@@ -4363,7 +4364,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
foreach ($lines as $p => $placerec) {
$fieldrec = explode(';', $placerec);
if (is_numeric($fieldrec[0]) && $fieldrec[0] <= $maxLevel) {
- $placelist[$j] = array();
+ $placelist[$j] = array();
$placelist[$j]['place'] = '';
for ($ii = $fields - 4; $ii > 1; $ii--) {
if ($fieldrec[0] > $ii - 2) $placelist[$j]['place'] .= $fieldrec[$ii] . ',';
@@ -4387,20 +4388,20 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
}
- $prevPlace = '';
- $prevLati = '';
- $prevLong = '';
+ $prevPlace = '';
+ $prevLati = '';
+ $prevLong = '';
$placelistUniq = array();
- $j = 0;
- foreach ($placelist as $k=>$place) {
+ $j = 0;
+ foreach ($placelist as $k => $place) {
if ($place['place'] != $prevPlace) {
- $placelistUniq[$j] = array();
+ $placelistUniq[$j] = array();
$placelistUniq[$j]['place'] = $place['place'];
- $placelistUniq[$j]['lati'] = $place['lati'];
- $placelistUniq[$j]['long'] = $place['long'];
- $placelistUniq[$j]['zoom'] = $place['zoom'];
- $placelistUniq[$j]['icon'] = $place['icon'];
- $j = $j + 1;
+ $placelistUniq[$j]['lati'] = $place['lati'];
+ $placelistUniq[$j]['long'] = $place['long'];
+ $placelistUniq[$j]['zoom'] = $place['zoom'];
+ $placelistUniq[$j]['icon'] = $place['icon'];
+ $j = $j + 1;
} elseif (($place['place'] == $prevPlace) && (($place['lati'] != $prevLati) || ($place['long'] != $prevLong))) {
if (($placelistUniq[$j - 1]['lati'] == 0) || ($placelistUniq[$j - 1]['long'] == 0)) {
$placelistUniq[$j - 1]['lati'] = $place['lati'];
@@ -4412,18 +4413,18 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
}
}
$prevPlace = $place['place'];
- $prevLati = $place['lati'];
- $prevLong = $place['long'];
+ $prevLati = $place['lati'];
+ $prevLong = $place['long'];
}
- $default_zoom_level = array();
+ $default_zoom_level = array();
$default_zoom_level[0] = 4;
$default_zoom_level[1] = 7;
$default_zoom_level[2] = 10;
$default_zoom_level[3] = 12;
- foreach ($placelistUniq as $k=>$place) {
- $parent = explode(',', $place['place']);
- $parent = array_reverse($parent);
+ foreach ($placelistUniq as $k => $place) {
+ $parent = explode(',', $place['place']);
+ $parent = array_reverse($parent);
$parent_id = 0;
for ($i = 0; $i < count($parent); $i++) {
$escparent = $parent[$i];
@@ -4528,7 +4529,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
<?php
echo '<div id="gm_breadcrumb">';
$where_am_i = $this->placeIdToHierarchy($parent);
- foreach (array_reverse($where_am_i, true) as $id=>$place) {
+ foreach (array_reverse($where_am_i, true) as $id => $place) {
if ($id == $parent) {
if ($place != 'Unknown') {
echo Filter::escapeHtml($place);
diff --git a/app/Module/HtmlBlockModule.php b/app/Module/HtmlBlockModule.php
index 93f91d0082..a8adac0ae0 100644
--- a/app/Module/HtmlBlockModule.php
+++ b/app/Module/HtmlBlockModule.php
@@ -81,7 +81,7 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
/*
* Start Of Output
*/
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype === 'gedcom' && Auth::isManager($WT_TREE) || $ctype === 'user' && Auth::check()) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
@@ -130,13 +130,13 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
}
$templates = array(
- I18N::translate('Keyword examples')=>
+ I18N::translate('Keyword examples') =>
'#getAllTagsTable#',
- I18N::translate('Narrative description')=>
+ I18N::translate('Narrative description') =>
/* I18N: do not translate the #keywords# */ I18N::translate('This family tree was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.<br><br>If you have any comments or feedback please contact #contactWebmaster#.'),
- I18N::translate('Statistics')=>
+ I18N::translate('Statistics') =>
'<div class="gedcom_stats">
<span style="font-weight: bold;"><a href="index.php?command=gedcom">#gedcomTitle#</a></span><br>
' . I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') . '
@@ -145,43 +145,43 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
<td valign="top" class="width20">
<table cellspacing="1" cellpadding="0">
<tr>
- <td class="facts_label">'. I18N::translate('Individuals') . '</td>
+ <td class="facts_label">' . I18N::translate('Individuals') . '</td>
<td class="facts_value" align="right"><a href="indilist.php?surname_sublist=no">#totalIndividuals#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Males') . '</td>
+ <td class="facts_label">' . I18N::translate('Males') . '</td>
<td class="facts_value" align="right">#totalSexMales#<br>#totalSexMalesPercentage#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Females') . '</td>
+ <td class="facts_label">' . I18N::translate('Females') . '</td>
<td class="facts_value" align="right">#totalSexFemales#<br>#totalSexFemalesPercentage#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Total surnames') . '</td>
- <td class="facts_value" align="right"><a href="indilist.php?show_all=yes&amp;surname_sublist=yes&amp;ged='. $WT_TREE->getNameUrl() . '">#totalSurnames#</a></td>
+ <td class="facts_label">' . I18N::translate('Total surnames') . '</td>
+ <td class="facts_value" align="right"><a href="indilist.php?show_all=yes&amp;surname_sublist=yes&amp;ged=' . $WT_TREE->getNameUrl() . '">#totalSurnames#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Families') . '</td>
- <td class="facts_value" align="right"><a href="famlist.php?ged='. $WT_TREE->getNameUrl() . '">#totalFamilies#</a></td>
+ <td class="facts_label">' . I18N::translate('Families') . '</td>
+ <td class="facts_value" align="right"><a href="famlist.php?ged=' . $WT_TREE->getNameUrl() . '">#totalFamilies#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Sources') . '</td>
- <td class="facts_value" align="right"><a href="sourcelist.php?ged='. $WT_TREE->getNameUrl() . '">#totalSources#</a></td>
+ <td class="facts_label">' . I18N::translate('Sources') . '</td>
+ <td class="facts_value" align="right"><a href="sourcelist.php?ged=' . $WT_TREE->getNameUrl() . '">#totalSources#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Media objects') . '</td>
- <td class="facts_value" align="right"><a href="medialist.php?ged='. $WT_TREE->getNameUrl() . '">#totalMedia#</a></td>
+ <td class="facts_label">' . I18N::translate('Media objects') . '</td>
+ <td class="facts_value" align="right"><a href="medialist.php?ged=' . $WT_TREE->getNameUrl() . '">#totalMedia#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Repositories') . '</td>
- <td class="facts_value" align="right"><a href="repolist.php?ged='. $WT_TREE->getNameUrl() . '">#totalRepositories#</a></td>
+ <td class="facts_label">' . I18N::translate('Repositories') . '</td>
+ <td class="facts_value" align="right"><a href="repolist.php?ged=' . $WT_TREE->getNameUrl() . '">#totalRepositories#</a></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Total events') . '</td>
+ <td class="facts_label">' . I18N::translate('Total events') . '</td>
<td class="facts_value" align="right">#totalEvents#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Total users') . '</td>
+ <td class="facts_label">' . I18N::translate('Total users') . '</td>
<td class="facts_value" align="right">#totalUsers#</td>
</tr>
</table>
@@ -190,42 +190,42 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
<td valign="top">
<table cellspacing="1" cellpadding="0" border="0">
<tr>
- <td class="facts_label">'. I18N::translate('Earliest birth year') . '</td>
+ <td class="facts_label">' . I18N::translate('Earliest birth year') . '</td>
<td class="facts_value" align="right">#firstBirthYear#</td>
<td class="facts_value">#firstBirth#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Latest birth year') . '</td>
+ <td class="facts_label">' . I18N::translate('Latest birth year') . '</td>
<td class="facts_value" align="right">#lastBirthYear#</td>
<td class="facts_value">#lastBirth#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Earliest death year') . '</td>
+ <td class="facts_label">' . I18N::translate('Earliest death year') . '</td>
<td class="facts_value" align="right">#firstDeathYear#</td>
<td class="facts_value">#firstDeath#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Latest death year') . '</td>
+ <td class="facts_label">' . I18N::translate('Latest death year') . '</td>
<td class="facts_value" align="right">#lastDeathYear#</td>
<td class="facts_value">#lastDeath#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Individual who lived the longest') . '</td>
+ <td class="facts_label">' . I18N::translate('Individual who lived the longest') . '</td>
<td class="facts_value" align="right">#longestLifeAge#</td>
<td class="facts_value">#longestLife#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Average age at death') . '</td>
+ <td class="facts_label">' . I18N::translate('Average age at death') . '</td>
<td class="facts_value" align="right">#averageLifespan#</td>
<td class="facts_value"></td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Family with the most children') . '</td>
+ <td class="facts_label">' . I18N::translate('Family with the most children') . '</td>
<td class="facts_value" align="right">#largestFamilySize#</td>
<td class="facts_value">#largestFamily#</td>
</tr>
<tr>
- <td class="facts_label">'. I18N::translate('Average number of children per family') . '</td>
+ <td class="facts_label">' . I18N::translate('Average number of children per family') . '</td>
<td class="facts_value" align="right">#averageChildren#</td>
<td class="facts_value"></td>
</tr>
@@ -235,7 +235,7 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
</table><br>
<span style="font-weight: bold;">' . I18N::translate('Most common surnames') . '</span><br>
#commonSurnames#
- </div>'
+ </div>',
);
$title = $this->getBlockSetting($block_id, 'title');
@@ -260,7 +260,7 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface {
}
echo '<select name="template" onchange="document.block.html.value=document.block.template.options[document.block.template.selectedIndex].value;', $ckeditor_onchange, '">';
echo '<option value="', Filter::escapeHtml($html), '">', I18N::translate('Custom'), '</option>';
- foreach ($templates as $title=>$template) {
+ foreach ($templates as $title => $template) {
echo '<option value="', Filter::escapeHtml($template), '">', $title, '</option>';
}
echo '</select>';
diff --git a/app/Module/IndividualFactsTabModule.php b/app/Module/IndividualFactsTabModule.php
index 0e12f19e45..8ad9c4aef2 100644
--- a/app/Module/IndividualFactsTabModule.php
+++ b/app/Module/IndividualFactsTabModule.php
@@ -143,7 +143,6 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf
echo '<script>jQuery("tr.histo").toggle();</script>';
}
-
return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
}
@@ -333,7 +332,7 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf
* Get the events of parents and grandparents.
*
* @param Individual $person
- * @param integer $sosa
+ * @param int $sosa
*
* @return Fact[]
*/
@@ -455,7 +454,7 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf
// rather than UTF8 encoding.
$hist = html_entity_decode($hist, ENT_QUOTES, 'UTF-8');
- $fact = new Fact($hist, $person, 'histo');
+ $fact = new Fact($hist, $person, 'histo');
$sdate = $fact->getDate();
if ($sdate->isOK() && Date::compare($birt_date, $sdate) <= 0 && Date::compare($sdate, $deat_date) <= 0) {
$facts[] = $fact;
diff --git a/app/Module/IndividualFamiliesReportModule.php b/app/Module/IndividualFamiliesReportModule.php
index a106176855..aeed18a4df 100644
--- a/app/Module/IndividualFamiliesReportModule.php
+++ b/app/Module/IndividualFamiliesReportModule.php
@@ -42,7 +42,7 @@ class IndividualFamiliesReportModule extends AbstractModule implements ModuleRep
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/IndividualReportModule.php b/app/Module/IndividualReportModule.php
index 877118d2d5..a390781fa3 100644
--- a/app/Module/IndividualReportModule.php
+++ b/app/Module/IndividualReportModule.php
@@ -42,7 +42,7 @@ class IndividualReportModule extends AbstractModule implements ModuleReportInter
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/IndividualSidebarModule.php b/app/Module/IndividualSidebarModule.php
index cdd5255c52..434deb0b31 100644
--- a/app/Module/IndividualSidebarModule.php
+++ b/app/Module/IndividualSidebarModule.php
@@ -129,7 +129,7 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
');
$out = '<form method="post" action="module.php?mod=' . $this->getName() . '&amp;mod_action=ajax" onsubmit="return false;"><input type="search" name="sb_indi_name" id="sb_indi_name" placeholder="' . I18N::translate('Search') . '"><p>';
- foreach ($initials as $letter=>$count) {
+ foreach ($initials as $letter => $count) {
switch ($letter) {
case '@':
$html = $UNKNOWN_NN;
@@ -163,7 +163,7 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
*/
private function getAlphaSurnames(Tree $tree, $alpha) {
$surnames = QueryName::surnames($tree, '', $alpha, true, false);
- $out = '<ul>';
+ $out = '<ul>';
foreach (array_keys($surnames) as $surname) {
$out .= '<li id="sb_indi_' . $surname . '" class="sb_indi_surname_li"><a href="' . $surname . '" title="' . $surname . '" alt="' . $alpha . '" class="sb_indi_surname">' . $surname . '</a>';
$out .= '<div class="name_tree_div"></div>';
@@ -183,7 +183,7 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
*/
private function getSurnameIndis(Tree $tree, $alpha, $surname) {
$indis = QueryName::individuals($tree, $surname, $alpha, '', true, false);
- $out = '<ul>';
+ $out = '<ul>';
foreach ($indis as $person) {
if ($person->canShowName()) {
$out .= '<li><a href="' . $person->getHtmlUrl() . '">' . $person->getSexImage() . ' ' . $person->getFullName() . ' ';
diff --git a/app/Module/InteractiveTree/TreeView.php b/app/Module/InteractiveTree/TreeView.php
index 6f660f5d32..4d5f4a7e44 100644
--- a/app/Module/InteractiveTree/TreeView.php
+++ b/app/Module/InteractiveTree/TreeView.php
@@ -29,7 +29,7 @@ class TreeView {
* @param string $name the name of the TreeView object’s instance
*/
public function __construct($name = 'tree') {
- $this->name = $name;
+ $this->name = $name;
$this->all_partners = Filter::cookie('allPartners', 'true|false', 'true');
}
@@ -38,7 +38,7 @@ class TreeView {
* Size is set by the container, as the viewport can scale itself automatically
*
* @param Individual $root_person the id of the root person
- * @param integer $generations number of generations to draw
+ * @param int $generations number of generations to draw
*
* @return string[] HTML and Javascript
*/
@@ -80,14 +80,14 @@ class TreeView {
global $WT_TREE;
$list = explode(';', $list);
- $r = array();
+ $r = array();
foreach ($list as $jsonRequest) {
$firstLetter = substr($jsonRequest, 0, 1);
$jsonRequest = substr($jsonRequest, 1);
switch ($firstLetter) {
case 'c':
$fidlist = explode(',', $jsonRequest);
- $flist = array();
+ $flist = array();
foreach ($fidlist as $fid) {
$flist[] = Family::getInstance($fid, $WT_TREE);
}
@@ -95,9 +95,9 @@ class TreeView {
break;
case 'p':
$params = explode('@', $jsonRequest);
- $fid = $params[0];
- $order = $params[1];
- $f = Family::getInstance($fid, $WT_TREE);
+ $fid = $params[0];
+ $order = $params[1];
+ $f = Family::getInstance($fid, $WT_TREE);
if ($f->getHusband()) {
$r[] = $this->drawPerson($f->getHusband(), 0, 1, $f, $order);
} elseif ($f->getWife()) {
@@ -106,6 +106,7 @@ class TreeView {
break;
}
}
+
return json_encode($r);
}
@@ -150,22 +151,23 @@ class TreeView {
foreach ($individual->getFacts(WT_EVENTS_DEAT, true) as $fact) {
$hmtl .= $fact->summary();
}
+
return '<div class="tv' . $individual->getSex() . ' tv_person_expanded">' . $hmtl . '</div>';
}
/**
* Draw the children for some families
*
- * @param array $familyList array of families to draw the children for
- * @param integer $gen number of generations to draw
- * @param boolean $ajax setted to true for an ajax call
+ * @param array $familyList array of families to draw the children for
+ * @param int $gen number of generations to draw
+ * @param bool $ajax setted to true for an ajax call
*
* @return string
*/
private function drawChildren(array $familyList, $gen = 1, $ajax = false) {
- $html = '';
+ $html = '';
$children2draw = array();
- $f2load = array();
+ $f2load = array();
foreach ($familyList as $f) {
if (empty($f)) {
@@ -183,7 +185,7 @@ class TreeView {
$tc = count($children2draw);
if ($tc) {
$f2load = implode(',', $f2load);
- $nbc = 0;
+ $nbc = 0;
foreach ($children2draw as $child) {
$nbc++;
if ($tc == 1) {
@@ -201,6 +203,7 @@ class TreeView {
$html = '<td align="right"' . ($gen == 0 ? ' abbr="c' . $f2load . '"' : '') . '>' . $html . '</td>' . $this->drawHorizontalLine();
}
}
+
return $html;
}
@@ -208,11 +211,11 @@ class TreeView {
* Draw a person in the tree
*
* @param Individual $person The Person object to draw the box for
- * @param integer $gen The number of generations up or down to print
- * @param integer $state Whether we are going up or down the tree, -1 for descendents +1 for ancestors
+ * @param int $gen The number of generations up or down to print
+ * @param int $state Whether we are going up or down the tree, -1 for descendents +1 for ancestors
* @param Family $pfamily
- * @param string $order first (1), last(2), unique(0), or empty. Required for drawing lines between boxes
- * @param boolean $isRoot
+ * @param string $order first (1), last(2), unique(0), or empty. Required for drawing lines between boxes
+ * @param bool $isRoot
*
* @return string
*
@@ -294,7 +297,7 @@ class TreeView {
$html .= '</td></tr>';
}
if (count($fop)) {
- $n = 0;
+ $n = 0;
$nb = count($fop);
foreach ($fop as $p) {
$n++;
@@ -311,6 +314,7 @@ class TreeView {
if ($isRoot) {
$html .= '</td><td id="tv_tree_right"></td></tr><tr><td id="tv_tree_bottomleft"></td><td id="tv_tree_bottom"></td><td id="tv_tree_bottomright"></td></tr></tbody></table>';
}
+
return $html;
}
@@ -353,6 +357,7 @@ class TreeView {
$title = '';
}
$sex = $individual->getSex();
+
return '<div class="tv' . $sex . ' ' . $dashed . '"' . $title . '><a href="' . $individual->getHtmlUrl() . '"></a>' . $individual->getFullName() . ' <span class="dates">' . $individual->getLifeSpan() . '</span></div>';
}
diff --git a/app/Module/InteractiveTreeModule.php b/app/Module/InteractiveTreeModule.php
index 108f190096..cfaba7af07 100644
--- a/app/Module/InteractiveTreeModule.php
+++ b/app/Module/InteractiveTreeModule.php
@@ -40,8 +40,9 @@ class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface
public function getTabContent() {
global $controller;
- $tv = new TreeView('tvTab');
+ $tv = new TreeView('tvTab');
list($html, $js) = $tv->drawViewport($controller->record, 3);
+
return
'<script src="' . $this->js() . '"></script>' .
'<script src="' . WT_JQUERYUI_TOUCH_PUNCH_URL . '"></script>' .
@@ -88,7 +89,7 @@ class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface
switch ($mod_action) {
case 'treeview':
$controller = new ChartController;
- $tv = new TreeView('tv');
+ $tv = new TreeView('tv');
ob_start();
$person = $controller->getSignificantIndividual();
@@ -113,9 +114,9 @@ class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface
case 'getDetails':
header('Content-Type: text/html; charset=UTF-8');
- $pid = Filter::get('pid', WT_REGEX_XREF);
- $i = Filter::get('instance');
- $tv = new TreeView($i);
+ $pid = Filter::get('pid', WT_REGEX_XREF);
+ $i = Filter::get('instance');
+ $tv = new TreeView($i);
$individual = Individual::getInstance($pid, $WT_TREE);
if ($individual) {
echo $tv->getDetails($individual);
@@ -124,8 +125,8 @@ class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface
case 'getPersons':
header('Content-Type: text/html; charset=UTF-8');
- $q = Filter::get('q');
- $i = Filter::get('instance');
+ $q = Filter::get('q');
+ $i = Filter::get('instance');
$tv = new TreeView($i);
echo $tv->getPersons($q);
break;
diff --git a/app/Module/LoginBlockModule.php b/app/Module/LoginBlockModule.php
index baa8b45796..0bc8a249ce 100644
--- a/app/Module/LoginBlockModule.php
+++ b/app/Module/LoginBlockModule.php
@@ -33,7 +33,7 @@ class LoginBlockModule extends AbstractModule implements ModuleBlockInterface {
/** {@inheritdoc} */
public function getBlock($block_id, $template = true, $cfg = null) {
global $controller;
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
$controller->addInlineJavascript('
jQuery("#new_passwd").hide();
@@ -55,24 +55,24 @@ class LoginBlockModule extends AbstractModule implements ModuleBlockInterface {
} else {
$title = I18N::translate('Login');
$content = '<div id="login-box">
- <form id="login-form" name="login-form" method="post" action="'. WT_LOGIN_URL . '" onsubmit="d=new Date(); this.timediff.value=-60*d.getTimezoneOffset();">
+ <form id="login-form" name="login-form" method="post" action="' . WT_LOGIN_URL . '" onsubmit="d=new Date(); this.timediff.value=-60*d.getTimezoneOffset();">
<input type="hidden" name="action" value="login">
<input type="hidden" name="timediff" value="">';
$content .= '<div>
- <label for="username">'. I18N::translate('Username') .
+ <label for="username">' . I18N::translate('Username') .
'<input type="text" id="username" name="username" class="formField">
</label>
</div>
<div>
- <label for="password">'. I18N::translate('Password') .
+ <label for="password">' . I18N::translate('Password') .
'<input type="password" id="password" name="password" class="formField">
</label>
</div>
<div>
- <input type="submit" value="'. I18N::translate('Login') . '">
+ <input type="submit" value="' . I18N::translate('Login') . '">
</div>
<div>
- <a href="#" id="passwd_click">'. I18N::translate('Request new password') . '</a>
+ <a href="#" id="passwd_click">' . I18N::translate('Request new password') . '</a>
</div>';
if (Site::getPreference('USE_REGISTRATION_MODULE')) {
$content .= '<div><a href="' . WT_LOGIN_URL . '?action=register">' . I18N::translate('Request new user account') . '</a></div>';
@@ -81,16 +81,16 @@ class LoginBlockModule extends AbstractModule implements ModuleBlockInterface {
// hidden New Password block
$content .= '<div id="new_passwd">
- <form id="new_passwd_form" name="new_passwd_form" action="'.WT_LOGIN_URL . '" method="post">
+ <form id="new_passwd_form" name="new_passwd_form" action="' . WT_LOGIN_URL . '" method="post">
<input type="hidden" name="time" value="">
<input type="hidden" name="action" value="requestpw">
- <h4>'. I18N::translate('Lost password request') . '</h4>
+ <h4>' . I18N::translate('Lost password request') . '</h4>
<div>
- <label for="new_passwd_username">'. I18N::translate('Username or email address') .
+ <label for="new_passwd_username">' . I18N::translate('Username or email address') .
'<input type="text" id="new_passwd_username" name="new_passwd_username" value="">
</label>
</div>
- <div><input type="submit" value="'. I18N::translate('continue') . '"></div>
+ <div><input type="submit" value="' . I18N::translate('continue') . '"></div>
</form>
</div>'; //"new_passwd"
$content .= '</div>'; //"login-box"
diff --git a/app/Module/MarriageReportModule.php b/app/Module/MarriageReportModule.php
index e675366a9f..43ad668a8a 100644
--- a/app/Module/MarriageReportModule.php
+++ b/app/Module/MarriageReportModule.php
@@ -42,7 +42,7 @@ class MarriageReportModule extends AbstractModule implements ModuleReportInterfa
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/MissingFactsReportModule.php b/app/Module/MissingFactsReportModule.php
index cfc187b7b0..1444b05a9e 100644
--- a/app/Module/MissingFactsReportModule.php
+++ b/app/Module/MissingFactsReportModule.php
@@ -42,7 +42,7 @@ class MissingFactsReportModule extends AbstractModule implements ModuleReportInt
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/ModuleBlockInterface.php b/app/Module/ModuleBlockInterface.php
index cf04fbfc20..7e277ab8bd 100644
--- a/app/Module/ModuleBlockInterface.php
+++ b/app/Module/ModuleBlockInterface.php
@@ -23,7 +23,7 @@ interface ModuleBlockInterface {
/**
* Generate the HTML content of this block.
*
- * @param integer $block_id
+ * @param int $block_id
*
* @return string
*/
@@ -34,30 +34,28 @@ interface ModuleBlockInterface {
* Simple blocks are faster in-line, more comples ones
* can be loaded later.
*
- * @return boolean
+ * @return bool
*/
public function loadAjax();
/**
* Can this block be shown on the user’s home page?
*
- * @return boolean
+ * @return bool
*/
public function isUserBlock();
/**
* Can this block be shown on the tree’s home page?
*
- * @return boolean
+ * @return bool
*/
public function isGedcomBlock();
/**
* An HTML form to edit block settings
*
- * @param integer $block_id
- *
- * @return void
+ * @param int $block_id
*/
public function configureBlock($block_id);
}
diff --git a/app/Module/ModuleMenuInterface.php b/app/Module/ModuleMenuInterface.php
index f8e4e5a6bc..c29a4c8716 100644
--- a/app/Module/ModuleMenuInterface.php
+++ b/app/Module/ModuleMenuInterface.php
@@ -23,7 +23,7 @@ interface ModuleMenuInterface {
/**
* The user can re-order menus. Until they do, they are shown in this order.
*
- * @return integer
+ * @return int
*/
public function defaultMenuOrder();
diff --git a/app/Module/ModuleSidebarInterface.php b/app/Module/ModuleSidebarInterface.php
index 61d9d3e0be..f6e5aa0f16 100644
--- a/app/Module/ModuleSidebarInterface.php
+++ b/app/Module/ModuleSidebarInterface.php
@@ -23,12 +23,13 @@ interface ModuleSidebarInterface {
/**
* The user can change the order of sidebars. Until they do this, they are shown in this order.
*
- * @return integer
+ * @return int
*/
public function defaultSidebarOrder();
/**
* Load this sidebar synchronously.
+ *
* @return string
*/
public function getSidebarContent();
@@ -43,7 +44,7 @@ interface ModuleSidebarInterface {
/**
* Does this sidebar have anything to display for this individual?
*
- * @return boolean
+ * @return bool
*/
public function hasSidebarContent();
}
diff --git a/app/Module/ModuleTabInterface.php b/app/Module/ModuleTabInterface.php
index 01327eaf49..de8d83ece5 100644
--- a/app/Module/ModuleTabInterface.php
+++ b/app/Module/ModuleTabInterface.php
@@ -24,7 +24,7 @@ interface ModuleTabInterface {
* The user can re-arrange the tab order, but until they do, this
* is the order in which tabs are shown.
*
- * @return integer
+ * @return int
*/
public function defaultTabOrder();
@@ -37,14 +37,15 @@ interface ModuleTabInterface {
/**
* Is this tab empty? If so, we don't always need to display it.
- * @return boolean
+ *
+ * @return bool
*/
public function hasTabContent();
/**
* Can this tab load asynchronously?
*
- * @return boolean
+ * @return bool
*/
public function canLoadAjax();
@@ -61,7 +62,7 @@ interface ModuleTabInterface {
* A greyed out tab has no actual content, but may perhaps have
* options to create content.
*
- * @return boolean
+ * @return bool
*/
public function isGrayedOut();
}
diff --git a/app/Module/OccupationReportModule.php b/app/Module/OccupationReportModule.php
index 590355dc6c..29ff50daf6 100644
--- a/app/Module/OccupationReportModule.php
+++ b/app/Module/OccupationReportModule.php
@@ -42,7 +42,7 @@ class OccupationReportModule extends AbstractModule implements ModuleReportInter
global $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
'menu-report-' . $this->getName()
diff --git a/app/Module/OnThisDayModule.php b/app/Module/OnThisDayModule.php
index bf4c596f1d..220b6c2fd6 100644
--- a/app/Module/OnThisDayModule.php
+++ b/app/Module/OnThisDayModule.php
@@ -77,6 +77,7 @@ class OnThisDayModule extends AbstractModule implements ModuleBlockInterface {
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -129,15 +130,15 @@ class OnThisDayModule extends AbstractModule implements ModuleBlockInterface {
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
- echo select_edit_control('infoStyle', array('list'=> I18N::translate('list'), 'table'=> I18N::translate('table')), null, $infoStyle, '');
+ echo select_edit_control('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Sort order');
echo '</td><td class="optionbox">';
echo select_edit_control('sortStyle', array(
- /* I18N: An option in a list-box */ 'alpha'=> I18N::translate('sort by name'),
- /* I18N: An option in a list-box */ 'anniv'=> I18N::translate('sort by date'),
+ /* I18N: An option in a list-box */ 'alpha' => I18N::translate('sort by name'),
+ /* I18N: An option in a list-box */ 'anniv' => I18N::translate('sort by date'),
), null, $sortStyle, '');
echo '</td></tr>';
diff --git a/app/Module/PageMenuModule.php b/app/Module/PageMenuModule.php
index 99c28af01f..1a8f9448a0 100644
--- a/app/Module/PageMenuModule.php
+++ b/app/Module/PageMenuModule.php
@@ -47,6 +47,7 @@ class PageMenuModule extends AbstractModule implements ModuleMenuInterface {
if (Auth::isEditor($WT_TREE) && method_exists($controller, 'getEditMenu')) {
$menu = $controller->getEditMenu();
}
+
return $menu;
}
}
diff --git a/app/Module/PedigreeReportModule.php b/app/Module/PedigreeReportModule.php
index d71ddf5151..02fd503854 100644
--- a/app/Module/PedigreeReportModule.php
+++ b/app/Module/PedigreeReportModule.php
@@ -42,7 +42,7 @@ class PedigreeReportModule extends AbstractModule implements ModuleReportInterfa
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/RecentChangesModule.php b/app/Module/RecentChangesModule.php
index 37b8335668..af5155eab5 100644
--- a/app/Module/RecentChangesModule.php
+++ b/app/Module/RecentChangesModule.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class RecentChangesModule extends AbstractModule implements ModuleBlockInterface {
const DEFAULT_DAYS = 7;
- const MAX_DAYS = 90;
+ const MAX_DAYS = 90;
/** {@inheritdoc} */
public function getTitle() {
@@ -43,7 +43,6 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface
$block = $this->getBlockSetting($block_id, 'block', '1');
$hide_empty = $this->getBlockSetting($block_id, 'hide_empty', '0');
-
if ($cfg) {
foreach (array('days', 'infoStyle', 'sortStyle', 'hide_empty', 'block') as $name) {
if (array_key_exists($name, $cfg)) {
@@ -89,6 +88,7 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -145,7 +145,7 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface
echo select_edit_control('sortStyle', array(
'name' => /* I18N: An option in a list-box */ I18N::translate('sort by name'),
'date_asc' => /* I18N: An option in a list-box */ I18N::translate('sort by date, oldest first'),
- 'date_desc' => /* I18N: An option in a list-box */ I18N::translate('sort by date, newest first')
+ 'date_desc' => /* I18N: An option in a list-box */ I18N::translate('sort by date, newest first'),
), null, $sortStyle, '');
echo '</td></tr>';
diff --git a/app/Module/RelatedIndividualsReportModule.php b/app/Module/RelatedIndividualsReportModule.php
index 8b106db6de..5fc0fa84a9 100644
--- a/app/Module/RelatedIndividualsReportModule.php
+++ b/app/Module/RelatedIndividualsReportModule.php
@@ -42,7 +42,7 @@ class RelatedIndividualsReportModule extends AbstractModule implements ModuleRep
global $controller, $WT_TREE;
$menus = array();
- $menu = new Menu(
+ $menu = new Menu(
$this->getTitle(),
'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
'menu-report-' . $this->getName()
diff --git a/app/Module/RelativesTabModule.php b/app/Module/RelativesTabModule.php
index 0924a4c964..e22497bfc6 100644
--- a/app/Module/RelativesTabModule.php
+++ b/app/Module/RelativesTabModule.php
@@ -38,7 +38,7 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface {
/**
* @param Date $prev
* @param Date $next
- * @param integer $child_number
+ * @param int $child_number
*
* @return string
*/
@@ -167,7 +167,7 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface {
///// MARR /////
$found = false;
- $prev = new Date('');
+ $prev = new Date('');
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
$found |= !$fact->isPendingDeletion();
if ($fact->isPendingAddition()) {
diff --git a/app/Module/ResearchTaskModule.php b/app/Module/ResearchTaskModule.php
index 7dba5c2899..21f04cc1ae 100644
--- a/app/Module/ResearchTaskModule.php
+++ b/app/Module/ResearchTaskModule.php
@@ -97,10 +97,10 @@ class ResearchTaskModule extends AbstractModule implements ModuleBlockInterface
$content .= '<th>' . GedcomTag::getLabel('TEXT') . '</th>';
$content .= '</tr></thead><tbody>';
- $found = false;
+ $found = false;
$end_jd = $show_future ? 99999999 : WT_CLIENT_JD;
foreach (get_calendar_events(0, $end_jd, '_TODO', $WT_TREE) as $fact) {
- $record = $fact->getParent();
+ $record = $fact->getParent();
$user_name = $fact->getAttribute('_WT_USER');
if ($user_name === Auth::user()->getUserName() || !$user_name && $show_unassigned || $user_name && $show_other) {
$content .= '<tr>';
@@ -129,6 +129,7 @@ class ResearchTaskModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
diff --git a/app/Module/ReviewChangesModule.php b/app/Module/ReviewChangesModule.php
index 6e3ce92ff0..abba95c04e 100644
--- a/app/Module/ReviewChangesModule.php
+++ b/app/Module/ReviewChangesModule.php
@@ -79,7 +79,7 @@ class ReviewChangesModule extends AbstractModule implements ModuleBlockInterface
}
}
if (Auth::isEditor($WT_TREE) && $WT_TREE->hasPendingEdit()) {
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype === 'user' || Auth::isManager($WT_TREE)) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
@@ -116,6 +116,7 @@ class ReviewChangesModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
diff --git a/app/Module/SiteMapModule.php b/app/Module/SiteMapModule.php
index 3a0dcdee83..eb8f5be413 100644
--- a/app/Module/SiteMapModule.php
+++ b/app/Module/SiteMapModule.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
const RECORDS_PER_VOLUME = 500; // Keep sitemap files small, for memory, CPU and max_allowed_packet limits.
- const CACHE_LIFE = 1209600; // Two weeks
+ const CACHE_LIFE = 1209600; // Two weeks
/** {@inheritdoc} */
public function getTitle() {
@@ -70,7 +70,7 @@ class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
if ($timestamp > WT_TIMESTAMP - self::CACHE_LIFE) {
$data = $this->getSetting('sitemap.xml');
} else {
- $data = '';
+ $data = '';
$lastmod = '<lastmod>' . date('Y-m-d') . '</lastmod>';
foreach (Tree::getAll() as $tree) {
if ($tree->getPreference('include_in_sitemap')) {
@@ -128,7 +128,7 @@ class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
* A separate file for each family tree and each record type.
* These files depend on access levels, so only cache for visitors.
*
- * @param integer $ged_id
+ * @param int $ged_id
* @param string $rec_type
* @param string $volume
*/
@@ -139,7 +139,7 @@ class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
if ($timestamp > WT_TIMESTAMP - self::CACHE_LIFE && !Auth::check()) {
$data = $this->getSetting('sitemap-' . $ged_id . '-' . $rec_type . '-' . $volume . '.xml');
} else {
- $data = '<url><loc>' . WT_BASE_URL . 'index.php?ctype=gedcom&amp;ged=' . $tree->getNameUrl() . '</loc></url>' . PHP_EOL;
+ $data = '<url><loc>' . WT_BASE_URL . 'index.php?ctype=gedcom&amp;ged=' . $tree->getNameUrl() . '</loc></url>' . PHP_EOL;
$records = array();
switch ($rec_type) {
case 'i':
diff --git a/app/Module/SlideShowModule.php b/app/Module/SlideShowModule.php
index 6e07517bf1..2e0c261b16 100644
--- a/app/Module/SlideShowModule.php
+++ b/app/Module/SlideShowModule.php
@@ -82,7 +82,7 @@ class SlideShowModule extends AbstractModule implements ModuleBlockInterface {
// Keep looking through the media until a suitable one is found.
$random_media = null;
while ($all_media) {
- $n = array_rand($all_media);
+ $n = array_rand($all_media);
$media = Media::getInstance($all_media[$n], $WT_TREE);
if ($media->canShow() && !$media->isExternal()) {
// Check if it is linked to a suitable individual
@@ -101,7 +101,7 @@ class SlideShowModule extends AbstractModule implements ModuleBlockInterface {
unset($all_media[$n]);
};
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype === 'gedcom' && Auth::isManager($WT_TREE) || $ctype === 'user' && Auth::check()) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
@@ -142,7 +142,7 @@ class SlideShowModule extends AbstractModule implements ModuleBlockInterface {
}
function reload_image() {
if (play) {
- jQuery("#block_'.$block_id . '").load("index.php?ctype=' . $ctype . '&action=ajax&block_id=' . $block_id . '&start=1");
+ jQuery("#block_' . $block_id . '").load("index.php?ctype=' . $ctype . '&action=ajax&block_id=' . $block_id . '&start=1");
}
}
</script>';
@@ -240,39 +240,39 @@ class SlideShowModule extends AbstractModule implements ModuleBlockInterface {
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Show only individuals, events, or all?');
echo '</td><td class="optionbox">';
- echo select_edit_control('filter', array('indi'=> I18N::translate('Individuals'), 'event'=> I18N::translate('Facts and events'), 'all'=> I18N::translate('All')), null, $filter, '');
+ echo select_edit_control('filter', array('indi' => I18N::translate('Individuals'), 'event' => I18N::translate('Facts and events'), 'all' => I18N::translate('All')), null, $filter, '');
echo '</td></tr>';
$filters = array(
- 'avi' =>$this->getBlockSetting($block_id, 'filter_avi', '0'),
- 'bmp' =>$this->getBlockSetting($block_id, 'filter_bmp', '1'),
- 'gif' =>$this->getBlockSetting($block_id, 'filter_gif', '1'),
- 'jpeg' =>$this->getBlockSetting($block_id, 'filter_jpeg', '1'),
- 'mp3' =>$this->getBlockSetting($block_id, 'filter_mp3', '0'),
- 'ole' =>$this->getBlockSetting($block_id, 'filter_ole', '1'),
- 'pcx' =>$this->getBlockSetting($block_id, 'filter_pcx', '1'),
- 'pdf' =>$this->getBlockSetting($block_id, 'filter_pdf', '0'),
- 'png' =>$this->getBlockSetting($block_id, 'filter_png', '1'),
- 'tiff' =>$this->getBlockSetting($block_id, 'filter_tiff', '1'),
- 'wav' =>$this->getBlockSetting($block_id, 'filter_wav', '0'),
- 'audio' =>$this->getBlockSetting($block_id, 'filter_audio', '0'),
- 'book' =>$this->getBlockSetting($block_id, 'filter_book', '1'),
- 'card' =>$this->getBlockSetting($block_id, 'filter_card', '1'),
- 'certificate'=>$this->getBlockSetting($block_id, 'filter_certificate', '1'),
- 'coat' =>$this->getBlockSetting($block_id, 'filter_coat', '1'),
- 'document' =>$this->getBlockSetting($block_id, 'filter_document', '1'),
- 'electronic' =>$this->getBlockSetting($block_id, 'filter_electronic', '1'),
- 'fiche' =>$this->getBlockSetting($block_id, 'filter_fiche', '1'),
- 'film' =>$this->getBlockSetting($block_id, 'filter_film', '1'),
- 'magazine' =>$this->getBlockSetting($block_id, 'filter_magazine', '1'),
- 'manuscript' =>$this->getBlockSetting($block_id, 'filter_manuscript', '1'),
- 'map' =>$this->getBlockSetting($block_id, 'filter_map', '1'),
- 'newspaper' =>$this->getBlockSetting($block_id, 'filter_newspaper', '1'),
- 'other' =>$this->getBlockSetting($block_id, 'filter_other', '1'),
- 'painting' =>$this->getBlockSetting($block_id, 'filter_painting', '1'),
- 'photo' =>$this->getBlockSetting($block_id, 'filter_photo', '1'),
- 'tombstone' =>$this->getBlockSetting($block_id, 'filter_tombstone', '1'),
- 'video' =>$this->getBlockSetting($block_id, 'filter_video', '0'),
+ 'avi' => $this->getBlockSetting($block_id, 'filter_avi', '0'),
+ 'bmp' => $this->getBlockSetting($block_id, 'filter_bmp', '1'),
+ 'gif' => $this->getBlockSetting($block_id, 'filter_gif', '1'),
+ 'jpeg' => $this->getBlockSetting($block_id, 'filter_jpeg', '1'),
+ 'mp3' => $this->getBlockSetting($block_id, 'filter_mp3', '0'),
+ 'ole' => $this->getBlockSetting($block_id, 'filter_ole', '1'),
+ 'pcx' => $this->getBlockSetting($block_id, 'filter_pcx', '1'),
+ 'pdf' => $this->getBlockSetting($block_id, 'filter_pdf', '0'),
+ 'png' => $this->getBlockSetting($block_id, 'filter_png', '1'),
+ 'tiff' => $this->getBlockSetting($block_id, 'filter_tiff', '1'),
+ 'wav' => $this->getBlockSetting($block_id, 'filter_wav', '0'),
+ 'audio' => $this->getBlockSetting($block_id, 'filter_audio', '0'),
+ 'book' => $this->getBlockSetting($block_id, 'filter_book', '1'),
+ 'card' => $this->getBlockSetting($block_id, 'filter_card', '1'),
+ 'certificate' => $this->getBlockSetting($block_id, 'filter_certificate', '1'),
+ 'coat' => $this->getBlockSetting($block_id, 'filter_coat', '1'),
+ 'document' => $this->getBlockSetting($block_id, 'filter_document', '1'),
+ 'electronic' => $this->getBlockSetting($block_id, 'filter_electronic', '1'),
+ 'fiche' => $this->getBlockSetting($block_id, 'filter_fiche', '1'),
+ 'film' => $this->getBlockSetting($block_id, 'filter_film', '1'),
+ 'magazine' => $this->getBlockSetting($block_id, 'filter_magazine', '1'),
+ 'manuscript' => $this->getBlockSetting($block_id, 'filter_manuscript', '1'),
+ 'map' => $this->getBlockSetting($block_id, 'filter_map', '1'),
+ 'newspaper' => $this->getBlockSetting($block_id, 'filter_newspaper', '1'),
+ 'other' => $this->getBlockSetting($block_id, 'filter_other', '1'),
+ 'painting' => $this->getBlockSetting($block_id, 'filter_painting', '1'),
+ 'photo' => $this->getBlockSetting($block_id, 'filter_photo', '1'),
+ 'tombstone' => $this->getBlockSetting($block_id, 'filter_tombstone', '1'),
+ 'video' => $this->getBlockSetting($block_id, 'filter_video', '0'),
);
echo '<tr><td class="descriptionbox wrap width33">';
diff --git a/app/Module/StoriesModule.php b/app/Module/StoriesModule.php
index 6d36ec26a7..df42b8d338 100644
--- a/app/Module/StoriesModule.php
+++ b/app/Module/StoriesModule.php
@@ -75,7 +75,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
)->execute(array(
$this->getName(),
$controller->record->getXref(),
- $controller->record->getTree()->getTreeId()
+ $controller->record->getTree()->getTreeId(),
))->fetchOneColumn();
$html = '';
@@ -102,7 +102,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
/** {@inheritdoc} */
public function hasTabContent() {
- return $this->getTabContent() <> '';
+ return $this->getTabContent() != '';
}
/** {@inheritdoc} */
@@ -119,7 +119,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
)->execute(array(
$this->getName(),
$controller->record->getXref(),
- $controller->record->getTree()->getTreeId()
+ $controller->record->getTree()->getTreeId(),
))->fetchOne();
return $count_of_stories == 0;
@@ -155,7 +155,7 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
Filter::postInteger('gedcom_id'),
Filter::post('xref', WT_REGEX_XREF),
$this->getName(),
- 0
+ 0,
));
$block_id = Database::getInstance()->lastInsertId();
}
diff --git a/app/Module/ThemeSelectModule.php b/app/Module/ThemeSelectModule.php
index 7cc142613b..980913fb23 100644
--- a/app/Module/ThemeSelectModule.php
+++ b/app/Module/ThemeSelectModule.php
@@ -33,10 +33,10 @@ class ThemeSelectModule extends AbstractModule implements ModuleBlockInterface {
/** {@inheritdoc} */
public function getBlock($block_id, $template = true, $cfg = null) {
/** @var BaseTheme */
- $id = $this->getName() . $block_id;
+ $id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
$title = $this->getTitle();
- $menu = Theme::theme()->menuThemes();
+ $menu = Theme::theme()->menuThemes();
if ($menu) {
$content = '<div class="center theme_form">' . $menu . '</div><br>';
diff --git a/app/Module/TopGivenNamesModule.php b/app/Module/TopGivenNamesModule.php
index adfe7ba89c..220cb6e739 100644
--- a/app/Module/TopGivenNamesModule.php
+++ b/app/Module/TopGivenNamesModule.php
@@ -88,8 +88,8 @@ class TopGivenNamesModule extends AbstractModule implements ModuleBlockInterface
$params = array(1, $num, 'rcount');
$content .= '<table style="margin:auto;">
<tr valign="top">
- <td>'.$stats->commonGivenFemaleTable($params) . '</td>
- <td>'.$stats->commonGivenMaleTable($params) . '</td>';
+ <td>' . $stats->commonGivenFemaleTable($params) . '</td>
+ <td>' . $stats->commonGivenMaleTable($params) . '</td>';
$content .= '</tr></table>';
break;
}
@@ -99,6 +99,7 @@ class TopGivenNamesModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -141,7 +142,7 @@ class TopGivenNamesModule extends AbstractModule implements ModuleBlockInterface
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
- echo select_edit_control('infoStyle', array('list'=> I18N::translate('list'), 'table'=> I18N::translate('table')), null, $infoStyle, '');
+ echo select_edit_control('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
diff --git a/app/Module/TopPageViewsModule.php b/app/Module/TopPageViewsModule.php
index 2ddea6a4a5..c2f48dc953 100644
--- a/app/Module/TopPageViewsModule.php
+++ b/app/Module/TopPageViewsModule.php
@@ -67,13 +67,12 @@ class TopPageViewsModule extends AbstractModule implements ModuleBlockInterface
'limit' => (int) $num,
))->FetchAssoc();
-
if ($block) {
$content .= "<table width=\"90%\">";
} else {
$content .= "<table>";
}
- foreach ($top10 as $id=>$count) {
+ foreach ($top10 as $id => $count) {
$record = GedcomRecord::getInstance($id, $WT_TREE);
if ($record && $record->canShow()) {
$content .= '<tr valign="top">';
@@ -93,6 +92,7 @@ class TopPageViewsModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -135,7 +135,7 @@ class TopPageViewsModule extends AbstractModule implements ModuleBlockInterface
echo "<tr><td class=\"descriptionbox wrap width33\">";
echo I18N::translate('Place counts before or after name?');
echo "</td><td class=\"optionbox\">";
- echo select_edit_control('count_placement', array('before'=> I18N::translate('before'), 'after'=> I18N::translate('after')), null, $count_placement, '');
+ echo select_edit_control('count_placement', array('before' => I18N::translate('before'), 'after' => I18N::translate('after')), null, $count_placement, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
diff --git a/app/Module/TopSurnamesModule.php b/app/Module/TopSurnamesModule.php
index 7641d6c43a..349df64ed8 100644
--- a/app/Module/TopSurnamesModule.php
+++ b/app/Module/TopSurnamesModule.php
@@ -111,6 +111,7 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface {
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
@@ -170,7 +171,7 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface {
* @param string[] $a
* @param string[] $b
*
- * @return integer
+ * @return int
*/
private static function surnameCountSort($a, $b) {
$counta = 0;
diff --git a/app/Module/UpcomingAnniversariesModule.php b/app/Module/UpcomingAnniversariesModule.php
index 88e543a4aa..64859c7a16 100644
--- a/app/Module/UpcomingAnniversariesModule.php
+++ b/app/Module/UpcomingAnniversariesModule.php
@@ -79,6 +79,7 @@ class UpcomingAnniversariesModule extends AbstractModule implements ModuleBlockI
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -140,15 +141,15 @@ class UpcomingAnniversariesModule extends AbstractModule implements ModuleBlockI
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
- echo select_edit_control('infoStyle', array('list'=> I18N::translate('list'), 'table'=> I18N::translate('table')), null, $infoStyle, '');
+ echo select_edit_control('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Sort order');
echo '</td><td class="optionbox">';
echo select_edit_control('sortStyle', array(
- /* I18N: An option in a list-box */ 'alpha'=> I18N::translate('sort by name'),
- /* I18N: An option in a list-box */ 'anniv'=> I18N::translate('sort by date'),
+ /* I18N: An option in a list-box */ 'alpha' => I18N::translate('sort by name'),
+ /* I18N: An option in a list-box */ 'anniv' => I18N::translate('sort by date'),
), null, $sortStyle, '');
echo '</td></tr>';
diff --git a/app/Module/UserFavoritesModule.php b/app/Module/UserFavoritesModule.php
index f59b34626d..4e2829350d 100644
--- a/app/Module/UserFavoritesModule.php
+++ b/app/Module/UserFavoritesModule.php
@@ -42,7 +42,7 @@ class UserFavoritesModule extends FamilyTreeFavoritesModule {
/**
* Get the favorites for a user (for the current family tree)
*
- * @param integer $user_id
+ * @param int $user_id
*
* @return string[][]
*/
diff --git a/app/Module/UserJournalModule.php b/app/Module/UserJournalModule.php
index 95a4ddc988..a795f7c5e0 100644
--- a/app/Module/UserJournalModule.php
+++ b/app/Module/UserJournalModule.php
@@ -81,6 +81,7 @@ class UserJournalModule extends AbstractModule implements ModuleBlockInterface {
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
diff --git a/app/Module/UserMessagesModule.php b/app/Module/UserMessagesModule.php
index a90362b597..57a3487dde 100644
--- a/app/Module/UserMessagesModule.php
+++ b/app/Module/UserMessagesModule.php
@@ -113,6 +113,7 @@ class UserMessagesModule extends AbstractModule implements ModuleBlockInterface
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
diff --git a/app/Module/UserWelcomeModule.php b/app/Module/UserWelcomeModule.php
index 3168bd8d67..399b7e5722 100644
--- a/app/Module/UserWelcomeModule.php
+++ b/app/Module/UserWelcomeModule.php
@@ -34,9 +34,9 @@ class UserWelcomeModule extends AbstractModule implements ModuleBlockInterface {
public function getBlock($block_id, $template = true, $cfg = null) {
global $WT_TREE;
- $id = $this->getName() . $block_id;
- $class = $this->getName() . '_block';
- $title = '<span dir="auto">' . /* I18N: A greeting; %s is the user’s name */ I18N::translate('Welcome %s', Auth::user()->getRealNameHtml()) . '</span>';
+ $id = $this->getName() . $block_id;
+ $class = $this->getName() . '_block';
+ $title = '<span dir="auto">' . /* I18N: A greeting; %s is the user’s name */ I18N::translate('Welcome %s', Auth::user()->getRealNameHtml()) . '</span>';
$content = '<table><tr>';
$content .= '<td><a href="edituser.php"><i class="icon-mypage"></i><br>' . I18N::translate('My account') . '</a></td>';
diff --git a/app/Module/WelcomeBlockModule.php b/app/Module/WelcomeBlockModule.php
index c405befcf1..3f1d14fc9b 100644
--- a/app/Module/WelcomeBlockModule.php
+++ b/app/Module/WelcomeBlockModule.php
@@ -35,10 +35,10 @@ class WelcomeBlockModule extends AbstractModule implements ModuleBlockInterface
global $controller, $WT_TREE;
$indi_xref = $controller->getSignificantIndividual()->getXref();
- $id = $this->getName() . $block_id;
- $class = $this->getName() . '_block';
- $title = '<span dir="auto">' . $WT_TREE->getTitleHtml() . '</span>';
- $content = '<table><tr>';
+ $id = $this->getName() . $block_id;
+ $class = $this->getName() . '_block';
+ $title = '<span dir="auto">' . $WT_TREE->getTitleHtml() . '</span>';
+ $content = '<table><tr>';
$content .= '<td><a href="pedigree.php?rootid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . '</a></td>';
$content .= '<td><a href="individual.php?pid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-indis"></i><br>' . I18N::translate('Default individual') . '</a></td>';
if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
diff --git a/app/Module/YahrzeitModule.php b/app/Module/YahrzeitModule.php
index a064599c2b..fa69761247 100644
--- a/app/Module/YahrzeitModule.php
+++ b/app/Module/YahrzeitModule.php
@@ -72,7 +72,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
// Exact hebrew dates only
$date = $fact->getDate();
if ($date->minimumDate() instanceof JewishDate && $date->minimumJulianDay() === $date->maximumJulianDay()) {
- $fact->jd = $jd;
+ $fact->jd = $jd;
$yahrzeits[] = $fact;
}
}
@@ -84,8 +84,8 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
foreach ($yahrzeits as $yahrzeit) {
if ($yahrzeit->getTag() === 'DEAT') {
$today = new JewishDate($yahrzeit->jd);
- $hd = $yahrzeit->getDate()->minimumDate();
- $hd1 = new JewishDate($hd);
+ $hd = $yahrzeit->getDate()->minimumDate();
+ $hd1 = new JewishDate($hd);
$hd1->y += 1;
$hd1->setJdFromYmd();
// Special rules. See http://www.hebcal.com/help/anniv.html
@@ -122,7 +122,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
->addInlineJavascript('
- jQuery("#'.$table_id . '").dataTable({
+ jQuery("#' . $table_id . '").dataTable({
dom: \'t\',
' . I18N::datatablesI18N() . ',
autoWidth: false,
@@ -142,7 +142,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
/* 6-YART */ { visible: false }
]
});
- jQuery("#'.$table_id . '").css("visibility", "visible");
+ jQuery("#' . $table_id . '").css("visibility", "visible");
jQuery(".loading-image").css("display", "none");
');
$content = '';
@@ -164,7 +164,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
$ind = $yahrzeit->getParent();
// Individual name(s)
$name = $ind->getFullName();
- $url = $ind->getHtmlUrl();
+ $url = $ind->getHtmlUrl();
$content .= '<td>';
$content .= '<a href="' . $url . '">' . $name . '</a>';
$content .= $ind->getSexImage();
@@ -208,6 +208,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
if ($block) {
$class .= ' small_inner_block';
}
+
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
@@ -253,15 +254,15 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface {
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
- echo select_edit_control('infoStyle', array('list'=> I18N::translate('list'), 'table'=> I18N::translate('table')), null, $infoStyle, '');
+ echo select_edit_control('infoStyle', array('list' => I18N::translate('list'), 'table' => I18N::translate('table')), null, $infoStyle, '');
echo '</td></tr>';
echo '<tr><td class="descriptionbox wrap width33">';
echo I18N::translate('Calendar');
echo '</td><td class="optionbox">';
echo select_edit_control('calendar', array(
- 'jewish' => /* I18N: The Hebrew/Jewish calendar */ I18N::translate('Jewish'),
- 'gregorian'=> /* I18N: The gregorian calendar */ I18N::translate('Gregorian'),
+ 'jewish' => /* I18N: The Hebrew/Jewish calendar */ I18N::translate('Jewish'),
+ 'gregorian' => /* I18N: The gregorian calendar */ I18N::translate('Gregorian'),
), null, $calendar, '');
echo '</td></tr>';
diff --git a/app/Note.php b/app/Note.php
index 73833912e1..fabd791332 100644
--- a/app/Note.php
+++ b/app/Note.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class Note extends GedcomRecord {
const RECORD_TYPE = 'NOTE';
- const URL_PREFIX = 'note.php?nid=';
+ const URL_PREFIX = 'note.php?nid=';
/**
* Get an instance of a note object. For single records,
@@ -63,7 +63,7 @@ class Note extends GedcomRecord {
$linked_ids = Database::prepare(
"SELECT l_from FROM `##link` WHERE l_to=? AND l_file=?"
)->execute(array(
- $this->xref, $this->tree->getTreeId()
+ $this->xref, $this->tree->getTreeId(),
))->fetchOneColumn();
foreach ($linked_ids as $linked_id) {
$linked_record = GedcomRecord::getInstance($linked_id, $this->tree);
@@ -87,7 +87,7 @@ class Note extends GedcomRecord {
"SELECT o_gedcom FROM `##other` WHERE o_id = :xref AND o_file = :tree_id AND o_type = 'NOTE'"
)->execute(array(
'xref' => $xref,
- 'tree_id' => $tree_id
+ 'tree_id' => $tree_id,
))->fetchOne();
}
diff --git a/app/Place.php b/app/Place.php
index 0d7c6d9295..f21e1b2565 100644
--- a/app/Place.php
+++ b/app/Place.php
@@ -47,7 +47,7 @@ class Place {
}
/**
- * @return integer
+ * @return int
*/
public function getPlaceId() {
$place_id = 0;
@@ -203,7 +203,7 @@ class Place {
*/
public static function allPlaces(Tree $tree) {
$places = array();
- $rows =
+ $rows =
Database::prepare(
"SELECT SQL_CACHE CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place)" .
" FROM `##places` AS p1" .
@@ -225,6 +225,7 @@ class Place {
foreach ($rows as $row) {
$places[] = new Place($row, $tree);
}
+
return $places;
}
@@ -236,7 +237,7 @@ class Place {
*/
public static function findPlaces($filter, Tree $tree) {
$places = array();
- $rows =
+ $rows =
Database::prepare(
"SELECT SQL_CACHE CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place)" .
" FROM `##places` AS p1" .
@@ -251,14 +252,15 @@ class Place {
" WHERE CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place) LIKE CONCAT('%', :filter_1, '%') AND CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place) NOT LIKE CONCAT('%,%', :filter_2, '%') AND p1.p_file = :tree_id" .
" ORDER BY CONCAT_WS(', ', p1.p_place, p2.p_place, p3.p_place, p4.p_place, p5.p_place, p6.p_place, p7.p_place, p8.p_place, p9.p_place) COLLATE :collation"
)->execute(array(
- 'filter_1' => preg_quote($filter),
- 'filter_2' => preg_quote($filter),
- 'tree_id' => $tree->getTreeId(),
+ 'filter_1' => preg_quote($filter),
+ 'filter_2' => preg_quote($filter),
+ 'tree_id' => $tree->getTreeId(),
'collation' => I18N::collation(),
))->fetchOneColumn();
foreach ($rows as $row) {
$places[] = new Place($row, $tree);
}
+
return $places;
}
}
diff --git a/app/Query/QueryMedia.php b/app/Query/QueryMedia.php
index 605ddc22e6..42ab27fbc8 100644
--- a/app/Query/QueryMedia.php
+++ b/app/Query/QueryMedia.php
@@ -18,10 +18,6 @@ namespace Fisharebest\Webtrees;
/**
* Class QueryMedia - generate lists of files for admin_media.php
- *
- * @package webtrees
- * @copyright (c) 2014 webtrees development team
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2
*/
class QueryMedia {
/**
@@ -80,8 +76,9 @@ class QueryMedia {
* @param string $filter optional search string
* @param string $form_type option OBJE/FILE/FORM/TYPE
*
- * @return Media[]
* @throws \Exception
+ *
+ * @return Media[]
*/
public static function mediaList($folder, $subfolders, $sort, $filter, $form_type) {
global $WT_TREE;
@@ -148,6 +145,7 @@ class QueryMedia {
$list[] = $media;
}
}
+
return $list;
}
}
diff --git a/app/Query/QueryName.php b/app/Query/QueryName.php
index e825baa92f..306ae2dc1e 100644
--- a/app/Query/QueryName.php
+++ b/app/Query/QueryName.php
@@ -18,10 +18,6 @@ namespace Fisharebest\Webtrees;
/**
* Class QueryName - generate lists for indilist.php and famlist.php
- *
- * @package webtrees
- * @copyright (c) 2015 webtrees development team
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2
*/
class QueryName {
/**
@@ -35,82 +31,82 @@ class QueryName {
switch ($locale) {
case 'ar':
return array(
- 'ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'و', 'ي', 'آ', 'ة', 'ى', 'ی'
+ 'ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'و', 'ي', 'آ', 'ة', 'ى', 'ی',
);
case 'cs':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'CH', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'CH', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
);
case 'da':
case 'nb':
case 'nn':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Æ', 'Ø', 'Å'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Æ', 'Ø', 'Å',
);
case 'el':
return array(
- 'Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ', 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ', 'Υ', 'Φ', 'Χ', 'Ψ', 'Ω'
+ 'Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ', 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ', 'Υ', 'Φ', 'Χ', 'Ψ', 'Ω',
);
case 'es':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'Ñ', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'Ñ', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
);
case 'et':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'Z', 'Ž', 'T', 'U', 'V', 'W', 'Õ', 'Ä', 'Ö', 'Ü', 'X', 'Y'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'Z', 'Ž', 'T', 'U', 'V', 'W', 'Õ', 'Ä', 'Ö', 'Ü', 'X', 'Y',
);
case 'fi':
case 'sv':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Å', 'Ä', 'Ö'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Å', 'Ä', 'Ö',
);
case 'he':
return array(
- 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז', 'ח', 'ט', 'י', 'כ', 'ל', 'מ', 'נ', 'ס', 'ע', 'פ', 'צ', 'ק', 'ר', 'ש', 'ת'
+ 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז', 'ח', 'ט', 'י', 'כ', 'ל', 'מ', 'נ', 'ס', 'ע', 'פ', 'צ', 'ק', 'ר', 'ש', 'ת',
);
case 'hu':
return array(
- 'A', 'B', 'C', 'CS', 'D', 'DZ', 'DZS', 'E', 'F', 'G', 'GY', 'H', 'I', 'J', 'K', 'L', 'LY', 'M', 'N', 'NY', 'O', 'Ö', 'P', 'Q', 'R', 'S', 'SZ', 'T', 'TY', 'U', 'Ü', 'V', 'W', 'X', 'Y', 'Z', 'ZS'
+ 'A', 'B', 'C', 'CS', 'D', 'DZ', 'DZS', 'E', 'F', 'G', 'GY', 'H', 'I', 'J', 'K', 'L', 'LY', 'M', 'N', 'NY', 'O', 'Ö', 'P', 'Q', 'R', 'S', 'SZ', 'T', 'TY', 'U', 'Ü', 'V', 'W', 'X', 'Y', 'Z', 'ZS',
);
case 'lt':
return array(
- 'A', 'Ą', 'B', 'C', 'Č', 'D', 'E', 'Ę', 'Ė', 'F', 'G', 'H', 'I', 'Y', 'Į', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'Š', 'T', 'U', 'Ų', 'Ū', 'V', 'Z', 'Ž'
+ 'A', 'Ą', 'B', 'C', 'Č', 'D', 'E', 'Ę', 'Ė', 'F', 'G', 'H', 'I', 'Y', 'Į', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'Š', 'T', 'U', 'Ų', 'Ū', 'V', 'Z', 'Ž',
);
case 'nl':
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'IJ'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'IJ',
);
case 'pl':
return array(
- 'A', 'B', 'C', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'Ł', 'M', 'N', 'O', 'Ó', 'P', 'Q', 'R', 'S', 'Ś', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ź', 'Ż'
+ 'A', 'B', 'C', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'Ł', 'M', 'N', 'O', 'Ó', 'P', 'Q', 'R', 'S', 'Ś', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ź', 'Ż',
);
case 'ro':
return array(
- 'A', 'Ă', 'Â', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'Î', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Ş', 'T', 'Ţ', 'U', 'V', 'W', 'X', 'Y', 'Z'
+ 'A', 'Ă', 'Â', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'Î', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Ş', 'T', 'Ţ', 'U', 'V', 'W', 'X', 'Y', 'Z',
);
case 'ru':
return array(
- 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь', 'Э', 'Ю', 'Я'
+ 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь', 'Э', 'Ю', 'Я',
);
case 'sk':
return array(
- 'A', 'Á', 'Ä', 'B', 'C', 'Č', 'D', 'Ď', 'E', 'É', 'F', 'G', 'H', 'I', 'Í', 'J', 'K', 'L', 'Ľ', 'Ĺ', 'M', 'N', 'Ň', 'O', 'Ó', 'Ô', 'P', 'Q', 'R', 'Ŕ', 'S', 'Š', 'T', 'Ť', 'U', 'Ú', 'V', 'W', 'X', 'Y', 'Ý', 'Z', 'Ž'
+ 'A', 'Á', 'Ä', 'B', 'C', 'Č', 'D', 'Ď', 'E', 'É', 'F', 'G', 'H', 'I', 'Í', 'J', 'K', 'L', 'Ľ', 'Ĺ', 'M', 'N', 'Ň', 'O', 'Ó', 'Ô', 'P', 'Q', 'R', 'Ŕ', 'S', 'Š', 'T', 'Ť', 'U', 'Ú', 'V', 'W', 'X', 'Y', 'Ý', 'Z', 'Ž',
);
case 'sl':
return array(
- 'A', 'B', 'C', 'Č', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ž'
+ 'A', 'B', 'C', 'Č', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ž',
);
case 'sr':
return array(
- 'A', 'B', 'C', 'Č', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ž'
+ 'A', 'B', 'C', 'Č', 'Ć', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'Š', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Ž',
);
case 'tr':
return array(
- 'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z'
+ 'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z',
);
default:
return array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
);
}
}
@@ -231,10 +227,10 @@ class QueryName {
/**
* Get a list of initial surname letters for indilist.php and famlist.php
*
- * @param Tree $tree Find surnames from this tree
- * @param boolean $marnm if set, include married names
- * @param boolean $fams if set, only consider individuals with FAMS records
- * @param boolean $totals if set, count the number of names beginning with each letter
+ * @param Tree $tree Find surnames from this tree
+ * @param bool $marnm if set, include married names
+ * @param bool $fams if set, only consider individuals with FAMS records
+ * @param bool $totals if set, count the number of names beginning with each letter
*
* @return integer[]
*/
@@ -275,7 +271,7 @@ class QueryName {
foreach (self::getAlphabetForLocale(WT_LOCALE) as $n => $letter) {
$sql .= " AND n_surn COLLATE :collate_" . $n . " NOT LIKE :letter_" . $n;
$args['collate_' . $n] = I18N::collation();
- $args['letter_' . $n] = $letter . '%';
+ $args['letter_' . $n] = $letter . '%';
}
$sql .= " GROUP BY UPPER(LEFT(n_surn, 1))) AS subquery ORDER BY initial = '', initial = '@', initial";
foreach (Database::prepare($sql)->execute($args)->fetchAssoc() as $alpha => $count) {
@@ -306,11 +302,11 @@ class QueryName {
/**
* Get a list of initial given name letters for indilist.php and famlist.php
*
- * @param Tree $tree Find names in this tree
- * @param string $surn if set, only consider people with this surname
- * @param string $salpha if set, only consider surnames starting with this letter
- * @param boolean $marnm if set, include married names
- * @param boolean $fams if set, only consider individuals with FAMS records
+ * @param Tree $tree Find names in this tree
+ * @param string $surn if set, only consider people with this surname
+ * @param string $salpha if set, only consider surnames starting with this letter
+ * @param bool $marnm if set, include married names
+ * @param bool $fams if set, only consider individuals with FAMS records
*
* @return integer[]
*/
@@ -341,7 +337,7 @@ class QueryName {
// are any names beginning with that letter. It looks better to
// show the full alphabet, rather than omitting rare letters such as X
foreach (self::getAlphabetForLocale(WT_LOCALE) as $letter) {
- $count = Database::prepare($sql . " AND " . self::getInitialSql('n_givn', $letter))->fetchOne();
+ $count = Database::prepare($sql . " AND " . self::getInitialSql('n_givn', $letter))->fetchOne();
$alphas[$letter] = $count;
}
@@ -361,7 +357,7 @@ class QueryName {
if ($surn) {
$sql .= " AND n_surn COLLATE :collate_1 = :surn";
$args['collate_1'] = I18N::collation();
- $args['surn'] = $surn;
+ $args['surn'] = $surn;
} elseif ($salpha === ',') {
$sql .= " AND n_surn = ''";
} elseif ($salpha === '@') {
@@ -388,11 +384,11 @@ class QueryName {
/**
* Get a list of actual surnames and variants, based on a "root" surname.
*
- * @param Tree $tree only fetch individuals from this tree
- * @param string $surn if set, only fetch people with this surname
- * @param string $salpha if set, only consider surnames starting with this letter
- * @param boolean $marnm if set, include married names
- * @param boolean $fams if set, only consider individuals with FAMS records
+ * @param Tree $tree only fetch individuals from this tree
+ * @param string $surn if set, only fetch people with this surname
+ * @param string $salpha if set, only consider surnames starting with this letter
+ * @param bool $marnm if set, include married names
+ * @param bool $fams if set, only consider individuals with FAMS records
*
* @return array
*/
@@ -406,14 +402,14 @@ class QueryName {
($marnm ? "" : " AND n_type != '_MARNM'");
$args = array(
- 'tree_id' => $tree->getTreeId(),
+ 'tree_id' => $tree->getTreeId(),
'collate_0' => I18N::collation(),
);
if ($surn) {
$sql .= " AND n_surn COLLATE :collate_1 = :surn";
$args['collate_1'] = I18N::collation();
- $args['surn'] = $surn;
+ $args['surn'] = $surn;
} elseif ($salpha === ',') {
$sql .= " AND n_surn = ''";
} elseif ($salpha === '@') {
@@ -442,12 +438,12 @@ class QueryName {
* To search for unknown names, use $surn="@N.N.", $salpha="@" or $galpha="@"
* To search for names with no surnames, use $salpha=","
*
- * @param Tree $tree only fetch individuals from this tree
- * @param string $surn if set, only fetch people with this surname
- * @param string $salpha if set, only fetch surnames starting with this letter
+ * @param Tree $tree only fetch individuals from this tree
+ * @param string $surn if set, only fetch people with this surname
+ * @param string $salpha if set, only fetch surnames starting with this letter
* @param string $galpha if set, only fetch given names starting with this letter
- * @param boolean $marnm if set, include married names
- * @param boolean $fams if set, only fetch individuals with FAMS records
+ * @param bool $marnm if set, include married names
+ * @param bool $fams if set, only fetch individuals with FAMS records
*
* @return Individual[]
*/
@@ -467,7 +463,7 @@ class QueryName {
if ($surn) {
$sql .= " AND n_surn COLLATE :collate_1 = :surn";
$args['collate_1'] = I18N::collation();
- $args['surn'] = $surn;
+ $args['surn'] = $surn;
} elseif ($salpha === ',') {
$sql .= " AND n_surn = ''";
} elseif ($salpha === '@') {
@@ -491,7 +487,7 @@ class QueryName {
foreach ($rows as $row) {
$person = Individual::getInstance($row->xref, $tree, $row->gedcom);
// The name from the database may be private - check the filtered list...
- foreach ($person->getAllNames() as $n=>$name) {
+ foreach ($person->getAllNames() as $n => $name) {
if ($name['fullNN'] == $row->n_full) {
$person->setPrimaryName($n);
// We need to clone $person, as we may have multiple references to the
@@ -512,11 +508,11 @@ class QueryName {
* To search for unknown names, use $surn="@N.N.", $salpha="@" or $galpha="@"
* To search for names with no surnames, use $salpha=","
*
- * @param Tree $tree only fetch individuals from this tree
- * @param string $surn if set, only fetch people with this surname
- * @param string $salpha if set, only fetch surnames starting with this letter
- * @param string $galpha if set, only fetch given names starting with this letter
- * @param boolean $marnm if set, include married names
+ * @param Tree $tree only fetch individuals from this tree
+ * @param string $surn if set, only fetch people with this surname
+ * @param string $salpha if set, only fetch surnames starting with this letter
+ * @param string $galpha if set, only fetch given names starting with this letter
+ * @param bool $marnm if set, include married names
*
* @return Family[]
*/
diff --git a/app/Report/ReportBase.php b/app/Report/ReportBase.php
index 7b196b117c..6ea64b581a 100644
--- a/app/Report/ReportBase.php
+++ b/app/Report/ReportBase.php
@@ -62,16 +62,16 @@ class ReportBase {
/** @var string The default Report font name */
public $defaultFont = 'dejavusans';
- /** @var integer The default Report font size */
+ /** @var int The default Report font size */
public $defaultFontSize = 12;
/** @var string Header (H), Page header (PH), Body (B) or Footer (F) */
public $processing = 'H';
- /** @var boolean RTL Language (false=LTR, true=RTL) */
+ /** @var bool RTL Language (false=LTR, true=RTL) */
public $rtl = false;
- /** @var boolean Show the Generated by... (true=show the text) */
+ /** @var bool Show the Generated by... (true=show the text) */
public $showGenText = true;
/** @var string Generated By... text */
@@ -94,7 +94,6 @@ class ReportBase {
*
* Setting up document wide defaults that will be inherited of the report modules
* As DEFAULT A4 and Portrait will be used if not set
- *
*/
public function setup() {
// Set RTL direction
@@ -389,7 +388,7 @@ class ReportBase {
break;
default:
$this->pageFormat = 'A4';
- $sizes = array(595.28, 841.89);
+ $sizes = array(595.28, 841.89);
break;
}
$this->pagew = $sizes[0];
@@ -411,7 +410,7 @@ class ReportBase {
*
* @param string $p Header (H), Page header (PH), Body (B) or Footer (F)
*
- * @return integer
+ * @return int
*/
public function setProcessing($p) {
$this->processing = $p;
@@ -424,7 +423,7 @@ class ReportBase {
*
* @param string $data
*
- * @return integer
+ * @return int
*/
public function addTitle($data) {
$this->title .= $data;
@@ -437,7 +436,7 @@ class ReportBase {
*
* @param string $data
*
- * @return integer
+ * @return int
*/
public function addDescription($data) {
$this->rsubject .= $data;
@@ -450,7 +449,7 @@ class ReportBase {
*
* @param array $style
*
- * @return integer
+ * @return int
*/
public function addStyle($style) {
$this->Styles[$style['name']] = $style;
@@ -483,7 +482,6 @@ class ReportBase {
* @param resource $parser the resource handler for the XML parser
* @param string $name the name of the XML element parsed
* @param array $attrs an array of key value pairs for the attributes
- *
*/
function startElement($parser, $name, $attrs) {
global $elementHandler, $processIfs, $processGedcoms, $processRepeats, $vars;
@@ -519,7 +517,6 @@ function startElement($parser, $name, $attrs) {
*
* @param resource $parser the resource handler for the XML parser
* @param string $name the name of the XML element parsed
- *
*/
function endElement($parser, $name) {
global $elementHandler, $processIfs, $processGedcoms, $processRepeats;
@@ -728,9 +725,9 @@ function pageHeaderStartHandler() {
function pageHeaderEndHandler() {
global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack;
- $printData = array_pop($printDataStack);
+ $printData = array_pop($printDataStack);
$currentElement = $wt_report;
- $wt_report = array_pop($wt_reportStack);
+ $wt_report = array_pop($wt_reportStack);
$wt_report->addElement($currentElement);
}
@@ -948,8 +945,6 @@ function totalPagesStartHandler() {
* Called at the start of an element.
*
* @param array $attrs an array of key value pairs for the attributes
- *
- * @return void
*/
function gedcomStartHandler($attrs) {
global $vars, $gedrec, $gedrecStack, $processGedcoms, $fact, $desc, $ged_level, $WT_TREE;
@@ -960,41 +955,41 @@ function gedcomStartHandler($attrs) {
return;
}
- $tag = $attrs['id'];
- $tag = str_replace("@fact", $fact, $tag);
- $tags = explode(":", $tag);
+ $tag = $attrs['id'];
+ $tag = str_replace("@fact", $fact, $tag);
+ $tags = explode(":", $tag);
$newgedrec = '';
if (count($tags) < 2) {
- $tmp = GedcomRecord::getInstance($attrs['id'], $WT_TREE);
+ $tmp = GedcomRecord::getInstance($attrs['id'], $WT_TREE);
$newgedrec = $tmp ? $tmp->privatizeGedcom(Auth::accessLevel($WT_TREE)) : '';
}
if (empty($newgedrec)) {
- $tgedrec = $gedrec;
+ $tgedrec = $gedrec;
$newgedrec = '';
foreach ($tags as $tag) {
if (preg_match("/\\$(.+)/", $tag, $match)) {
if (isset($vars[$match[1]]['gedcom'])) {
$newgedrec = $vars[$match[1]]['gedcom'];
} else {
- $tmp = GedcomRecord::getInstance($match[1], $WT_TREE);
+ $tmp = GedcomRecord::getInstance($match[1], $WT_TREE);
$newgedrec = $tmp ? $tmp->privatizeGedcom(Auth::accessLevel($WT_TREE)) : '';
}
} else {
if (preg_match("/@(.+)/", $tag, $match)) {
$gmatch = array();
if (preg_match("/\d $match[1] @([^@]+)@/", $tgedrec, $gmatch)) {
- $tmp = GedcomRecord::getInstance($gmatch[1], $WT_TREE);
+ $tmp = GedcomRecord::getInstance($gmatch[1], $WT_TREE);
$newgedrec = $tmp ? $tmp->privatizeGedcom(Auth::accessLevel($WT_TREE)) : '';
- $tgedrec = $newgedrec;
+ $tgedrec = $newgedrec;
} else {
$newgedrec = '';
break;
}
} else {
- $temp = explode(" ", trim($tgedrec));
- $level = $temp[0] + 1;
+ $temp = explode(" ", trim($tgedrec));
+ $level = $temp[0] + 1;
$newgedrec = get_sub_record($level, "$level $tag", $tgedrec);
- $tgedrec = $newgedrec;
+ $tgedrec = $newgedrec;
}
}
}
@@ -1004,8 +999,8 @@ function gedcomStartHandler($attrs) {
$gedrec = $newgedrec;
if (preg_match("/(\d+) (_?[A-Z0-9]+) (.*)/", $gedrec, $match)) {
$ged_level = $match[1];
- $fact = $match[2];
- $desc = trim($match[3]);
+ $fact = $match[2];
+ $desc = trim($match[3]);
}
} else {
$processGedcoms++;
@@ -1014,8 +1009,6 @@ function gedcomStartHandler($attrs) {
/**
* Called at the end of an element.
- *
- * @return void
*/
function gedcomEndHandler() {
global $gedrec, $gedrecStack, $processGedcoms, $fact, $desc;
@@ -1023,10 +1016,10 @@ function gedcomEndHandler() {
if ($processGedcoms > 0) {
$processGedcoms--;
} else {
- $temp = array_pop($gedrecStack);
+ $temp = array_pop($gedrecStack);
$gedrec = $temp[0];
- $fact = $temp[1];
- $desc = $temp[2];
+ $fact = $temp[1];
+ $desc = $temp[2];
}
}
@@ -1163,9 +1156,9 @@ function textBoxStartHandler($attrs) {
function textBoxEndHandler() {
global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack;
- $printData = array_pop($printDataStack);
+ $printData = array_pop($printDataStack);
$currentElement = $wt_report;
- $wt_report = array_pop($wt_reportStack);
+ $wt_report = array_pop($wt_reportStack);
$wt_report->addElement($currentElement);
}
@@ -1215,7 +1208,7 @@ function getPersonNameStartHandler($attrs) {
// @deprecated
global $currentElement, $vars, $gedrec, $WT_TREE;
- $id = "";
+ $id = "";
$match = array();
if (empty($attrs['id'])) {
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
@@ -1254,9 +1247,9 @@ function getPersonNameStartHandler($attrs) {
$name = strip_tags($name);
if (!empty($attrs['truncate'])) {
if (mb_strlen($name) > $attrs['truncate']) {
- $name = preg_replace("/\(.*\) ?/", '', $name); //removes () and text inbetween - what about ", [ and { etc?
+ $name = preg_replace("/\(.*\) ?/", '', $name); //removes () and text inbetween - what about ", [ and { etc?
$words = preg_split('/[, -]+/', $name); // names separated with space, comma or hyphen - any others?
- $name = $words[count($words) - 1];
+ $name = $words[count($words) - 1];
for ($i = count($words) - 2; $i >= 0; $i--) {
$len = mb_strlen($name);
for ($j = count($words) - 3; $j >= 0; $j--) {
@@ -1299,7 +1292,7 @@ function gedcomValueStartHandler($attrs) {
// @deprecated
global $currentElement, $gedrec, $fact, $desc, $WT_TREE;
- $id = "";
+ $id = "";
$match = array();
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
$id = $match[1];
@@ -1323,7 +1316,7 @@ function gedcomValueStartHandler($attrs) {
} else {
$tag = str_replace("@fact", $fact, $tag);
if (empty($attrs['level'])) {
- $temp = explode(" ", trim($gedrec));
+ $temp = explode(" ", trim($gedrec));
$level = $temp[0];
if ($level == 0) {
$level++;
@@ -1331,15 +1324,15 @@ function gedcomValueStartHandler($attrs) {
} else {
$level = $attrs['level'];
}
- $tags = preg_split('/[: ]/', $tag);
+ $tags = preg_split('/[: ]/', $tag);
$value = get_gedcom_value($tag, $level, $gedrec);
switch (end($tags)) {
case 'DATE':
- $tmp = new Date($value);
+ $tmp = new Date($value);
$value = $tmp->display();
break;
case 'PLAC':
- $tmp = new Place($value, $WT_TREE);
+ $tmp = new Place($value, $WT_TREE);
$value = $tmp->getShortName();
break;
}
@@ -1373,7 +1366,7 @@ function repeatTagStartHandler($attrs) {
}
array_push($repeatsStack, array($repeats, $repeatBytes));
- $repeats = array();
+ $repeats = array();
$repeatBytes = xml_get_current_line_number($parser);
$tag = "";
@@ -1386,17 +1379,17 @@ function repeatTagStartHandler($attrs) {
$value = trim($value);
$currentElement->addText($value);
} else {
- $tag = str_replace("@fact", $fact, $tag);
- $tags = explode(":", $tag);
- $temp = explode(" ", trim($gedrec));
+ $tag = str_replace("@fact", $fact, $tag);
+ $tags = explode(":", $tag);
+ $temp = explode(" ", trim($gedrec));
$level = $temp[0];
if ($level == 0) {
$level++;
}
$subrec = $gedrec;
- $t = $tag;
- $count = count($tags);
- $i = 0;
+ $t = $tag;
+ $count = count($tags);
+ $i = 0;
while ($i < $count) {
$t = $tags[$i];
if (!empty($t)) {
@@ -1416,7 +1409,7 @@ function repeatTagStartHandler($attrs) {
}
$level--;
$count = preg_match_all("/$level $t(.*)/", $subrec, $match, PREG_SET_ORDER);
- $i = 0;
+ $i = 0;
while ($i < $count) {
$repeats[] = get_sub_record($level, "$level $t", $subrec, $i + 1);
$i++;
@@ -1452,7 +1445,7 @@ function repeatTagEndHandler() {
}
$lineoffset++;
$reportxml = "<tempdoc>\n";
- $line_nr = $lineoffset + $repeatBytes;
+ $line_nr = $lineoffset + $repeatBytes;
// RepeatTag Level counter
$count = 1;
while (0 < $count) {
@@ -1475,7 +1468,7 @@ function repeatTagEndHandler() {
foreach ($repeats as $gedrec) {
//-- start the sax parser
$repeat_parser = xml_parser_create();
- $parser = $repeat_parser;
+ $parser = $repeat_parser;
//-- make sure everything is case sensitive
xml_parser_set_option($repeat_parser, XML_OPTION_CASE_FOLDING, false);
//-- set the main element handler functions
@@ -1495,8 +1488,8 @@ function repeatTagEndHandler() {
$gedrec = $oldgedrec;
$parser = array_pop($parserStack);
}
- $temp = array_pop($repeatsStack);
- $repeats = $temp[0];
+ $temp = array_pop($repeatsStack);
+ $repeats = $temp[0];
$repeatBytes = $temp[1];
}
@@ -1504,18 +1497,13 @@ function repeatTagEndHandler() {
* Variable lookup
*
* Retrieve predefined variables :
+ *
* @ desc GEDCOM fact description, example:
* 1 EVEN This is a description
* @ fact GEDCOM fact tag, such as BIRT, DEAT etc.
* $ I18N::translate('....')
* $ language_settings[]
*
- *
- * Or retrieve variables preset with <SetVar> element
- *
- * If the variable is a date and 'date="1"' attribute is set then the date will be reformated
- * from Sep to September
- *
* @param array $attrs an array of key value pairs for the attributes
*/
function varStartHandler($attrs) {
@@ -1551,7 +1539,7 @@ function varStartHandler($attrs) {
// Check if variable is set as a date and reformat the date
if (isset($attrs['date'])) {
if ($attrs['date'] === "1") {
- $g = new Date($var);
+ $g = new Date($var);
$var = $g->display();
}
}
@@ -1571,10 +1559,10 @@ function factsStartHandler($attrs) {
}
array_push($repeatsStack, array($repeats, $repeatBytes));
- $repeats = array();
+ $repeats = array();
$repeatBytes = xml_get_current_line_number($parser);
- $id = "";
+ $id = "";
$match = array();
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
$id = $match[1];
@@ -1591,7 +1579,7 @@ function factsStartHandler($attrs) {
if (empty($attrs['diff']) && !empty($id)) {
$facts = $record->getFacts();
sort_facts($facts);
- $repeats = array();
+ $repeats = array();
$nonfacts = explode(',', $tag);
foreach ($facts as $event) {
if (!in_array($event->getTag(), $nonfacts)) {
@@ -1600,7 +1588,7 @@ function factsStartHandler($attrs) {
}
} else {
foreach ($record->getFacts() as $fact) {
- if ($fact->isPendingAddition() && $fact->getTag() <> 'CHAN') {
+ if ($fact->isPendingAddition() && $fact->getTag() != 'CHAN') {
$repeats[] = $fact->getGedcom();
}
}
@@ -1621,7 +1609,7 @@ function factsEndHandler() {
// Check if there is anything to repeat
if (count($repeats) > 0) {
- $line = xml_get_current_line_number($parser) - 1;
+ $line = xml_get_current_line_number($parser) - 1;
$lineoffset = 0;
foreach ($repeatsStack as $rep) {
$lineoffset += $rep[1];
@@ -1634,8 +1622,8 @@ function factsEndHandler() {
}
$lineoffset++;
$reportxml = "<tempdoc>\n";
- $i = $line + $lineoffset;
- $line_nr = $repeatBytes + $lineoffset;
+ $i = $line + $lineoffset;
+ $line_nr = $repeatBytes + $lineoffset;
while ($line_nr < $i) {
$reportxml .= $lines[$line_nr];
$line_nr++;
@@ -1646,12 +1634,12 @@ function factsEndHandler() {
// Save original values
array_push($parserStack, $parser);
$oldgedrec = $gedrec;
- $count = count($repeats);
- $i = 0;
+ $count = count($repeats);
+ $i = 0;
while ($i < $count) {
$gedrec = $repeats[$i];
- $fact = "";
- $desc = "";
+ $fact = "";
+ $desc = "";
if (preg_match("/1 (\w+)(.*)/", $gedrec, $match)) {
$fact = $match[1];
if ($fact == "EVEN" or $fact == "FACT") {
@@ -1667,7 +1655,7 @@ function factsEndHandler() {
}
//-- start the sax parser
$repeat_parser = xml_parser_create();
- $parser = $repeat_parser;
+ $parser = $repeat_parser;
//-- make sure everything is case sensitive
xml_parser_set_option($repeat_parser, XML_OPTION_CASE_FOLDING, false);
//-- set the main element handler functions
@@ -1688,8 +1676,8 @@ function factsEndHandler() {
$parser = array_pop($parserStack);
$gedrec = $oldgedrec;
}
- $temp = array_pop($repeatsStack);
- $repeats = $temp[0];
+ $temp = array_pop($repeatsStack);
+ $repeats = $temp[0];
$repeatBytes = $temp[1];
}
@@ -1706,7 +1694,7 @@ function setVarStartHandler($attrs) {
throw new \DomainException('REPORT ERROR var: The attribute "name" is missing or not set in the XML file');
}
- $name = $attrs['name'];
+ $name = $attrs['name'];
$value = $attrs['value'];
$match = array();
// Current GEDCOM record strings
@@ -1730,9 +1718,9 @@ function setVarStartHandler($attrs) {
$name = $vars["'" . $match[1] . "'"]['id'];
}
$count = preg_match_all("/\\$(\w+)/", $value, $match, PREG_SET_ORDER);
- $i = 0;
+ $i = 0;
while ($i < $count) {
- $t = $vars[$match[$i][1]]['id'];
+ $t = $vars[$match[$i][1]]['id'];
$value = preg_replace("/\\$" . $match[$i][1] . "/", $t, $value, 1);
$i++;
}
@@ -1747,19 +1735,19 @@ function setVarStartHandler($attrs) {
if (preg_match("/(\d+)\s*([\-\+\*\/])\s*(\d+)/", $value, $match)) {
switch ($match[2]) {
case "+":
- $t = $match[1] + $match[3];
+ $t = $match[1] + $match[3];
$value = preg_replace("/" . $match[1] . "\s*([\-\+\*\/])\s*" . $match[3] . "/", $t, $value);
break;
case "-":
- $t = $match[1] - $match[3];
+ $t = $match[1] - $match[3];
$value = preg_replace("/" . $match[1] . "\s*([\-\+\*\/])\s*" . $match[3] . "/", $t, $value);
break;
case "*":
- $t = $match[1] * $match[3];
+ $t = $match[1] * $match[3];
$value = preg_replace("/" . $match[1] . "\s*([\-\+\*\/])\s*" . $match[3] . "/", $t, $value);
break;
case "/":
- $t = $match[1] / $match[3];
+ $t = $match[1] / $match[3];
$value = preg_replace("/" . $match[1] . "\s*([\-\+\*\/])\s*" . $match[3] . "/", $t, $value);
break;
}
@@ -1789,11 +1777,11 @@ function ifStartHandler($attrs) {
$condition = str_replace(array(" LT ", " GT "), array("<", ">"), $condition);
// Replace the first accurance only once of @fact:DATE or in any other combinations to the current fact, such as BIRT
$condition = str_replace("@fact", $fact, $condition);
- $match = array();
- $count = preg_match_all("/@([\w:\.]+)/", $condition, $match, PREG_SET_ORDER);
- $i = 0;
+ $match = array();
+ $count = preg_match_all("/@([\w:\.]+)/", $condition, $match, PREG_SET_ORDER);
+ $i = 0;
while ($i < $count) {
- $id = $match[$i][1];
+ $id = $match[$i][1];
$value = "\"\"";
if ($id == "ID") {
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
@@ -1807,7 +1795,7 @@ function ifStartHandler($attrs) {
$value = "\"$generation\"";
} else {
- $temp = explode(" ", trim($gedrec));
+ $temp = explode(" ", trim($gedrec));
$level = $temp[0];
if ($level == 0) {
$level++;
@@ -1824,7 +1812,7 @@ function ifStartHandler($attrs) {
$i++;
}
$condition = "return (bool) ($condition);";
- $ret = @eval($condition);
+ $ret = @eval($condition);
if (!$ret) {
$processIfs++;
}
@@ -1858,14 +1846,14 @@ function footnoteStartHandler($attrs) {
if ($record && $record->canShow()) {
array_push($printDataStack, $printData);
$printData = true;
- $style = "";
+ $style = "";
if (!empty($attrs['style'])) {
$style = $attrs['style'];
}
$footnoteElement = $currentElement;
- $currentElement = $ReportRoot->createFootnote($style);
+ $currentElement = $ReportRoot->createFootnote($style);
} else {
- $printData = false;
+ $printData = false;
$processFootnote = false;
}
}
@@ -1880,7 +1868,7 @@ function footnoteEndHandler() {
if ($processFootnote) {
$printData = array_pop($printDataStack);
- $temp = trim($currentElement->getValue());
+ $temp = trim($currentElement->getValue());
if (strlen($temp) > 3) {
$wt_report->addElement($currentElement);
}
@@ -1945,7 +1933,7 @@ function ageAtDeathStartHandler() {
if ($age != '' && $age != "0d") {
if ($fact_age != '' && $fact_age != $age || $fact_age == '' && $husb_age == '' && $wife_age == '' || $husb_age != '' && $person->getSex() == 'M' && $husb_age != $age || $wife_age != '' && $person->getSex() == 'F' && $wife_age != $age
) {
- $value = get_age_at_event($age, false);
+ $value = get_age_at_event($age, false);
$abbrev = substr($value, 0, strpos($value, ' ') + 5);
if ($value !== $abbrev) {
$value = $abbrev . '.';
@@ -1959,7 +1947,6 @@ function ageAtDeathStartHandler() {
/**
* XML element Forced line break handler - HTML code
- *
*/
function brStartHandler() {
global $printData, $currentElement, $processGedcoms;
@@ -1984,7 +1971,7 @@ function spStartHandler() {
function highlightedImageStartHandler($attrs) {
global $gedrec, $wt_report, $ReportRoot, $WT_TREE;
- $id = '';
+ $id = '';
$match = array();
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
$id = $match[1];
@@ -2026,7 +2013,7 @@ function highlightedImageStartHandler($attrs) {
$ln = $attrs['ln'];
}
- $width = 0;
+ $width = 0;
$height = 0;
if (!empty($attrs['width'])) {
$width = (int) $attrs['width'];
@@ -2035,7 +2022,7 @@ function highlightedImageStartHandler($attrs) {
$height = (int) $attrs['height'];
}
- $person = Individual::getInstance($id, $WT_TREE);
+ $person = Individual::getInstance($id, $WT_TREE);
$mediaobject = $person->findHighlightedMedia();
if ($mediaobject) {
$attributes = $mediaobject->getImageAttributes('thumb');
@@ -2057,18 +2044,18 @@ function highlightedImageStartHandler($attrs) {
'SWC',
'IFF',
'WBMP',
- 'XBM'
+ 'XBM',
)
) && $mediaobject->canShow() && $mediaobject->fileExists('thumb')
) {
if (($width > 0) and ($height == 0)) {
- $perc = $width / $attributes['adjW'];
+ $perc = $width / $attributes['adjW'];
$height = round($attributes['adjH'] * $perc);
} elseif ($height > 0 && $width == 0) {
- $perc = $height / $attributes['adjH'];
+ $perc = $height / $attributes['adjH'];
$width = round($attributes['adjW'] * $perc);
} else {
- $width = $attributes['adjW'];
+ $width = $attributes['adjW'];
$height = $attributes['adjH'];
}
$image = $ReportRoot->createImageFromObject($mediaobject, $left, $top, $width, $height, $align, $ln);
@@ -2119,7 +2106,7 @@ function imageStartHandler($attrs) {
$ln = $attrs['ln'];
}
- $width = 0;
+ $width = 0;
$height = 0;
if (!empty($attrs['width'])) {
$width = (int) $attrs['width'];
@@ -2136,7 +2123,7 @@ function imageStartHandler($attrs) {
$match = array();
if (preg_match("/\d OBJE @(.+)@/", $gedrec, $match)) {
$mediaobject = Media::getInstance($match[1], $WT_TREE);
- $attributes = $mediaobject->getImageAttributes('thumb');
+ $attributes = $mediaobject->getImageAttributes('thumb');
if (in_array(
$attributes['ext'],
array(
@@ -2155,18 +2142,18 @@ function imageStartHandler($attrs) {
'SWC',
'IFF',
'WBMP',
- 'XBM'
+ 'XBM',
)
) && $mediaobject->canShow() && $mediaobject->fileExists('thumb')
) {
if (($width > 0) and ($height == 0)) {
- $perc = $width / $attributes['adjW'];
+ $perc = $width / $attributes['adjW'];
$height = round($attributes['adjH'] * $perc);
} elseif ($height > 0 && $width == 0) {
- $perc = $height / $attributes['adjH'];
+ $perc = $height / $attributes['adjH'];
$width = round($attributes['adjW'] * $perc);
} else {
- $width = $attributes['adjW'];
+ $width = $attributes['adjW'];
$height = $attributes['adjH'];
}
$image = $ReportRoot->createImageFromObject($mediaobject, $left, $top, $width, $height, $align, $ln);
@@ -2177,13 +2164,13 @@ function imageStartHandler($attrs) {
if (file_exists($file) && preg_match("/(jpg|jpeg|png|gif)$/i", $file)) {
$size = getimagesize($file);
if (($width > 0) and ($height == 0)) {
- $perc = $width / $size[0];
+ $perc = $width / $size[0];
$height = round($size[1] * $perc);
} elseif ($height > 0 && $width == 0) {
- $perc = $height / $size[1];
+ $perc = $height / $size[1];
$width = round($size[0] * $perc);
} else {
- $width = $size[0];
+ $width = $size[0];
$height = $size[1];
}
$image = $ReportRoot->createImage($file, $left, $top, $width, $height, $align, $ln);
@@ -2457,14 +2444,14 @@ function listStartHandler($attrs) {
throw new \DomainException('Invalid list name: ' . $listname);
}
- $filters = array();
+ $filters = array();
$filters2 = array();
if ((isset($attrs['filter1'])) and (count($list) > 0)) {
foreach ($attrs as $key => $value) {
if (preg_match("/filter(\d)/", $key)) {
$condition = $value;
if (preg_match("/@(\w+)/", $condition, $match)) {
- $id = $match[1];
+ $id = $match[1];
$value = "''";
if ($id == "ID") {
if (preg_match("/0 @(.+)@/", $gedrec, $match)) {
@@ -2483,16 +2470,16 @@ function listStartHandler($attrs) {
}
//-- handle regular expressions
if (preg_match("/([A-Z:]+)\s*([^\s]+)\s*(.+)/", $condition, $match)) {
- $tag = trim($match[1]);
+ $tag = trim($match[1]);
$expr = trim($match[2]);
- $val = trim($match[3]);
+ $val = trim($match[3]);
if (preg_match("/\\$(\w+)/", $val, $match)) {
$val = $vars[$match[1]]['id'];
$val = trim($val);
}
if ($val) {
$searchstr = "";
- $tags = explode(":", $tag);
+ $tags = explode(":", $tag);
//-- only limit to a level number if we are specifically looking at a level
if (count($tags) > 1) {
$level = 1;
@@ -2511,7 +2498,7 @@ function listStartHandler($attrs) {
if ($tag == "EMAIL" || $tag == "_EMAIL") {
$tag = "_?EMAIL";
}
- $t = $tag;
+ $t = $tag;
$searchstr = "1 " . $tag;
}
switch ($expr) {
@@ -2546,26 +2533,26 @@ function listStartHandler($attrs) {
if ($filters2) {
$mylist = array();
foreach ($list as $indi) {
- $key = $indi->getXref();
+ $key = $indi->getXref();
$grec = $indi->privatizeGedcom(Auth::accessLevel($WT_TREE));
$keep = true;
foreach ($filters2 as $filter) {
if ($keep) {
- $tag = $filter['tag'];
+ $tag = $filter['tag'];
$expr = $filter['expr'];
- $val = $filter['val'];
+ $val = $filter['val'];
if ($val == "''") {
$val = "";
}
$tags = explode(":", $tag);
- $t = end($tags);
- $v = get_gedcom_value($tag, 1, $grec);
+ $t = end($tags);
+ $v = get_gedcom_value($tag, 1, $grec);
//-- check for EMAIL and _EMAIL (silly double gedcom standard :P)
if ($t == "EMAIL" && empty($v)) {
- $tag = str_replace("EMAIL", "_EMAIL", $tag);
+ $tag = str_replace("EMAIL", "_EMAIL", $tag);
$tags = explode(":", $tag);
- $t = end($tags);
- $v = get_sub_record(1, $tag, $grec);
+ $t = end($tags);
+ $v = get_sub_record(1, $tag, $grec);
}
switch ($expr) {
@@ -2573,7 +2560,7 @@ function listStartHandler($attrs) {
if ($t == "DATE") {
$date1 = new Date($v);
$date2 = new Date($val);
- $keep = (Date::compare($date1, $date2) >= 0);
+ $keep = (Date::compare($date1, $date2) >= 0);
} elseif ($val >= $v) {
$keep = true;
}
@@ -2582,7 +2569,7 @@ function listStartHandler($attrs) {
if ($t == "DATE") {
$date1 = new Date($v);
$date2 = new Date($val);
- $keep = (Date::compare($date1, $date2) <= 0);
+ $keep = (Date::compare($date1, $date2) <= 0);
} elseif ($val >= $v) {
$keep = true;
}
@@ -2655,7 +2642,7 @@ function listEndHandler() {
}
$lineoffset++;
$reportxml = "<tempdoc>\n";
- $line_nr = $lineoffset + $repeatBytes;
+ $line_nr = $lineoffset + $repeatBytes;
// List Level counter
$count = 1;
while (0 < $count) {
@@ -2676,14 +2663,14 @@ function listEndHandler() {
array_push($parserStack, $parser);
$oldgedrec = $gedrec;
- $list_total = count($list);
+ $list_total = count($list);
$list_private = 0;
foreach ($list as $record) {
if ($record->canShow()) {
$gedrec = $record->privatizeGedcom(Auth::accessLevel($record->getTree()));
//-- start the sax parser
$repeat_parser = xml_parser_create();
- $parser = $repeat_parser;
+ $parser = $repeat_parser;
//-- make sure everything is case sensitive
xml_parser_set_option($repeat_parser, XML_OPTION_CASE_FOLDING, false);
//-- set the main element handler functions
@@ -2707,8 +2694,8 @@ function listEndHandler() {
$parser = array_pop($parserStack);
$gedrec = $oldgedrec;
}
- $temp = array_pop($repeatsStack);
- $repeats = $temp[0];
+ $temp = array_pop($repeatsStack);
+ $repeats = $temp[0];
$repeatBytes = $temp[1];
}
@@ -2780,7 +2767,7 @@ function relativesStartHandler($attrs) {
$id = trim($id);
}
- $list = array();
+ $list = array();
$person = Individual::getInstance($id, $WT_TREE);
if (!empty($person)) {
$list[$id] = $person;
@@ -2788,7 +2775,7 @@ function relativesStartHandler($attrs) {
case "child-family":
foreach ($person->getChildFamilies() as $family) {
$husband = $family->getHusband();
- $wife = $family->getWife();
+ $wife = $family->getWife();
if (!empty($husband)) {
$list[$husband->getXref()] = $husband;
}
@@ -2806,7 +2793,7 @@ function relativesStartHandler($attrs) {
case "spouse-family":
foreach ($person->getSpouseFamilies() as $family) {
$husband = $family->getHusband();
- $wife = $family->getWife();
+ $wife = $family->getWife();
if (!empty($husband)) {
$list[$husband->getXref()] = $husband;
}
@@ -2856,7 +2843,7 @@ function relativesStartHandler($attrs) {
foreach ($list as $key => $value) {
$generation = $value->generation;
if ($generation == $genCounter) {
- $newarray[$key] = new \stdClass;
+ $newarray[$key] = new \stdClass;
$newarray[$key]->generation = $generation;
}
}
@@ -2896,7 +2883,7 @@ function relativesEndHandler() {
}
$lineoffset++;
$reportxml = "<tempdoc>\n";
- $line_nr = $lineoffset + $repeatBytes;
+ $line_nr = $lineoffset + $repeatBytes;
// Relatives Level counter
$count = 1;
while (0 < $count) {
@@ -2917,17 +2904,17 @@ function relativesEndHandler() {
array_push($parserStack, $parser);
$oldgedrec = $gedrec;
- $list_total = count($list);
+ $list_total = count($list);
$list_private = 0;
foreach ($list as $key => $value) {
if (isset($value->generation)) {
$generation = $value->generation;
}
- $tmp = GedcomRecord::getInstance($key, $WT_TREE);
+ $tmp = GedcomRecord::getInstance($key, $WT_TREE);
$gedrec = $tmp->privatizeGedcom(Auth::accessLevel($WT_TREE));
//-- start the sax parser
$repeat_parser = xml_parser_create();
- $parser = $repeat_parser;
+ $parser = $repeat_parser;
//-- make sure everything is case sensitive
xml_parser_set_option($repeat_parser, XML_OPTION_CASE_FOLDING, false);
//-- set the main element handler functions
@@ -2945,8 +2932,8 @@ function relativesEndHandler() {
$parser = array_pop($parserStack);
$gedrec = $oldgedrec;
}
- $temp = array_pop($repeatsStack);
- $repeats = $temp[0];
+ $temp = array_pop($repeatsStack);
+ $repeats = $temp[0];
$repeatBytes = $temp[1];
}
@@ -2988,7 +2975,7 @@ function htmlStartHandler($tag, $attrs) {
return;
}
array_push($wt_reportStack, $wt_report);
- $wt_report = $ReportRoot->createHTML($tag, $attrs);
+ $wt_report = $ReportRoot->createHTML($tag, $attrs);
$currentElement = $wt_report;
array_push($printDataStack, $printData);
@@ -3004,9 +2991,9 @@ function htmlEndHandler($tag) {
return;
}
- $printData = array_pop($printDataStack);
+ $printData = array_pop($printDataStack);
$currentElement = $wt_report;
- $wt_report = array_pop($wt_reportStack);
+ $wt_report = array_pop($wt_reportStack);
if (!is_null($wt_report)) {
$wt_report->addElement($currentElement);
} else {
@@ -3050,7 +3037,7 @@ function descriptionEndHandler() {
* get gedcom tag value
*
* @param string $tag The tag to find, use : to delineate subtags
- * @param integer $level The gedcom line level of the first tag to find, setting level to 0 will cause it to use 1+ the level of the incoming record
+ * @param int $level The gedcom line level of the first tag to find, setting level to 0 will cause it to use 1+ the level of the incoming record
* @param string $gedrec The gedcom record to get the value from
*
* @return string the value of a gedcom tag from the given gedcom record
@@ -3061,16 +3048,16 @@ function get_gedcom_value($tag, $level, $gedrec) {
if (empty($gedrec)) {
return '';
}
- $tags = explode(':', $tag);
+ $tags = explode(':', $tag);
$origlevel = $level;
if ($level == 0) {
- $level = $gedrec{0} +1;
+ $level = $gedrec{0} + 1;
}
$subrec = $gedrec;
foreach ($tags as $t) {
$lastsubrec = $subrec;
- $subrec = get_sub_record($level, "$level $t", $subrec);
+ $subrec = get_sub_record($level, "$level $t", $subrec);
if (empty($subrec) && $origlevel == 0) {
$level--;
$subrec = get_sub_record($level, "$level $t", $lastsubrec);
@@ -3126,13 +3113,13 @@ function get_gedcom_value($tag, $level, $gedrec) {
/**
* @param string[] $list
* @param string $pid
- * @param boolean $children
- * @param integer $generations
+ * @param bool $children
+ * @param int $generations
*/
function add_ancestors(&$list, $pid, $children = false, $generations = -1) {
global $WT_TREE;
- $genlist = array($pid);
+ $genlist = array($pid);
$list[$pid]->generation = 1;
while (count($genlist) > 0) {
$id = array_shift($genlist);
@@ -3142,13 +3129,13 @@ function add_ancestors(&$list, $pid, $children = false, $generations = -1) {
$person = Individual::getInstance($id, $WT_TREE);
foreach ($person->getChildFamilies() as $family) {
$husband = $family->getHusband();
- $wife = $family->getWife();
+ $wife = $family->getWife();
if ($husband) {
- $list[$husband->getXref()] = $husband;
+ $list[$husband->getXref()] = $husband;
$list[$husband->getXref()]->generation = $list[$id]->generation + 1;
}
if ($wife) {
- $list[$wife->getXref()] = $wife;
+ $list[$wife->getXref()] = $wife;
$list[$wife->getXref()]->generation = $list[$id]->generation + 1;
}
if ($generations == -1 || $list[$id]->generation + 1 < $generations) {
@@ -3176,8 +3163,8 @@ function add_ancestors(&$list, $pid, $children = false, $generations = -1) {
/**
* @param string[] $list
* @param string $pid
- * @param boolean $parents
- * @param integer $generations
+ * @param bool $parents
+ * @param int $generations
*/
function add_descendancy(&$list, $pid, $parents = false, $generations = -1) {
global $WT_TREE;
@@ -3195,7 +3182,7 @@ function add_descendancy(&$list, $pid, $parents = false, $generations = -1) {
foreach ($person->getSpouseFamilies() as $family) {
if ($parents) {
$husband = $family->getHusband();
- $wife = $family->getWife();
+ $wife = $family->getWife();
if ($husband) {
$list[$husband->getXref()] = $husband;
if (isset($list[$pid]->generation)) {
diff --git a/app/Report/ReportBaseCell.php b/app/Report/ReportBaseCell.php
index 3cc3eceaa3..04349744b7 100644
--- a/app/Report/ReportBaseCell.php
+++ b/app/Report/ReportBaseCell.php
@@ -114,40 +114,40 @@ class ReportBaseCell extends ReportBaseElement {
/**
* CELL - Element
*
- * @param integer $width cell width (expressed in points)
- * @param integer $height cell height (expressed in points)
- * @param mixed $border Border style
- * @param string $align Text alignement
- * @param string $bgcolor Background color code
- * @param string $style The name of the text style
- * @param integer $ln Indicates where the current position should go after the call
- * @param mixed $top Y-position
- * @param mixed $left X-position
- * @param integer $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
- * @param integer $stretch Stretch carachter mode
- * @param string $bocolor Border color
- * @param string $tcolor Text color
- * @param $reseth
+ * @param int $width cell width (expressed in points)
+ * @param int $height cell height (expressed in points)
+ * @param mixed $border Border style
+ * @param string $align Text alignement
+ * @param string $bgcolor Background color code
+ * @param string $style The name of the text style
+ * @param int $ln Indicates where the current position should go after the call
+ * @param mixed $top Y-position
+ * @param mixed $left X-position
+ * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+ * @param int $stretch Stretch carachter mode
+ * @param string $bocolor Border color
+ * @param string $tcolor Text color
+ * @param $reseth
*/
public function __construct(
$width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth
) {
- $this->align = $align;
- $this->border = $border;
- $this->bgcolor = $bgcolor;
- $this->bocolor = $bocolor;
- $this->fill = $fill;
- $this->height = $height;
- $this->left = $left;
- $this->newline = $ln;
+ $this->align = $align;
+ $this->border = $border;
+ $this->bgcolor = $bgcolor;
+ $this->bocolor = $bocolor;
+ $this->fill = $fill;
+ $this->height = $height;
+ $this->left = $left;
+ $this->newline = $ln;
$this->styleName = $style;
- $this->text = "";
- $this->tcolor = $tcolor;
- $this->top = $top;
- $this->url = "";
- $this->stretch = $stretch;
- $this->width = $width;
- $this->reseth = $reseth;
+ $this->text = "";
+ $this->tcolor = $tcolor;
+ $this->top = $top;
+ $this->url = "";
+ $this->stretch = $stretch;
+ $this->width = $width;
+ $this->reseth = $reseth;
return 0;
}
@@ -168,7 +168,7 @@ class ReportBaseCell extends ReportBaseElement {
*
* @param string $url The URL address to save
*
- * @return integer
+ * @return int
*/
public function setUrl($url) {
$this->url = $url;
diff --git a/app/Report/ReportBaseElement.php b/app/Report/ReportBaseElement.php
index 1102257413..7a9fcf6d0f 100644
--- a/app/Report/ReportBaseElement.php
+++ b/app/Report/ReportBaseElement.php
@@ -29,8 +29,6 @@ class ReportBaseElement {
* Element renderer
*
* @param ReportHtml|ReportPdf $renderer
- *
- * @return void
*/
public function render($renderer) {
//-- to be implemented in inherited classes
@@ -57,7 +55,7 @@ class ReportBaseElement {
/**
* @param string $t
*
- * @return integer
+ * @return int
*/
public function addText($t) {
global $wt_report, $reportTitle, $reportDescription;
@@ -79,7 +77,7 @@ class ReportBaseElement {
}
/**
- * @return integer
+ * @return int
*/
public function addNewline() {
$this->text .= "\n";
@@ -98,7 +96,7 @@ class ReportBaseElement {
* @param $wrapwidth
* @param $cellwidth
*
- * @return integer
+ * @return int
*/
public function setWrapWidth($wrapwidth, $cellwidth) {
return 0;
@@ -106,8 +104,6 @@ class ReportBaseElement {
/**
* @param $renderer
- *
- * @return void
*/
public function renderFootnote($renderer) {
// To be implemented in inherited classes
@@ -115,8 +111,6 @@ class ReportBaseElement {
/**
* @param $text
- *
- * @return void
*/
public function setText($text) {
$this->text = $text;
diff --git a/app/Report/ReportBaseFootnote.php b/app/Report/ReportBaseFootnote.php
index 1a6055b962..7014d0ce72 100644
--- a/app/Report/ReportBaseFootnote.php
+++ b/app/Report/ReportBaseFootnote.php
@@ -74,7 +74,7 @@ class ReportBaseFootnote extends ReportBaseElement {
/**
* @param $t
*
- * @return integer
+ * @return int
*/
public function addText($t) {
$t = trim($t, "\r\n\t");
@@ -106,10 +106,10 @@ class ReportBaseFootnote extends ReportBaseElement {
/**
* @param $n
*
- * @return integer
+ * @return int
*/
public function setNum($n) {
- $this->num = $n;
+ $this->num = $n;
$this->numText = "$n ";
return 0;
@@ -118,7 +118,7 @@ class ReportBaseFootnote extends ReportBaseElement {
/**
* @param $a
*
- * @return integer
+ * @return int
*/
public function setAddlink($a) {
$this->addlink = $a;
diff --git a/app/Report/ReportBaseHtml.php b/app/Report/ReportBaseHtml.php
index 02d6e50f22..8752180d45 100644
--- a/app/Report/ReportBaseHtml.php
+++ b/app/Report/ReportBaseHtml.php
@@ -29,7 +29,7 @@ class ReportBaseHtml extends ReportBaseElement {
* @param $attrs
*/
public function __construct($tag, $attrs) {
- $this->tag = $tag;
+ $this->tag = $tag;
$this->attrs = $attrs;
return 0;
@@ -58,7 +58,7 @@ class ReportBaseHtml extends ReportBaseElement {
/**
* @param $element
*
- * @return integer
+ * @return int
*/
public function addElement($element) {
$this->elements[] = $element;
diff --git a/app/Report/ReportBaseImage.php b/app/Report/ReportBaseImage.php
index dd457e41f2..434f263b8e 100644
--- a/app/Report/ReportBaseImage.php
+++ b/app/Report/ReportBaseImage.php
@@ -75,13 +75,13 @@ class ReportBaseImage extends ReportBaseElement {
* @param string $ln T:same line, N:next line
*/
public function __construct($file, $x, $y, $w, $h, $align, $ln) {
- $this->file = $file;
- $this->width = $w;
+ $this->file = $file;
+ $this->width = $w;
$this->height = $h;
- $this->x = $x;
- $this->y = $y;
- $this->align = $align;
- $this->line = $ln;
+ $this->x = $x;
+ $this->y = $y;
+ $this->align = $align;
+ $this->line = $ln;
return 0;
}
diff --git a/app/Report/ReportBasePageheader.php b/app/Report/ReportBasePageheader.php
index a1f482d893..17b6c43488 100644
--- a/app/Report/ReportBasePageheader.php
+++ b/app/Report/ReportBasePageheader.php
@@ -32,7 +32,7 @@ class ReportBasePageheader extends ReportBaseElement {
}
/**
- * @return integer
+ * @return int
*/
public function textBox() {
$this->elements = array();
@@ -45,7 +45,7 @@ class ReportBasePageheader extends ReportBaseElement {
*
* @param $element
*
- * @return integer
+ * @return int
*/
public function addElement($element) {
$this->elements[] = $element;
diff --git a/app/Report/ReportBaseText.php b/app/Report/ReportBaseText.php
index 4f7bfa4214..ad1cb50c42 100644
--- a/app/Report/ReportBaseText.php
+++ b/app/Report/ReportBaseText.php
@@ -35,13 +35,13 @@ class ReportBaseText extends ReportBaseElement {
/**
* Remaining width of a cel
*
- * @var integer User unit (points)
+ * @var int User unit (points)
*/
public $wrapWidthRemaining;
/**
* Original width of a cell
*
- * @var integer User unit (points)
+ * @var int User unit (points)
*/
public $wrapWidthCell;
@@ -52,10 +52,10 @@ class ReportBaseText extends ReportBaseElement {
* @param string $color HTML color code
*/
public function __construct($style, $color) {
- $this->text = '';
- $this->color = $color;
+ $this->text = '';
+ $this->color = $color;
$this->wrapWidthRemaining = 0;
- $this->styleName = $style;
+ $this->styleName = $style;
return 0;
}
diff --git a/app/Report/ReportBaseTextbox.php b/app/Report/ReportBaseTextbox.php
index 6d84743b58..2bdc52f937 100644
--- a/app/Report/ReportBaseTextbox.php
+++ b/app/Report/ReportBaseTextbox.php
@@ -36,7 +36,7 @@ class ReportBaseTextbox extends ReportBaseElement {
/**
* Whether or not paint the background
*
- * @var boolean
+ * @var bool
*/
public $fill;
@@ -55,19 +55,19 @@ class ReportBaseTextbox extends ReportBaseElement {
/**
* After this box is finished rendering, should the next section of text start immediately after the this box or should it start on a new line under this box. 0 = no new line, 1 = force new line. Default is 0
*
- * @var boolean
+ * @var bool
*/
public $newline;
/**
- * @var boolean
+ * @var bool
*/
public $pagecheck;
/**
* Whether or not a border should be printed around this box. 0 = no border, 1 = border. Default is 0
*
- * @var boolean
+ * @var bool
*/
public $border;
/**
@@ -86,7 +86,7 @@ class ReportBaseTextbox extends ReportBaseElement {
public $style;
/**
- * @var array $borderstyle Border style of rectangle. Array with keys among the following:
+ * @var array Border style of rectangle. Array with keys among the following:
* <ul>
* <li>all: Line style of all borders. Array like for {@link SetLineStyle SetLineStyle}.</li>
* <li>L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for {@link SetLineStyle SetLineStyle}.</li>
@@ -110,7 +110,7 @@ class ReportBaseTextbox extends ReportBaseElement {
/**
* Use cell padding or not
*
- * @var boolean $padding
+ * @var bool
*/
public $padding;
/**
@@ -121,34 +121,34 @@ class ReportBaseTextbox extends ReportBaseElement {
/**
* TextBox - Element - Base
*
- * @param float $width Text box width
- * @param float $height Text box height
- * @param boolean $border
- * @param string $bgcolor Background color code in HTML
- * @param boolean $newline
- * @param mixed $left
- * @param mixed $top
- * @param boolean $pagecheck
- * @param string $style
- * @param boolean $fill
- * @param boolean $padding
- * @param boolean $reseth
+ * @param float $width Text box width
+ * @param float $height Text box height
+ * @param bool $border
+ * @param string $bgcolor Background color code in HTML
+ * @param bool $newline
+ * @param mixed $left
+ * @param mixed $top
+ * @param bool $pagecheck
+ * @param string $style
+ * @param bool $fill
+ * @param bool $padding
+ * @param bool $reseth
*/
public function __construct(
$width, $height, $border, $bgcolor, $newline, $left, $top, $pagecheck, $style, $fill, $padding, $reseth
) {
- $this->border = $border;
- $this->bgcolor = $bgcolor;
- $this->fill = $fill;
- $this->height = $height;
- $this->left = $left;
- $this->newline = $newline;
+ $this->border = $border;
+ $this->bgcolor = $bgcolor;
+ $this->fill = $fill;
+ $this->height = $height;
+ $this->left = $left;
+ $this->newline = $newline;
$this->pagecheck = $pagecheck;
- $this->style = $style;
- $this->top = $top;
- $this->width = $width;
- $this->padding = $padding;
- $this->reseth = $reseth;
+ $this->style = $style;
+ $this->top = $top;
+ $this->width = $width;
+ $this->padding = $padding;
+ $this->reseth = $reseth;
return 0;
}
@@ -158,7 +158,7 @@ class ReportBaseTextbox extends ReportBaseElement {
*
* @param object|string $element
*
- * @return integer
+ * @return int
*/
public function addElement($element) {
$this->elements[] = $element;
diff --git a/app/Report/ReportHtml.php b/app/Report/ReportHtml.php
index 987ab7cc41..08badcde63 100644
--- a/app/Report/ReportHtml.php
+++ b/app/Report/ReportHtml.php
@@ -135,7 +135,7 @@ class ReportHtml extends ReportBase {
// Setting up the correct dimensions if Portrait (default) or Landscape
if ($this->orientation == "landscape") {
- $tmpw = $this->pagew;
+ $tmpw = $this->pagew;
$this->pagew = $this->pageh;
$this->pageh = $tmpw;
}
@@ -143,7 +143,7 @@ class ReportHtml extends ReportBase {
$this->noMarginWidth = (int) ($this->pagew - $this->leftmargin - $this->rightmargin);
// If RTL
if ($this->rtl) {
- $this->alignRTL = "right";
+ $this->alignRTL = "right";
$this->entityRTL = "&rlm;";
}
// Change the default HTML font name
@@ -252,7 +252,7 @@ class ReportHtml extends ReportBase {
echo '</div>';
echo '<script>document.getElementById("headerdiv").style.height="', $this->topmargin - $this->headermargin - 6, 'pt";</script>';
echo '<div id="bodydiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt; height: 100%;">';
- $this->Y = 0;
+ $this->Y = 0;
$this->maxY = 0;
$this->runPageHeader();
foreach ($this->bodyElements as $element) {
@@ -269,8 +269,8 @@ class ReportHtml extends ReportBase {
echo '<script>document.getElementById("bodydiv").style.height="', $this->maxY, 'pt";</script>';
echo '<div id="bottommargin" style="position: relative; top: auto; height: ', $this->bottommargin - $this->footermargin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
echo '<div id="footerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;height:auto;">';
- $this->Y = 0;
- $this->X = 0;
+ $this->Y = 0;
+ $this->X = 0;
$this->maxY = 0;
foreach ($this->footerElements as $element) {
if (is_object($element)) {
@@ -289,20 +289,20 @@ class ReportHtml extends ReportBase {
/**
* Create a new Cell object - ReportHtml
*
- * @param integer $width cell width (expressed in points)
- * @param integer $height cell height (expressed in points)
- * @param mixed $border Border style
- * @param string $align Text alignement
- * @param string $bgcolor Background color code
- * @param string $style The name of the text style
- * @param integer $ln Indicates where the current position should go after the call
- * @param mixed $top Y-position
- * @param mixed $left X-position
- * @param integer $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
- * @param integer $stretch Stretch carachter mode
- * @param string $bocolor Border color
- * @param string $tcolor Text color
- * @param boolean $reseth
+ * @param int $width cell width (expressed in points)
+ * @param int $height cell height (expressed in points)
+ * @param mixed $border Border style
+ * @param string $align Text alignement
+ * @param string $bgcolor Background color code
+ * @param string $style The name of the text style
+ * @param int $ln Indicates where the current position should go after the call
+ * @param mixed $top Y-position
+ * @param mixed $left X-position
+ * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
+ * @param int $stretch Stretch carachter mode
+ * @param string $bocolor Border color
+ * @param string $tcolor Text color
+ * @param bool $reseth
*
* @return object ReportHtmlCell
*/
@@ -450,10 +450,11 @@ class ReportHtml extends ReportBase {
/**
* @param $element
*
- * @return integer
+ * @return int
*/
public function addPageHeader($element) {
$this->pageHeaderElements[] = $element;
+
return count($this->headerElements) - 1;
}
@@ -462,17 +463,18 @@ class ReportHtml extends ReportBase {
*
* @param object $footnote
*
- * @return boolean false if not numbered before | object if already numbered
+ * @return bool false if not numbered before | object if already numbered
*/
public function checkFootnote($footnote) {
- $ct = count($this->printedfootnotes);
- $i = 0;
+ $ct = count($this->printedfootnotes);
+ $i = 0;
$val = $footnote->getValue();
while ($i < $ct) {
if ($this->printedfootnotes[$i]->getValue() == $val) {
// If this footnote already exist then set up the numbers for this object
$footnote->setNum($i + 1);
$footnote->setAddlink($i + 1);
+
return $this->printedfootnotes[$i];
}
$i++;
@@ -481,6 +483,7 @@ class ReportHtml extends ReportBase {
$footnote->setNum($ct + 1);
$footnote->setAddlink($ct + 1);
$this->printedfootnotes[] = $footnote;
+
return false;
}
@@ -496,12 +499,13 @@ class ReportHtml extends ReportBase {
*
* @param string $str
*
- * @return integer Number of lines. 0 if empty line
+ * @return int Number of lines. 0 if empty line
*/
public function countLines($str) {
if ($str == "") {
return 0;
}
+
return (substr_count($str, "\n") + 1);
}
@@ -513,26 +517,28 @@ class ReportHtml extends ReportBase {
}
/**
- * @return integer
+ * @return int
*/
public function getCurrentStyleHeight() {
if (empty($this->currentStyle)) {
return $this->defaultFontSize;
}
$style = $this->getStyle($this->currentStyle);
+
return $style["size"];
}
/**
* @param $cellWidth
*
- * @return integer
+ * @return int
*/
public function getFootnotesHeight($cellWidth) {
$h = 0;
foreach ($this->printedfootnotes as $element) {
$h += $element->getFootnoteHeight($this, $cellWidth);
}
+
return $h;
}
@@ -555,10 +561,11 @@ class ReportHtml extends ReportBase {
/**
* @param $text
*
- * @return integer
+ * @return int
*/
public function getStringWidth($text) {
$style = $this->getStyle($this->currentStyle);
+
return mb_strlen($text) * ($style['size'] / 2);
}
@@ -567,7 +574,7 @@ class ReportHtml extends ReportBase {
*
* @param $str
*
- * @return integer
+ * @return int
*/
public function getTextCellHeight($str) {
// Count the number of lines to calculate the height
@@ -597,7 +604,7 @@ class ReportHtml extends ReportBase {
/**
* Get the current page number - ReportHtml
*
- * @return integer
+ * @return int
*/
public function pageNo() {
return $this->pageN;
@@ -649,8 +656,8 @@ class ReportHtml extends ReportBase {
/**
* Wrap text - ReportHtml
*
- * @param string $str Text to wrap
- * @param integer $width Width in points the text has to fit into
+ * @param string $str Text to wrap
+ * @param int $width Width in points the text has to fit into
*
* @return string
*/
@@ -660,7 +667,7 @@ class ReportHtml extends ReportBase {
// Wordwrap each line
$lines = explode("\n", $str);
// Line Feed counter
- $lfct = count($lines);
+ $lfct = count($lines);
$wraptext = '';
foreach ($lines as $line) {
$wtext = utf8_wordwrap($line, $lw, "\n", true);
@@ -671,18 +678,19 @@ class ReportHtml extends ReportBase {
}
$lfct--;
}
+
return $wraptext;
}
/**
* Write text - ReportHtml
*
- * @param string $text Text to print
- * @param string $color HTML RGB color code (Ex: #001122)
- * @param boolean $useclass
+ * @param string $text Text to print
+ * @param string $color HTML RGB color code (Ex: #001122)
+ * @param bool $useclass
*/
public function write($text, $color = '', $useclass = true) {
- $style = $this->getStyle($this->getCurrentStyle());
+ $style = $this->getStyle($this->getCurrentStyle());
$htmlcode = '<span dir="' . I18N::direction() . '"';
if ($useclass) {
$htmlcode .= ' class="' . $style['name'] . '"';
diff --git a/app/Report/ReportHtmlCell.php b/app/Report/ReportHtmlCell.php
index f0acc03e45..9383f4a080 100644
--- a/app/Report/ReportHtmlCell.php
+++ b/app/Report/ReportHtmlCell.php
@@ -24,8 +24,6 @@ class ReportHtmlCell extends ReportBaseCell {
* HTML Cell renderer
*
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
if (strpos($this->text, "{{:ptp:}}") !== false) {
@@ -135,7 +133,7 @@ class ReportHtmlCell extends ReportBaseCell {
if (!empty($temptext)) {
// Wrap the text
$temptext = $renderer->textWrap($temptext, $cW);
- $tmph = $renderer->getTextCellHeight($temptext);
+ $tmph = $renderer->getTextCellHeight($temptext);
// Add some cell padding
$this->height += $cP;
if ($tmph > $this->height) {
diff --git a/app/Report/ReportHtmlFootnote.php b/app/Report/ReportHtmlFootnote.php
index cdc565ec13..e8a2e45af3 100644
--- a/app/Report/ReportHtmlFootnote.php
+++ b/app/Report/ReportHtmlFootnote.php
@@ -24,8 +24,6 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
* HTML Footnotes number renderer
*
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
$renderer->setCurrentStyle("footnotenum");
@@ -39,8 +37,6 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
* Uses style name "footnote" by default
*
* @param ReportHtml $html
- *
- * @return void
*/
public function renderFootnote($html) {
@@ -62,9 +58,9 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
* Calculates the Footnotes height
*
* @param ReportHtml $html
- * @param integer $cellWidth The width of the cell to use it for text wraping
+ * @param int $cellWidth The width of the cell to use it for text wraping
*
- * @return integer Footnote height in points
+ * @return int Footnote height in points
*/
public function getFootnoteHeight($html, $cellWidth = 0) {
if ($html->getCurrentStyle() != $this->styleName) {
@@ -75,8 +71,9 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
$this->text = $html->textWrap($this->text, $cellWidth);
}
$this->text = $this->text . "\n\n";
- $ct = substr_count($this->text, "\n");
- $fsize = $html->getCurrentStyleHeight();
+ $ct = substr_count($this->text, "\n");
+ $fsize = $html->getCurrentStyleHeight();
+
return ($fsize * $ct) * $html->cellHeightRatio;
}
@@ -111,18 +108,18 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
if ($this->wrapWidthRemaining > 0) {
// Check with line counter too!
if (($lw >= $this->wrapWidthRemaining) or ($lfct > 1)) {
- $newtext = "";
+ $newtext = "";
$wrapWidthRemaining = $this->wrapWidthRemaining;
- $lines = explode("\n", $this->numText);
+ $lines = explode("\n", $this->numText);
// Go throught the text line by line
foreach ($lines as $line) {
// Line width in points + a little margin
$lw = $html->GetStringWidth($line);
// If the line has to be wraped
if ($lw > $wrapWidthRemaining) {
- $words = explode(" ", $line);
+ $words = explode(" ", $line);
$addspace = count($words);
- $lw = 0;
+ $lw = 0;
foreach ($words as $word) {
$addspace--;
$lw += $html->GetStringWidth($word . " ");
@@ -156,15 +153,17 @@ class ReportHtmlFootnote extends ReportBaseFootnote {
$lfct--;
}
$this->numText = $newtext;
- $lfct = substr_count($this->numText, "\n");
+ $lfct = substr_count($this->numText, "\n");
+
return array($lw, 1, $lfct);
}
}
- $l = 0;
+ $l = 0;
$lfct = substr_count($this->numText, "\n");
if ($lfct > 0) {
$l = 2;
}
+
return array($lw, $l, $lfct);
}
}
diff --git a/app/Report/ReportHtmlHtml.php b/app/Report/ReportHtmlHtml.php
index ff6546b47a..4140aae11e 100644
--- a/app/Report/ReportHtmlHtml.php
+++ b/app/Report/ReportHtmlHtml.php
@@ -22,8 +22,8 @@ namespace Fisharebest\Webtrees;
class ReportHtmlHtml extends ReportBaseHtml {
/**
* @param ReportHtml $renderer
- * @param boolean $sub
- * @param boolean $inat
+ * @param bool $sub
+ * @param bool $inat
*
* @return string
*/
@@ -53,7 +53,7 @@ class ReportHtmlHtml extends ReportBaseHtml {
if ($inat) {
$startX = $renderer->GetX();
$startY = $renderer->GetY();
- $width = $renderer->getRemainingWidth();
+ $width = $renderer->getRemainingWidth();
echo "<div style=\"position: absolute;top: ", $startY, "pt;", $renderer->alignRTL, ": ", $startX, "pt;width: ", $width, "pt;\">";
$startY += $renderer->getCurrentStyleHeight() + 2;
$renderer->SetY($startY);
diff --git a/app/Report/ReportHtmlImage.php b/app/Report/ReportHtmlImage.php
index e8ad0bc8e5..df35b06a3f 100644
--- a/app/Report/ReportHtmlImage.php
+++ b/app/Report/ReportHtmlImage.php
@@ -24,8 +24,6 @@ class ReportHtmlImage extends ReportBaseImage {
* Image renderer
*
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
@@ -62,9 +60,9 @@ class ReportHtmlImage extends ReportBaseImage {
echo "<img src=\"", $this->file, "\" style=\"position:absolute;", $renderer->alignRTL, ":", $this->x, "pt;top:", $this->y, "pt;width:", $this->width, "pt;height:", $this->height, "pt;\" alt=\"\">\n";
}
- $lastpicpage = $renderer->pageNo();
- $lastpicleft = $this->x;
- $lastpicright = $this->x + $this->width;
+ $lastpicpage = $renderer->pageNo();
+ $lastpicleft = $this->x;
+ $lastpicright = $this->x + $this->width;
$lastpicbottom = $this->y + $this->height;
// Setup for the next line
if ($this->line == "N") {
diff --git a/app/Report/ReportHtmlLine.php b/app/Report/ReportHtmlLine.php
index 16d4d1a7e5..7785b69d19 100644
--- a/app/Report/ReportHtmlLine.php
+++ b/app/Report/ReportHtmlLine.php
@@ -24,8 +24,6 @@ class ReportHtmlLine extends ReportBaseLine {
* HTML line renderer
*
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
if ($this->x1 == '.') {
diff --git a/app/Report/ReportHtmlPageheader.php b/app/Report/ReportHtmlPageheader.php
index cbdd4aece9..5348f0358e 100644
--- a/app/Report/ReportHtmlPageheader.php
+++ b/app/Report/ReportHtmlPageheader.php
@@ -22,8 +22,6 @@ namespace Fisharebest\Webtrees;
class ReportHtmlPageheader extends ReportBasePageheader {
/**
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
$renderer->clearPageHeader();
diff --git a/app/Report/ReportHtmlText.php b/app/Report/ReportHtmlText.php
index 18a42091cb..eb92c669dd 100644
--- a/app/Report/ReportHtmlText.php
+++ b/app/Report/ReportHtmlText.php
@@ -22,10 +22,8 @@ namespace Fisharebest\Webtrees;
class ReportHtmlText extends ReportBaseText {
/**
* @param ReportHtml $renderer
- * @param integer $curx
- * @param boolean $attrib Is is called from a different element?
- *
- * @return void
+ * @param int $curx
+ * @param bool $attrib Is is called from a different element?
*/
public function render($renderer, $curx = 0, $attrib = true) {
@@ -46,7 +44,7 @@ class ReportHtmlText extends ReportBaseText {
// Save the start positions
$startX = $renderer->getX();
$startY = $renderer->getY();
- $width = $renderer->getRemainingWidth();
+ $width = $renderer->getRemainingWidth();
// If text is wider then page width then wrap it
if ($renderer->GetStringWidth($temptext) > $width) {
$lines = explode("\n", $temptext);
@@ -85,6 +83,7 @@ class ReportHtmlText extends ReportBaseText {
$ct += 1;
}
$style = $html->getStyle($this->styleName);
+
return ($style["size"] * $ct) * $html->cellHeightRatio;
}
@@ -115,18 +114,18 @@ class ReportHtmlText extends ReportBaseText {
if ($this->wrapWidthRemaining > 0) {
// Check with line counter too!
if (($lw >= $this->wrapWidthRemaining) or ($lfct > 1)) {
- $newtext = "";
+ $newtext = "";
$wrapWidthRemaining = $this->wrapWidthRemaining;
- $lines = explode("\n", $this->text);
+ $lines = explode("\n", $this->text);
// Go throught the text line by line
foreach ($lines as $line) {
// Line width in points + a little margin
$lw = $html->GetStringWidth($line);
// If the line has to be wraped
if ($lw > $wrapWidthRemaining) {
- $words = explode(" ", $line);
+ $words = explode(" ", $line);
$addspace = count($words);
- $lw = 0;
+ $lw = 0;
foreach ($words as $word) {
$addspace--;
$lw += $html->GetStringWidth($word . " ");
@@ -160,15 +159,17 @@ class ReportHtmlText extends ReportBaseText {
$lfct--;
}
$this->text = $newtext;
- $lfct = substr_count($this->text, "\n");
+ $lfct = substr_count($this->text, "\n");
+
return array($lw, 1, $lfct);
}
}
- $l = 0;
+ $l = 0;
$lfct = substr_count($this->text, "\n");
if ($lfct > 0) {
$l = 2;
}
+
return array($lw, $l, $lfct);
}
}
diff --git a/app/Report/ReportHtmlTextbox.php b/app/Report/ReportHtmlTextbox.php
index a379631c3a..e86d39ad77 100644
--- a/app/Report/ReportHtmlTextbox.php
+++ b/app/Report/ReportHtmlTextbox.php
@@ -22,13 +22,11 @@ namespace Fisharebest\Webtrees;
class ReportHtmlTextbox extends ReportBaseTextbox {
/**
* @param ReportHtml $renderer
- *
- * @return void
*/
public function render($renderer) {
// checkFootnote
- $newelements = array();
- $lastelement = array();
+ $newelements = array();
+ $lastelement = array();
$footnote_element = array();
// Element counter
$cE = count($this->elements);
@@ -52,7 +50,7 @@ class ReportHtmlTextbox extends ReportBaseTextbox {
$lastelement->addText(str_replace("\n", "<br>", $element->getValue()));
} elseif (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = $element;
+ $lastelement = $element;
}
}
} // Collect the Footnote links
@@ -62,7 +60,7 @@ class ReportHtmlTextbox extends ReportBaseTextbox {
// Save first the last element if any
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
// Save the Footnote with it’s link number as key for sorting later
$footnote_element[$element->num] = $element;
@@ -77,14 +75,14 @@ class ReportHtmlTextbox extends ReportBaseTextbox {
}
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
$newelements[] = $element;
}
} else {
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
if (!empty($footnote_element)) {
ksort($footnote_element);
@@ -146,7 +144,7 @@ class ReportHtmlTextbox extends ReportBaseTextbox {
$eH = 0;
// Footnote height (in points)
$fH = 0;
- $w = 0;
+ $w = 0;
//-- $lw is an array
// 0 => last line width
// 1 => 1 if text was wrapped, 0 if text did not wrap
diff --git a/app/Report/ReportPdf.php b/app/Report/ReportPdf.php
index d85cde54b3..25415bed49 100644
--- a/app/Report/ReportPdf.php
+++ b/app/Report/ReportPdf.php
@@ -23,26 +23,26 @@ class ReportPdf extends ReportBase {
/**
* PDF compression - Zlib extension is required
*
- * @var boolean const
+ * @var bool const
*/
const COMPRESSION = true;
/**
* If true reduce the RAM memory usage by caching temporary data on filesystem (slower).
*
- * @var boolean const
+ * @var bool const
*/
const DISK_CACHE = false;
/**
* true means that the input text is unicode (PDF)
*
- * @var boolean const
+ * @var bool const
*/
const UNICODE = true;
/**
* false means that the full font is embedded, true means only the used chars
* in TCPDF v5.9 font subsetting is a very slow process, this leads to larger files
*
- * @var boolean const
+ * @var bool const
*/
const SUBSETTING = false;
/**
@@ -61,7 +61,7 @@ class ReportPdf extends ReportBase {
// Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
$this->pdf = new ReportTcpdf($this->orientation, parent::UNITS, array(
$this->pagew,
- $this->pageh
+ $this->pageh,
), self::UNICODE, "UTF-8", self::DISK_CACHE);
// Setup the PDF margins
@@ -105,7 +105,7 @@ class ReportPdf extends ReportBase {
*
* @param object|string $element Object or string
*
- * @return integer
+ * @return int
*/
public function addElement($element) {
if ($this->processing == "B") {
@@ -147,20 +147,20 @@ class ReportPdf extends ReportBase {
/**
* Create a new Cell object - ReportPdf
*
- * @param integer $width cell width (expressed in points)
- * @param integer $height cell height (expressed in points)
- * @param mixed $border Border style
- * @param string $align Text alignement
- * @param string $bgcolor Background color code
- * @param string $style The name of the text style
- * @param integer $ln Indicates where the current position should go after the call
- * @param mixed $top Y-position
- * @param mixed $left X-position
- * @param integer $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 1
- * @param integer $stretch Stretch carachter mode
- * @param string $bocolor Border color
- * @param string $tcolor Text color
- * @param boolean $reseth
+ * @param int $width cell width (expressed in points)
+ * @param int $height cell height (expressed in points)
+ * @param mixed $border Border style
+ * @param string $align Text alignement
+ * @param string $bgcolor Background color code
+ * @param string $style The name of the text style
+ * @param int $ln Indicates where the current position should go after the call
+ * @param mixed $top Y-position
+ * @param mixed $left X-position
+ * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 1
+ * @param int $stretch Stretch carachter mode
+ * @param string $bocolor Border color
+ * @param string $tcolor Text color
+ * @param bool $reseth
*
* @return ReportPdfCell
*/
@@ -173,18 +173,18 @@ class ReportPdf extends ReportBase {
/**
* Create a new TextBox object - ReportPdf
*
- * @param float $width Text box width
- * @param float $height Text box height
- * @param boolean $border
- * @param string $bgcolor Background color code in HTML
- * @param boolean $newline
- * @param mixed $left
- * @param mixed $top
- * @param boolean $pagecheck
- * @param string $style
- * @param boolean $fill
- * @param boolean $padding
- * @param boolean $reseth
+ * @param float $width Text box width
+ * @param float $height Text box height
+ * @param bool $border
+ * @param string $bgcolor Background color code in HTML
+ * @param bool $newline
+ * @param mixed $left
+ * @param mixed $top
+ * @param bool $pagecheck
+ * @param string $style
+ * @param bool $fill
+ * @param bool $padding
+ * @param bool $reseth
*
* @return ReportPdfTextbox
*/
@@ -232,8 +232,8 @@ class ReportPdf extends ReportBase {
* @param string $file Filename
* @param mixed $x
* @param mixed $y
- * @param integer $w Image width
- * @param integer $h Image height
+ * @param int $w Image width
+ * @param int $h Image height
* @param string $align L:left, C:center, R:right or empty to use x/y
* @param string $ln T:same line, N:next line
*
@@ -246,13 +246,13 @@ class ReportPdf extends ReportBase {
/**
* Create a new image object from Media Object - ReportPdf
*
- * @param Media $mediaobject
- * @param mixed $x
- * @param mixed $y
- * @param integer $w Image width
- * @param integer $h Image height
- * @param string $align L:left, C:center, R:right or empty to use x/y
- * @param string $ln T:same line, N:next line
+ * @param Media $mediaobject
+ * @param mixed $x
+ * @param mixed $y
+ * @param int $w Image width
+ * @param int $h Image height
+ * @param string $align L:left, C:center, R:right or empty to use x/y
+ * @param string $ln T:same line, N:next line
*
* @return ReportPdfImage
*/
diff --git a/app/Report/ReportPdfCell.php b/app/Report/ReportPdfCell.php
index 669d03a5f9..25d208adae 100644
--- a/app/Report/ReportPdfCell.php
+++ b/app/Report/ReportPdfCell.php
@@ -24,8 +24,6 @@ class ReportPdfCell extends ReportBaseCell {
* PDF Cell renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
@@ -36,7 +34,7 @@ class ReportPdfCell extends ReportBaseCell {
$temptext = str_replace("#PAGENUM#", $renderer->PageNo(), $this->text);
// underline «title» part of Source item
$temptext = str_replace(array('«', '»'), array('<u>', '</u>'), $temptext);
- $match = array();
+ $match = array();
// Indicates if the cell background must be painted (1) or transparent (0)
if ($this->fill == 1) {
if (!empty($this->bgcolor)) {
@@ -99,7 +97,7 @@ class ReportPdfCell extends ReportBaseCell {
if (!empty($temptext)) {
$cHT = $renderer->getNumLines($temptext, $this->width);
$cHT = $cHT * $renderer->getCellHeightRatio() * $renderer->getCurrentStyleHeight();
- $cM = $renderer->getMargins();
+ $cM = $renderer->getMargins();
// Add padding
if (is_array($cM['cell'])) {
$cHT += ($cM['padding_bottom'] + $cM['padding_top']);
diff --git a/app/Report/ReportPdfFootnote.php b/app/Report/ReportPdfFootnote.php
index a79412b21f..0d84a4c80c 100644
--- a/app/Report/ReportPdfFootnote.php
+++ b/app/Report/ReportPdfFootnote.php
@@ -24,8 +24,6 @@ class ReportPdfFootnote extends ReportBaseFootnote {
* PDF Footnotes number renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
$renderer->setCurrentStyle("footnotenum");
@@ -37,8 +35,6 @@ class ReportPdfFootnote extends ReportBaseFootnote {
* Uses style name "footnote" by default
*
* @param PDF $pdf
- *
- * @return void
*/
public function renderFootnote($pdf) {
if ($pdf->getCurrentStyle() != $this->styleName) {
@@ -104,16 +100,16 @@ class ReportPdfFootnote extends ReportBaseFootnote {
$wrapWidthRemaining = (int) ($this->wrapWidthRemaining);
if (($lw >= $wrapWidthRemaining) or ($lfct > 1)) {
$newtext = "";
- $lines = explode("\n", $this->numText);
+ $lines = explode("\n", $this->numText);
// Go throught the text line by line
foreach ($lines as $line) {
// Line width in points
$lw = ceil($pdf->GetStringWidth($line));
// If the line has to be wraped
if ($lw >= $wrapWidthRemaining) {
- $words = explode(" ", $line);
+ $words = explode(" ", $line);
$addspace = count($words);
- $lw = 0;
+ $lw = 0;
foreach ($words as $word) {
$addspace--;
$lw += ceil($pdf->GetStringWidth($word . " "));
@@ -147,12 +143,12 @@ class ReportPdfFootnote extends ReportBaseFootnote {
$lfct--;
}
$this->numText = $newtext;
- $lfct = substr_count($this->numText, "\n");
+ $lfct = substr_count($this->numText, "\n");
return array($lw, 1, $lfct);
}
}
- $l = 0;
+ $l = 0;
$lfct = substr_count($this->numText, "\n");
if ($lfct > 0) {
$l = 2;
diff --git a/app/Report/ReportPdfHtml.php b/app/Report/ReportPdfHtml.php
index fced9b1a75..6cbdda06d1 100644
--- a/app/Report/ReportPdfHtml.php
+++ b/app/Report/ReportPdfHtml.php
@@ -21,10 +21,10 @@ namespace Fisharebest\Webtrees;
*/
class ReportPdfHtml extends ReportBaseHtml {
/**
- * @param $renderer
- * @param boolean $sub
+ * @param $renderer
+ * @param bool $sub
*
- * @return integer|string
+ * @return int|string
*/
public function render($renderer, $sub = false) {
if (!empty($this->attrs['style'])) {
diff --git a/app/Report/ReportPdfImage.php b/app/Report/ReportPdfImage.php
index 37e9ef7e37..d43ce57066 100644
--- a/app/Report/ReportPdfImage.php
+++ b/app/Report/ReportPdfImage.php
@@ -24,8 +24,6 @@ class ReportPdfImage extends ReportBaseImage {
* PDF image renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
@@ -85,11 +83,11 @@ class ReportPdfImage extends ReportBaseImage {
$this->align
);
}
- $lastpicpage = $renderer->PageNo();
+ $lastpicpage = $renderer->PageNo();
$renderer->lastpicpage = $renderer->getPage();
- $lastpicleft = $this->x;
- $lastpicright = $this->x + $this->width;
- $lastpicbottom = $this->y + $this->height;
+ $lastpicleft = $this->x;
+ $lastpicright = $this->x + $this->width;
+ $lastpicbottom = $this->y + $this->height;
// Setup for the next line
if ($this->line == "N") {
$renderer->SetY($lastpicbottom);
diff --git a/app/Report/ReportPdfLine.php b/app/Report/ReportPdfLine.php
index d5120e7b00..b751f022ea 100644
--- a/app/Report/ReportPdfLine.php
+++ b/app/Report/ReportPdfLine.php
@@ -24,8 +24,6 @@ class ReportPdfLine extends ReportBaseLine {
* PDF line renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
if ($this->x1 == ".") {
diff --git a/app/Report/ReportPdfPageheader.php b/app/Report/ReportPdfPageheader.php
index fdc502eb28..b9c3e753fc 100644
--- a/app/Report/ReportPdfPageheader.php
+++ b/app/Report/ReportPdfPageheader.php
@@ -24,8 +24,6 @@ class ReportPdfPageheader extends ReportBasePageheader {
* PageHeader element renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
$renderer->clearPageHeader();
diff --git a/app/Report/ReportPdfText.php b/app/Report/ReportPdfText.php
index 2655a4a776..7c54e02a1a 100644
--- a/app/Report/ReportPdfText.php
+++ b/app/Report/ReportPdfText.php
@@ -24,8 +24,6 @@ class ReportPdfText extends ReportBaseText {
* PDF Text renderer
*
* @param PDF $renderer
- *
- * @return void
*/
public function render($renderer) {
// Set up the style
@@ -106,16 +104,16 @@ class ReportPdfText extends ReportBaseText {
$wrapWidthRemaining = (int) ($this->wrapWidthRemaining);
if (($lw >= ($wrapWidthRemaining)) or ($lfct > 1)) {
$newtext = "";
- $lines = explode("\n", $this->text);
+ $lines = explode("\n", $this->text);
// Go throught the text line by line
foreach ($lines as $line) {
// Line width in points + a little margin
$lw = $pdf->GetStringWidth($line);
// If the line has to be wraped
if ($lw >= $wrapWidthRemaining) {
- $words = explode(" ", $line);
+ $words = explode(" ", $line);
$addspace = count($words);
- $lw = 0;
+ $lw = 0;
foreach ($words as $word) {
$addspace--;
$lw += $pdf->GetStringWidth($word . " ");
@@ -149,12 +147,12 @@ class ReportPdfText extends ReportBaseText {
$lfct--;
}
$this->text = $newtext;
- $lfct = substr_count($this->text, "\n");
+ $lfct = substr_count($this->text, "\n");
return array($lw, 1, $lfct);
}
}
- $l = 0;
+ $l = 0;
$lfct = substr_count($this->text, "\n");
if ($lfct > 0) {
$l = 2;
diff --git a/app/Report/ReportPdfTextbox.php b/app/Report/ReportPdfTextbox.php
index 799804c45a..874bbc24d3 100644
--- a/app/Report/ReportPdfTextbox.php
+++ b/app/Report/ReportPdfTextbox.php
@@ -25,12 +25,12 @@ class ReportPdfTextbox extends ReportBaseTextbox {
*
* @param PDF $renderer
*
- * @return boolean|integer
+ * @return bool|int
*/
public function render($renderer) {
- $newelements = array();
- $lastelement = "";
+ $newelements = array();
+ $lastelement = "";
$footnote_element = array();
// Element counter
$cE = count($this->elements);
@@ -54,7 +54,7 @@ class ReportPdfTextbox extends ReportBaseTextbox {
$lastelement->addText(str_replace("\n", "<br>", $element->getValue()));
} elseif (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = $element;
+ $lastelement = $element;
}
}
} // Collect the Footnote links
@@ -64,7 +64,7 @@ class ReportPdfTextbox extends ReportBaseTextbox {
// Save first the last element if any
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
// Save the Footnote with it’s link number as key for sorting later
$footnote_element[$element->num] = $element;
@@ -79,14 +79,14 @@ class ReportPdfTextbox extends ReportBaseTextbox {
}
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
$newelements[] = $element;
}
} else {
if (!empty($lastelement)) {
$newelements[] = $lastelement;
- $lastelement = array();
+ $lastelement = array();
}
if (!empty($footnote_element)) {
ksort($footnote_element);
@@ -147,7 +147,7 @@ class ReportPdfTextbox extends ReportBaseTextbox {
}
// Element height (exept text)
$eH = 0;
- $w = 0;
+ $w = 0;
// Temp Height
$cHT = 0;
//-- $lw is an array
diff --git a/app/Report/ReportTcpdf.php b/app/Report/ReportTcpdf.php
index acc19b9672..d28ecbdc81 100644
--- a/app/Report/ReportTcpdf.php
+++ b/app/Report/ReportTcpdf.php
@@ -42,13 +42,13 @@ class ReportTcpdf extends TCPDF {
/** @var string Currently used style name */
public $currentStyle;
- /** @var integer The last cell height */
+ /** @var int The last cell height */
public $lastCellHeight = 0;
- /** @var integer The largest font size within a TextBox to calculate the height */
+ /** @var int The largest font size within a TextBox to calculate the height */
public $largestFontHeight = 0;
- /** @var integer The last pictures page number */
+ /** @var int The last pictures page number */
public $lastpicpage = 0;
public $wt_report;
@@ -130,7 +130,7 @@ class ReportTcpdf extends TCPDF {
*
* @param object|string $element
*
- * @return integer The number of the Header elements
+ * @return int The number of the Header elements
*/
public function addHeader($element) {
$this->headerElements[] = $element;
@@ -143,7 +143,7 @@ class ReportTcpdf extends TCPDF {
*
* @param object|string $element
*
- * @return integer The number of the Page Header elements
+ * @return int The number of the Page Header elements
*/
public function addPageHeader($element) {
$this->pageHeaderElements[] = $element;
@@ -156,7 +156,7 @@ class ReportTcpdf extends TCPDF {
*
* @param object|string $element
*
- * @return integer The number of the Body elements
+ * @return int The number of the Body elements
*/
public function addBody($element) {
$this->bodyElements[] = $element;
@@ -169,7 +169,7 @@ class ReportTcpdf extends TCPDF {
*
* @param object|string $element
*
- * @return integer The number of the Footer elements
+ * @return int The number of the Footer elements
*/
public function addFooter($element) {
$this->footerElements[] = $element;
@@ -244,7 +244,7 @@ class ReportTcpdf extends TCPDF {
*/
public function setCurrentStyle($s) {
$this->currentStyle = $s;
- $style = $this->wt_report->getStyle($s);
+ $style = $this->wt_report->getStyle($s);
$this->SetFont($style['font'], $style['style'], $style['size']);
}
@@ -257,7 +257,7 @@ class ReportTcpdf extends TCPDF {
*/
public function getStyle($s) {
if (!isset($this->wt_report->Styles[$s])) {
- $s = $this->getCurrentStyle();
+ $s = $this->getCurrentStyle();
$this->wt_report->Styles[$s] = $s;
}
@@ -300,7 +300,7 @@ class ReportTcpdf extends TCPDF {
}
/**
- * @return integer
+ * @return int
*/
public function getFootnotesHeight() {
$h = 0;
@@ -314,7 +314,7 @@ class ReportTcpdf extends TCPDF {
/**
* Returns the the current font size height -PDF
*
- * @return integer
+ * @return int
*/
public function getCurrentStyleHeight() {
if (empty($this->currentStyle)) {
@@ -330,12 +330,12 @@ class ReportTcpdf extends TCPDF {
*
* @param object $footnote
*
- * @return boolean false if not numbered befor | object if already numbered
+ * @return bool false if not numbered befor | object if already numbered
*/
public function checkFootnote($footnote) {
- $ct = count($this->printedfootnotes);
+ $ct = count($this->printedfootnotes);
$val = $footnote->getValue();
- $i = 0;
+ $i = 0;
while ($i < $ct) {
if ($this->printedfootnotes[$i]->getValue() == $val) {
// If this footnote already exist then set up the numbers for this object
@@ -365,7 +365,6 @@ class ReportTcpdf extends TCPDF {
$this->AddPage();
}
-
/*******************************************
* TCPDF protected functions
*******************************************/
@@ -373,9 +372,9 @@ class ReportTcpdf extends TCPDF {
/**
* Add a page if needed -PDF
*
- * @param integer $height Cell height
+ * @param int $height Cell height
*
- * @return boolean true in case of page break, false otherwise
+ * @return bool true in case of page break, false otherwise
*/
public function checkPageBreakPDF($height) {
return $this->checkPageBreak($height);
diff --git a/app/Repository.php b/app/Repository.php
index 9219ba01a5..7cb68d46ed 100644
--- a/app/Repository.php
+++ b/app/Repository.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class Repository extends GedcomRecord {
const RECORD_TYPE = 'REPO';
- const URL_PREFIX = 'repo.php?rid=';
+ const URL_PREFIX = 'repo.php?rid=';
/**
* Get an instance of a repository object. For single records,
diff --git a/app/Session.php b/app/Session.php
index e4c0bef459..b6fdb67c4f 100644
--- a/app/Session.php
+++ b/app/Session.php
@@ -28,13 +28,13 @@ class Session {
*/
public static function start(array $config = array()) {
$default_config = array(
- 'use_cookies' => 1,
- 'name' => 'WT_SESSION',
+ 'use_cookies' => 1,
+ 'name' => 'WT_SESSION',
'cookie_lifetime' => 0,
- 'gc_maxlifetime' => 7200,
- 'gc_probability' => 1,
- 'gc_divisor' => 100,
- 'cookie_path' => '',
+ 'gc_maxlifetime' => 7200,
+ 'gc_probability' => 1,
+ 'gc_divisor' => 100,
+ 'cookie_path' => '',
'cookie_httponly' => true,
);
session_register_shutdown();
@@ -84,7 +84,7 @@ class Session {
*
* @param string $name
*
- * @return boolean
+ * @return bool
*/
public static function has($name) {
return array_key_exists($name, $_SESSION);
diff --git a/app/Site.php b/app/Site.php
index 854d9f682d..48a51b4d9e 100644
--- a/app/Site.php
+++ b/app/Site.php
@@ -56,8 +56,6 @@ class Site {
*
* @param string $setting_name
* @param string|int|bool $setting_value
- *
- * @return void
*/
public static function setPreference($setting_name, $setting_value) {
// Only need to update the database if the setting has actually changed.
@@ -66,7 +64,7 @@ class Site {
Database::prepare(
"DELETE FROM `##site_setting` WHERE setting_name = :setting_name"
)->execute(array(
- 'setting_name' => $setting_name
+ 'setting_name' => $setting_name,
));
} else {
Database::prepare(
diff --git a/app/Soundex.php b/app/Soundex.php
index d09de7bc7a..fa5bd336ac 100644
--- a/app/Soundex.php
+++ b/app/Soundex.php
@@ -36,7 +36,7 @@ class Soundex {
* @param string $soundex1
* @param string $soundex2
*
- * @return boolean
+ * @return bool
*/
public static function compare($soundex1, $soundex2) {
if ($soundex1 && $soundex2) {
@@ -165,517 +165,517 @@ class Soundex {
* @var string[][]
*/
private static $dmsounds = array(
- 'A' => array('1', '0', '', ''),
- 'À' => array('1', '0', '', ''),
- 'Á' => array('1', '0', '', ''),
- 'Â' => array('1', '0', '', ''),
- 'Ã' => array('1', '0', '', ''),
- 'Ä' => array('1', '0', '1', '', '0', '', ''),
- 'Å' => array('1', '0', '', ''),
- 'Ă' => array('1', '0', '', ''),
- 'Ą' => array('1', '', '', '', '', '', '6'),
- 'Ạ' => array('1', '0', '', ''),
- 'Ả' => array('1', '0', '', ''),
- 'Ấ' => array('1', '0', '', ''),
- 'Ầ' => array('1', '0', '', ''),
- 'Ẩ' => array('1', '0', '', ''),
- 'Ẫ' => array('1', '0', '', ''),
- 'Ậ' => array('1', '0', '', ''),
- 'Ắ' => array('1', '0', '', ''),
- 'Ằ' => array('1', '0', '', ''),
- 'Ẳ' => array('1', '0', '', ''),
- 'Ẵ' => array('1', '0', '', ''),
- 'Ặ' => array('1', '0', '', ''),
- 'AE' => array('1', '0', '1', ''),
- 'Æ' => array('1', '0', '1', ''),
- 'AI' => array('1', '0', '1', ''),
- 'AJ' => array('1', '0', '1', ''),
- 'AU' => array('1', '0', '7', ''),
- 'AV' => array('1', '0', '7', '', '7', '7', '7'),
- 'ÄU' => array('1', '0', '1', ''),
- 'AY' => array('1', '0', '1', ''),
- 'B' => array('0', '7', '7', '7'),
- 'C' => array('0', '5', '5', '5', '34', '4', '4'),
- 'Ć' => array('0', '4', '4', '4'),
- 'Č' => array('0', '4', '4', '4'),
- 'Ç' => array('0', '4', '4', '4'),
- 'CH' => array('0', '5', '5', '5', '34', '4', '4'),
- 'CHS' => array('0', '5', '54', '54'),
- 'CK' => array('0', '5', '5', '5', '45', '45', '45'),
- 'CCS' => array('0', '4', '4', '4'),
- 'CS' => array('0', '4', '4', '4'),
- 'CSZ' => array('0', '4', '4', '4'),
- 'CZ' => array('0', '4', '4', '4'),
- 'CZS' => array('0', '4', '4', '4'),
- 'D' => array('0', '3', '3', '3'),
- 'Ď' => array('0', '3', '3', '3'),
- 'Đ' => array('0', '3', '3', '3'),
- 'DRS' => array('0', '4', '4', '4'),
- 'DRZ' => array('0', '4', '4', '4'),
- 'DS' => array('0', '4', '4', '4'),
- 'DSH' => array('0', '4', '4', '4'),
- 'DSZ' => array('0', '4', '4', '4'),
- 'DT' => array('0', '3', '3', '3'),
- 'DDZ' => array('0', '4', '4', '4'),
- 'DDZS' => array('0', '4', '4', '4'),
- 'DZ' => array('0', '4', '4', '4'),
- 'DŹ' => array('0', '4', '4', '4'),
- 'DŻ' => array('0', '4', '4', '4'),
- 'DZH' => array('0', '4', '4', '4'),
- 'DZS' => array('0', '4', '4', '4'),
- 'E' => array('1', '0', '', ''),
- 'È' => array('1', '0', '', ''),
- 'É' => array('1', '0', '', ''),
- 'Ê' => array('1', '0', '', ''),
- 'Ë' => array('1', '0', '', ''),
- 'Ĕ' => array('1', '0', '', ''),
- 'Ė' => array('1', '0', '', ''),
- 'Ę' => array('1', '', '', '6', '', '', ''),
- 'Ẹ' => array('1', '0', '', ''),
- 'Ẻ' => array('1', '0', '', ''),
- 'Ẽ' => array('1', '0', '', ''),
- 'Ế' => array('1', '0', '', ''),
- 'Ề' => array('1', '0', '', ''),
- 'Ể' => array('1', '0', '', ''),
- 'Ễ' => array('1', '0', '', ''),
- 'Ệ' => array('1', '0', '', ''),
- 'EAU' => array('1', '0', '', ''),
- 'EI' => array('1', '0', '1', ''),
- 'EJ' => array('1', '0', '1', ''),
- 'EU' => array('1', '1', '1', ''),
- 'EY' => array('1', '0', '1', ''),
- 'F' => array('0', '7', '7', '7'),
- 'FB' => array('0', '7', '7', '7'),
- 'G' => array('0', '5', '5', '5', '34', '4', '4'),
- 'Ğ' => array('0', '', '', ''),
- 'GGY' => array('0', '5', '5', '5'),
- 'GY' => array('0', '5', '5', '5'),
- 'H' => array('0', '5', '5', '', '5', '5', '5'),
- 'I' => array('1', '0', '', ''),
- 'Ì' => array('1', '0', '', ''),
- 'Í' => array('1', '0', '', ''),
- 'Î' => array('1', '0', '', ''),
- 'Ï' => array('1', '0', '', ''),
- 'Ĩ' => array('1', '0', '', ''),
- 'Į' => array('1', '0', '', ''),
- 'İ' => array('1', '0', '', ''),
- 'Ỉ' => array('1', '0', '', ''),
- 'Ị' => array('1', '0', '', ''),
- 'IA' => array('1', '1', '', ''),
- 'IE' => array('1', '1', '', ''),
- 'IO' => array('1', '1', '', ''),
- 'IU' => array('1', '1', '', ''),
- 'J' => array('0', '1', '', '', '4', '4', '4', '5', '5', ''),
- 'K' => array('0', '5', '5', '5'),
- 'KH' => array('0', '5', '5', '5'),
- 'KS' => array('0', '5', '54', '54'),
- 'L' => array('0', '8', '8', '8'),
- 'Ľ' => array('0', '8', '8', '8'),
- 'Ĺ' => array('0', '8', '8', '8'),
- 'Ł' => array('0', '7', '7', '7', '8', '8', '8'),
- 'LL' => array('0', '8', '8', '8', '58', '8', '8', '1', '8', '8'),
- 'LLY' => array('0', '8', '8', '8', '1', '8', '8'),
- 'LY' => array('0', '8', '8', '8', '1', '8', '8'),
- 'M' => array('0', '6', '6', '6'),
- 'MĔ' => array('0', '66', '66', '66'),
- 'MN' => array('0', '66', '66', '66'),
- 'N' => array('0', '6', '6', '6'),
- 'Ń' => array('0', '6', '6', '6'),
- 'Ň' => array('0', '6', '6', '6'),
- 'Ñ' => array('0', '6', '6', '6'),
- 'NM' => array('0', '66', '66', '66'),
- 'O' => array('1', '0', '', ''),
- 'Ò' => array('1', '0', '', ''),
- 'Ó' => array('1', '0', '', ''),
- 'Ô' => array('1', '0', '', ''),
- 'Õ' => array('1', '0', '', ''),
- 'Ö' => array('1', '0', '', ''),
- 'Ø' => array('1', '0', '', ''),
- 'Ő' => array('1', '0', '', ''),
- 'Œ' => array('1', '0', '', ''),
- 'Ơ' => array('1', '0', '', ''),
- 'Ọ' => array('1', '0', '', ''),
- 'Ỏ' => array('1', '0', '', ''),
- 'Ố' => array('1', '0', '', ''),
- 'Ồ' => array('1', '0', '', ''),
- 'Ổ' => array('1', '0', '', ''),
- 'Ỗ' => array('1', '0', '', ''),
- 'Ộ' => array('1', '0', '', ''),
- 'Ớ' => array('1', '0', '', ''),
- 'Ờ' => array('1', '0', '', ''),
- 'Ở' => array('1', '0', '', ''),
- 'Ỡ' => array('1', '0', '', ''),
- 'Ợ' => array('1', '0', '', ''),
- 'OE' => array('1', '0', '', ''),
- 'OI' => array('1', '0', '1', ''),
- 'OJ' => array('1', '0', '1', ''),
- 'OU' => array('1', '0', '', ''),
- 'OY' => array('1', '0', '1', ''),
- 'P' => array('0', '7', '7', '7'),
- 'PF' => array('0', '7', '7', '7'),
- 'PH' => array('0', '7', '7', '7'),
- 'Q' => array('0', '5', '5', '5'),
- 'R' => array('0', '9', '9', '9'),
- 'Ř' => array('0', '4', '4', '4'),
- 'RS' => array('0', '4', '4', '4', '94', '94', '94'),
- 'RZ' => array('0', '4', '4', '4', '94', '94', '94'),
- 'S' => array('0', '4', '4', '4'),
- 'Ś' => array('0', '4', '4', '4'),
- 'Š' => array('0', '4', '4', '4'),
- 'Ş' => array('0', '4', '4', '4'),
- 'SC' => array('0', '2', '4', '4'),
- 'ŠČ' => array('0', '2', '4', '4'),
- 'SCH' => array('0', '4', '4', '4'),
- 'SCHD' => array('0', '2', '43', '43'),
- 'SCHT' => array('0', '2', '43', '43'),
- 'SCHTCH' => array('0', '2', '4', '4'),
+ 'A' => array('1', '0', '', ''),
+ 'À' => array('1', '0', '', ''),
+ 'Á' => array('1', '0', '', ''),
+ 'Â' => array('1', '0', '', ''),
+ 'Ã' => array('1', '0', '', ''),
+ 'Ä' => array('1', '0', '1', '', '0', '', ''),
+ 'Å' => array('1', '0', '', ''),
+ 'Ă' => array('1', '0', '', ''),
+ 'Ą' => array('1', '', '', '', '', '', '6'),
+ 'Ạ' => array('1', '0', '', ''),
+ 'Ả' => array('1', '0', '', ''),
+ 'Ấ' => array('1', '0', '', ''),
+ 'Ầ' => array('1', '0', '', ''),
+ 'Ẩ' => array('1', '0', '', ''),
+ 'Ẫ' => array('1', '0', '', ''),
+ 'Ậ' => array('1', '0', '', ''),
+ 'Ắ' => array('1', '0', '', ''),
+ 'Ằ' => array('1', '0', '', ''),
+ 'Ẳ' => array('1', '0', '', ''),
+ 'Ẵ' => array('1', '0', '', ''),
+ 'Ặ' => array('1', '0', '', ''),
+ 'AE' => array('1', '0', '1', ''),
+ 'Æ' => array('1', '0', '1', ''),
+ 'AI' => array('1', '0', '1', ''),
+ 'AJ' => array('1', '0', '1', ''),
+ 'AU' => array('1', '0', '7', ''),
+ 'AV' => array('1', '0', '7', '', '7', '7', '7'),
+ 'ÄU' => array('1', '0', '1', ''),
+ 'AY' => array('1', '0', '1', ''),
+ 'B' => array('0', '7', '7', '7'),
+ 'C' => array('0', '5', '5', '5', '34', '4', '4'),
+ 'Ć' => array('0', '4', '4', '4'),
+ 'Č' => array('0', '4', '4', '4'),
+ 'Ç' => array('0', '4', '4', '4'),
+ 'CH' => array('0', '5', '5', '5', '34', '4', '4'),
+ 'CHS' => array('0', '5', '54', '54'),
+ 'CK' => array('0', '5', '5', '5', '45', '45', '45'),
+ 'CCS' => array('0', '4', '4', '4'),
+ 'CS' => array('0', '4', '4', '4'),
+ 'CSZ' => array('0', '4', '4', '4'),
+ 'CZ' => array('0', '4', '4', '4'),
+ 'CZS' => array('0', '4', '4', '4'),
+ 'D' => array('0', '3', '3', '3'),
+ 'Ď' => array('0', '3', '3', '3'),
+ 'Đ' => array('0', '3', '3', '3'),
+ 'DRS' => array('0', '4', '4', '4'),
+ 'DRZ' => array('0', '4', '4', '4'),
+ 'DS' => array('0', '4', '4', '4'),
+ 'DSH' => array('0', '4', '4', '4'),
+ 'DSZ' => array('0', '4', '4', '4'),
+ 'DT' => array('0', '3', '3', '3'),
+ 'DDZ' => array('0', '4', '4', '4'),
+ 'DDZS' => array('0', '4', '4', '4'),
+ 'DZ' => array('0', '4', '4', '4'),
+ 'DŹ' => array('0', '4', '4', '4'),
+ 'DŻ' => array('0', '4', '4', '4'),
+ 'DZH' => array('0', '4', '4', '4'),
+ 'DZS' => array('0', '4', '4', '4'),
+ 'E' => array('1', '0', '', ''),
+ 'È' => array('1', '0', '', ''),
+ 'É' => array('1', '0', '', ''),
+ 'Ê' => array('1', '0', '', ''),
+ 'Ë' => array('1', '0', '', ''),
+ 'Ĕ' => array('1', '0', '', ''),
+ 'Ė' => array('1', '0', '', ''),
+ 'Ę' => array('1', '', '', '6', '', '', ''),
+ 'Ẹ' => array('1', '0', '', ''),
+ 'Ẻ' => array('1', '0', '', ''),
+ 'Ẽ' => array('1', '0', '', ''),
+ 'Ế' => array('1', '0', '', ''),
+ 'Ề' => array('1', '0', '', ''),
+ 'Ể' => array('1', '0', '', ''),
+ 'Ễ' => array('1', '0', '', ''),
+ 'Ệ' => array('1', '0', '', ''),
+ 'EAU' => array('1', '0', '', ''),
+ 'EI' => array('1', '0', '1', ''),
+ 'EJ' => array('1', '0', '1', ''),
+ 'EU' => array('1', '1', '1', ''),
+ 'EY' => array('1', '0', '1', ''),
+ 'F' => array('0', '7', '7', '7'),
+ 'FB' => array('0', '7', '7', '7'),
+ 'G' => array('0', '5', '5', '5', '34', '4', '4'),
+ 'Ğ' => array('0', '', '', ''),
+ 'GGY' => array('0', '5', '5', '5'),
+ 'GY' => array('0', '5', '5', '5'),
+ 'H' => array('0', '5', '5', '', '5', '5', '5'),
+ 'I' => array('1', '0', '', ''),
+ 'Ì' => array('1', '0', '', ''),
+ 'Í' => array('1', '0', '', ''),
+ 'Î' => array('1', '0', '', ''),
+ 'Ï' => array('1', '0', '', ''),
+ 'Ĩ' => array('1', '0', '', ''),
+ 'Į' => array('1', '0', '', ''),
+ 'İ' => array('1', '0', '', ''),
+ 'Ỉ' => array('1', '0', '', ''),
+ 'Ị' => array('1', '0', '', ''),
+ 'IA' => array('1', '1', '', ''),
+ 'IE' => array('1', '1', '', ''),
+ 'IO' => array('1', '1', '', ''),
+ 'IU' => array('1', '1', '', ''),
+ 'J' => array('0', '1', '', '', '4', '4', '4', '5', '5', ''),
+ 'K' => array('0', '5', '5', '5'),
+ 'KH' => array('0', '5', '5', '5'),
+ 'KS' => array('0', '5', '54', '54'),
+ 'L' => array('0', '8', '8', '8'),
+ 'Ľ' => array('0', '8', '8', '8'),
+ 'Ĺ' => array('0', '8', '8', '8'),
+ 'Ł' => array('0', '7', '7', '7', '8', '8', '8'),
+ 'LL' => array('0', '8', '8', '8', '58', '8', '8', '1', '8', '8'),
+ 'LLY' => array('0', '8', '8', '8', '1', '8', '8'),
+ 'LY' => array('0', '8', '8', '8', '1', '8', '8'),
+ 'M' => array('0', '6', '6', '6'),
+ 'MĔ' => array('0', '66', '66', '66'),
+ 'MN' => array('0', '66', '66', '66'),
+ 'N' => array('0', '6', '6', '6'),
+ 'Ń' => array('0', '6', '6', '6'),
+ 'Ň' => array('0', '6', '6', '6'),
+ 'Ñ' => array('0', '6', '6', '6'),
+ 'NM' => array('0', '66', '66', '66'),
+ 'O' => array('1', '0', '', ''),
+ 'Ò' => array('1', '0', '', ''),
+ 'Ó' => array('1', '0', '', ''),
+ 'Ô' => array('1', '0', '', ''),
+ 'Õ' => array('1', '0', '', ''),
+ 'Ö' => array('1', '0', '', ''),
+ 'Ø' => array('1', '0', '', ''),
+ 'Ő' => array('1', '0', '', ''),
+ 'Œ' => array('1', '0', '', ''),
+ 'Ơ' => array('1', '0', '', ''),
+ 'Ọ' => array('1', '0', '', ''),
+ 'Ỏ' => array('1', '0', '', ''),
+ 'Ố' => array('1', '0', '', ''),
+ 'Ồ' => array('1', '0', '', ''),
+ 'Ổ' => array('1', '0', '', ''),
+ 'Ỗ' => array('1', '0', '', ''),
+ 'Ộ' => array('1', '0', '', ''),
+ 'Ớ' => array('1', '0', '', ''),
+ 'Ờ' => array('1', '0', '', ''),
+ 'Ở' => array('1', '0', '', ''),
+ 'Ỡ' => array('1', '0', '', ''),
+ 'Ợ' => array('1', '0', '', ''),
+ 'OE' => array('1', '0', '', ''),
+ 'OI' => array('1', '0', '1', ''),
+ 'OJ' => array('1', '0', '1', ''),
+ 'OU' => array('1', '0', '', ''),
+ 'OY' => array('1', '0', '1', ''),
+ 'P' => array('0', '7', '7', '7'),
+ 'PF' => array('0', '7', '7', '7'),
+ 'PH' => array('0', '7', '7', '7'),
+ 'Q' => array('0', '5', '5', '5'),
+ 'R' => array('0', '9', '9', '9'),
+ 'Ř' => array('0', '4', '4', '4'),
+ 'RS' => array('0', '4', '4', '4', '94', '94', '94'),
+ 'RZ' => array('0', '4', '4', '4', '94', '94', '94'),
+ 'S' => array('0', '4', '4', '4'),
+ 'Ś' => array('0', '4', '4', '4'),
+ 'Š' => array('0', '4', '4', '4'),
+ 'Ş' => array('0', '4', '4', '4'),
+ 'SC' => array('0', '2', '4', '4'),
+ 'ŠČ' => array('0', '2', '4', '4'),
+ 'SCH' => array('0', '4', '4', '4'),
+ 'SCHD' => array('0', '2', '43', '43'),
+ 'SCHT' => array('0', '2', '43', '43'),
+ 'SCHTCH' => array('0', '2', '4', '4'),
'SCHTSCH' => array('0', '2', '4', '4'),
- 'SCHTSH' => array('0', '2', '4', '4'),
- 'SD' => array('0', '2', '43', '43'),
- 'SH' => array('0', '4', '4', '4'),
- 'SHCH' => array('0', '2', '4', '4'),
- 'SHD' => array('0', '2', '43', '43'),
- 'SHT' => array('0', '2', '43', '43'),
- 'SHTCH' => array('0', '2', '4', '4'),
- 'SHTSH' => array('0', '2', '4', '4'),
- 'ß' => array('0', '', '4', '4'),
- 'ST' => array('0', '2', '43', '43'),
- 'STCH' => array('0', '2', '4', '4'),
- 'STRS' => array('0', '2', '4', '4'),
- 'STRZ' => array('0', '2', '4', '4'),
- 'STSCH' => array('0', '2', '4', '4'),
- 'STSH' => array('0', '2', '4', '4'),
- 'SSZ' => array('0', '4', '4', '4'),
- 'SZ' => array('0', '4', '4', '4'),
- 'SZCS' => array('0', '2', '4', '4'),
- 'SZCZ' => array('0', '2', '4', '4'),
- 'SZD' => array('0', '2', '43', '43'),
- 'SZT' => array('0', '2', '43', '43'),
- 'T' => array('0', '3', '3', '3'),
- 'Ť' => array('0', '3', '3', '3'),
- 'Ţ' => array('0', '3', '3', '3', '4', '4', '4'),
- 'TC' => array('0', '4', '4', '4'),
- 'TCH' => array('0', '4', '4', '4'),
- 'TH' => array('0', '3', '3', '3'),
- 'TRS' => array('0', '4', '4', '4'),
- 'TRZ' => array('0', '4', '4', '4'),
- 'TS' => array('0', '4', '4', '4'),
- 'TSCH' => array('0', '4', '4', '4'),
- 'TSH' => array('0', '4', '4', '4'),
- 'TSZ' => array('0', '4', '4', '4'),
- 'TTCH' => array('0', '4', '4', '4'),
- 'TTS' => array('0', '4', '4', '4'),
- 'TTSCH' => array('0', '4', '4', '4'),
- 'TTSZ' => array('0', '4', '4', '4'),
- 'TTZ' => array('0', '4', '4', '4'),
- 'TZ' => array('0', '4', '4', '4'),
- 'TZS' => array('0', '4', '4', '4'),
- 'U' => array('1', '0', '', ''),
- 'Ù' => array('1', '0', '', ''),
- 'Ú' => array('1', '0', '', ''),
- 'Û' => array('1', '0', '', ''),
- 'Ü' => array('1', '0', '', ''),
- 'Ũ' => array('1', '0', '', ''),
- 'Ū' => array('1', '0', '', ''),
- 'Ů' => array('1', '0', '', ''),
- 'Ű' => array('1', '0', '', ''),
- 'Ų' => array('1', '0', '', ''),
- 'Ư' => array('1', '0', '', ''),
- 'Ụ' => array('1', '0', '', ''),
- 'Ủ' => array('1', '0', '', ''),
- 'Ứ' => array('1', '0', '', ''),
- 'Ừ' => array('1', '0', '', ''),
- 'Ử' => array('1', '0', '', ''),
- 'Ữ' => array('1', '0', '', ''),
- 'Ự' => array('1', '0', '', ''),
- 'UE' => array('1', '0', '', ''),
- 'UI' => array('1', '0', '1', ''),
- 'UJ' => array('1', '0', '1', ''),
- 'UY' => array('1', '0', '1', ''),
- 'UW' => array('1', '0', '1', '', '0', '7', '7'),
- 'V' => array('0', '7', '7', '7'),
- 'W' => array('0', '7', '7', '7'),
- 'X' => array('0', '5', '54', '54'),
- 'Y' => array('1', '1', '', ''),
- 'Ý' => array('1', '1', '', ''),
- 'Ỳ' => array('1', '1', '', ''),
- 'Ỵ' => array('1', '1', '', ''),
- 'Ỷ' => array('1', '1', '', ''),
- 'Ỹ' => array('1', '1', '', ''),
- 'Z' => array('0', '4', '4', '4'),
- 'Ź' => array('0', '4', '4', '4'),
- 'Ż' => array('0', '4', '4', '4'),
- 'Ž' => array('0', '4', '4', '4'),
- 'ZD' => array('0', '2', '43', '43'),
- 'ZDZ' => array('0', '2', '4', '4'),
- 'ZDZH' => array('0', '2', '4', '4'),
- 'ZH' => array('0', '4', '4', '4'),
- 'ZHD' => array('0', '2', '43', '43'),
- 'ZHDZH' => array('0', '2', '4', '4'),
- 'ZS' => array('0', '4', '4', '4'),
- 'ZSCH' => array('0', '4', '4', '4'),
- 'ZSH' => array('0', '4', '4', '4'),
- 'ZZS' => array('0', '4', '4', '4'),
+ 'SCHTSH' => array('0', '2', '4', '4'),
+ 'SD' => array('0', '2', '43', '43'),
+ 'SH' => array('0', '4', '4', '4'),
+ 'SHCH' => array('0', '2', '4', '4'),
+ 'SHD' => array('0', '2', '43', '43'),
+ 'SHT' => array('0', '2', '43', '43'),
+ 'SHTCH' => array('0', '2', '4', '4'),
+ 'SHTSH' => array('0', '2', '4', '4'),
+ 'ß' => array('0', '', '4', '4'),
+ 'ST' => array('0', '2', '43', '43'),
+ 'STCH' => array('0', '2', '4', '4'),
+ 'STRS' => array('0', '2', '4', '4'),
+ 'STRZ' => array('0', '2', '4', '4'),
+ 'STSCH' => array('0', '2', '4', '4'),
+ 'STSH' => array('0', '2', '4', '4'),
+ 'SSZ' => array('0', '4', '4', '4'),
+ 'SZ' => array('0', '4', '4', '4'),
+ 'SZCS' => array('0', '2', '4', '4'),
+ 'SZCZ' => array('0', '2', '4', '4'),
+ 'SZD' => array('0', '2', '43', '43'),
+ 'SZT' => array('0', '2', '43', '43'),
+ 'T' => array('0', '3', '3', '3'),
+ 'Ť' => array('0', '3', '3', '3'),
+ 'Ţ' => array('0', '3', '3', '3', '4', '4', '4'),
+ 'TC' => array('0', '4', '4', '4'),
+ 'TCH' => array('0', '4', '4', '4'),
+ 'TH' => array('0', '3', '3', '3'),
+ 'TRS' => array('0', '4', '4', '4'),
+ 'TRZ' => array('0', '4', '4', '4'),
+ 'TS' => array('0', '4', '4', '4'),
+ 'TSCH' => array('0', '4', '4', '4'),
+ 'TSH' => array('0', '4', '4', '4'),
+ 'TSZ' => array('0', '4', '4', '4'),
+ 'TTCH' => array('0', '4', '4', '4'),
+ 'TTS' => array('0', '4', '4', '4'),
+ 'TTSCH' => array('0', '4', '4', '4'),
+ 'TTSZ' => array('0', '4', '4', '4'),
+ 'TTZ' => array('0', '4', '4', '4'),
+ 'TZ' => array('0', '4', '4', '4'),
+ 'TZS' => array('0', '4', '4', '4'),
+ 'U' => array('1', '0', '', ''),
+ 'Ù' => array('1', '0', '', ''),
+ 'Ú' => array('1', '0', '', ''),
+ 'Û' => array('1', '0', '', ''),
+ 'Ü' => array('1', '0', '', ''),
+ 'Ũ' => array('1', '0', '', ''),
+ 'Ū' => array('1', '0', '', ''),
+ 'Ů' => array('1', '0', '', ''),
+ 'Ű' => array('1', '0', '', ''),
+ 'Ų' => array('1', '0', '', ''),
+ 'Ư' => array('1', '0', '', ''),
+ 'Ụ' => array('1', '0', '', ''),
+ 'Ủ' => array('1', '0', '', ''),
+ 'Ứ' => array('1', '0', '', ''),
+ 'Ừ' => array('1', '0', '', ''),
+ 'Ử' => array('1', '0', '', ''),
+ 'Ữ' => array('1', '0', '', ''),
+ 'Ự' => array('1', '0', '', ''),
+ 'UE' => array('1', '0', '', ''),
+ 'UI' => array('1', '0', '1', ''),
+ 'UJ' => array('1', '0', '1', ''),
+ 'UY' => array('1', '0', '1', ''),
+ 'UW' => array('1', '0', '1', '', '0', '7', '7'),
+ 'V' => array('0', '7', '7', '7'),
+ 'W' => array('0', '7', '7', '7'),
+ 'X' => array('0', '5', '54', '54'),
+ 'Y' => array('1', '1', '', ''),
+ 'Ý' => array('1', '1', '', ''),
+ 'Ỳ' => array('1', '1', '', ''),
+ 'Ỵ' => array('1', '1', '', ''),
+ 'Ỷ' => array('1', '1', '', ''),
+ 'Ỹ' => array('1', '1', '', ''),
+ 'Z' => array('0', '4', '4', '4'),
+ 'Ź' => array('0', '4', '4', '4'),
+ 'Ż' => array('0', '4', '4', '4'),
+ 'Ž' => array('0', '4', '4', '4'),
+ 'ZD' => array('0', '2', '43', '43'),
+ 'ZDZ' => array('0', '2', '4', '4'),
+ 'ZDZH' => array('0', '2', '4', '4'),
+ 'ZH' => array('0', '4', '4', '4'),
+ 'ZHD' => array('0', '2', '43', '43'),
+ 'ZHDZH' => array('0', '2', '4', '4'),
+ 'ZS' => array('0', '4', '4', '4'),
+ 'ZSCH' => array('0', '4', '4', '4'),
+ 'ZSH' => array('0', '4', '4', '4'),
+ 'ZZS' => array('0', '4', '4', '4'),
// Cyrillic alphabet
- 'А' => array('1', '0', '', ''),
- 'Б' => array('0', '7', '7', '7'),
- 'В' => array('0', '7', '7', '7'),
- 'Г' => array('0', '5', '5', '5'),
- 'Д' => array('0', '3', '3', '3'),
+ 'А' => array('1', '0', '', ''),
+ 'Б' => array('0', '7', '7', '7'),
+ 'В' => array('0', '7', '7', '7'),
+ 'Г' => array('0', '5', '5', '5'),
+ 'Д' => array('0', '3', '3', '3'),
'ДЗ' => array('0', '4', '4', '4'),
- 'Е' => array('1', '0', '', ''),
- 'Ё' => array('1', '0', '', ''),
- 'Ж' => array('0', '4', '4', '4'),
- 'З' => array('0', '4', '4', '4'),
- 'И' => array('1', '0', '', ''),
- 'Й' => array('1', '1', '', '', '4', '4', '4'),
- 'К' => array('0', '5', '5', '5'),
- 'Л' => array('0', '8', '8', '8'),
- 'М' => array('0', '6', '6', '6'),
- 'Н' => array('0', '6', '6', '6'),
- 'О' => array('1', '0', '', ''),
- 'П' => array('0', '7', '7', '7'),
- 'Р' => array('0', '9', '9', '9'),
+ 'Е' => array('1', '0', '', ''),
+ 'Ё' => array('1', '0', '', ''),
+ 'Ж' => array('0', '4', '4', '4'),
+ 'З' => array('0', '4', '4', '4'),
+ 'И' => array('1', '0', '', ''),
+ 'Й' => array('1', '1', '', '', '4', '4', '4'),
+ 'К' => array('0', '5', '5', '5'),
+ 'Л' => array('0', '8', '8', '8'),
+ 'М' => array('0', '6', '6', '6'),
+ 'Н' => array('0', '6', '6', '6'),
+ 'О' => array('1', '0', '', ''),
+ 'П' => array('0', '7', '7', '7'),
+ 'Р' => array('0', '9', '9', '9'),
'РЖ' => array('0', '4', '4', '4'),
- 'С' => array('0', '4', '4', '4'),
- 'Т' => array('0', '3', '3', '3'),
- 'У' => array('1', '0', '', ''),
- 'Ф' => array('0', '7', '7', '7'),
- 'Х' => array('0', '5', '5', '5'),
- 'Ц' => array('0', '4', '4', '4'),
- 'Ч' => array('0', '4', '4', '4'),
- 'Ш' => array('0', '4', '4', '4'),
- 'Щ' => array('0', '2', '4', '4'),
- 'Ъ' => array('0', '', '', ''),
- 'Ы' => array('0', '1', '', ''),
- 'Ь' => array('0', '', '', ''),
- 'Э' => array('1', '0', '', ''),
- 'Ю' => array('0', '1', '', ''),
- 'Я' => array('0', '1', '', ''),
+ 'С' => array('0', '4', '4', '4'),
+ 'Т' => array('0', '3', '3', '3'),
+ 'У' => array('1', '0', '', ''),
+ 'Ф' => array('0', '7', '7', '7'),
+ 'Х' => array('0', '5', '5', '5'),
+ 'Ц' => array('0', '4', '4', '4'),
+ 'Ч' => array('0', '4', '4', '4'),
+ 'Ш' => array('0', '4', '4', '4'),
+ 'Щ' => array('0', '2', '4', '4'),
+ 'Ъ' => array('0', '', '', ''),
+ 'Ы' => array('0', '1', '', ''),
+ 'Ь' => array('0', '', '', ''),
+ 'Э' => array('1', '0', '', ''),
+ 'Ю' => array('0', '1', '', ''),
+ 'Я' => array('0', '1', '', ''),
// Greek alphabet
- 'Α' => array('1', '0', '', ''),
- 'Ά' => array('1', '0', '', ''),
+ 'Α' => array('1', '0', '', ''),
+ 'Ά' => array('1', '0', '', ''),
'ΑΙ' => array('1', '0', '1', ''),
'ΑΥ' => array('1', '0', '1', ''),
- 'Β' => array('0', '7', '7', '7'),
- 'Γ' => array('0', '5', '5', '5'),
- 'Δ' => array('0', '3', '3', '3'),
- 'Ε' => array('1', '0', '', ''),
- 'Έ' => array('1', '0', '', ''),
+ 'Β' => array('0', '7', '7', '7'),
+ 'Γ' => array('0', '5', '5', '5'),
+ 'Δ' => array('0', '3', '3', '3'),
+ 'Ε' => array('1', '0', '', ''),
+ 'Έ' => array('1', '0', '', ''),
'ΕΙ' => array('1', '0', '1', ''),
'ΕΥ' => array('1', '1', '1', ''),
- 'Ζ' => array('0', '4', '4', '4'),
- 'Η' => array('1', '0', '', ''),
- 'Ή' => array('1', '0', '', ''),
- 'Θ' => array('0', '3', '3', '3'),
- 'Ι' => array('1', '0', '', ''),
- 'Ί' => array('1', '0', '', ''),
- 'Ϊ' => array('1', '0', '', ''),
- 'ΐ' => array('1', '0', '', ''),
- 'Κ' => array('0', '5', '5', '5'),
- 'Λ' => array('0', '8', '8', '8'),
- 'Μ' => array('0', '6', '6', '6'),
+ 'Ζ' => array('0', '4', '4', '4'),
+ 'Η' => array('1', '0', '', ''),
+ 'Ή' => array('1', '0', '', ''),
+ 'Θ' => array('0', '3', '3', '3'),
+ 'Ι' => array('1', '0', '', ''),
+ 'Ί' => array('1', '0', '', ''),
+ 'Ϊ' => array('1', '0', '', ''),
+ 'ΐ' => array('1', '0', '', ''),
+ 'Κ' => array('0', '5', '5', '5'),
+ 'Λ' => array('0', '8', '8', '8'),
+ 'Μ' => array('0', '6', '6', '6'),
'ΜΠ' => array('0', '7', '7', '7'),
- 'Ν' => array('0', '6', '6', '6'),
+ 'Ν' => array('0', '6', '6', '6'),
'ΝΤ' => array('0', '3', '3', '3'),
- 'Ξ' => array('0', '5', '54', '54'),
- 'Ο' => array('1', '0', '', ''),
- 'Ό' => array('1', '0', '', ''),
+ 'Ξ' => array('0', '5', '54', '54'),
+ 'Ο' => array('1', '0', '', ''),
+ 'Ό' => array('1', '0', '', ''),
'ΟΙ' => array('1', '0', '1', ''),
'ΟΥ' => array('1', '0', '1', ''),
- 'Π' => array('0', '7', '7', '7'),
- 'Ρ' => array('0', '9', '9', '9'),
- 'Σ' => array('0', '4', '4', '4'),
- 'ς' => array('0', '', '', '4'),
- 'Τ' => array('0', '3', '3', '3'),
+ 'Π' => array('0', '7', '7', '7'),
+ 'Ρ' => array('0', '9', '9', '9'),
+ 'Σ' => array('0', '4', '4', '4'),
+ 'ς' => array('0', '', '', '4'),
+ 'Τ' => array('0', '3', '3', '3'),
'ΤΖ' => array('0', '4', '4', '4'),
'ΤΣ' => array('0', '4', '4', '4'),
- 'Υ' => array('1', '1', '', ''),
- 'Ύ' => array('1', '1', '', ''),
- 'Ϋ' => array('1', '1', '', ''),
- 'ΰ' => array('1', '1', '', ''),
+ 'Υ' => array('1', '1', '', ''),
+ 'Ύ' => array('1', '1', '', ''),
+ 'Ϋ' => array('1', '1', '', ''),
+ 'ΰ' => array('1', '1', '', ''),
'ΥΚ' => array('1', '5', '5', '5'),
'ΥΥ' => array('1', '65', '65', '65'),
- 'Φ' => array('0', '7', '7', '7'),
- 'Χ' => array('0', '5', '5', '5'),
- 'Ψ' => array('0', '7', '7', '7'),
- 'Ω' => array('1', '0', '', ''),
- 'Ώ' => array('1', '0', '', ''),
+ 'Φ' => array('0', '7', '7', '7'),
+ 'Χ' => array('0', '5', '5', '5'),
+ 'Ψ' => array('0', '7', '7', '7'),
+ 'Ω' => array('1', '0', '', ''),
+ 'Ώ' => array('1', '0', '', ''),
// Hebrew alphabet
- 'א' => array('1', '0', '', ''),
- 'או' => array('1', '0', '7', ''),
- 'אג' => array('1', '4', '4', '4', '5', '5', '5', '34', '34', '34'),
- 'בב' => array('0', '7', '7', '7', '77', '77', '77'),
- 'ב' => array('0', '7', '7', '7'),
- 'גג' => array('0', '4', '4', '4', '5', '5', '5', '45', '45', '45', '55', '55', '55', '54', '54', '54'),
- 'גד' => array('0', '43', '43', '43', '53', '53', '53'),
- 'גה' => array('0', '45', '45', '45', '55', '55', '55'),
- 'גז' => array('0', '44', '44', '44', '45', '45', '45'),
- 'גח' => array('0', '45', '45', '45', '55', '55', '55'),
- 'גכ' => array('0', '45', '45', '45', '55', '55', '55'),
- 'גך' => array('0', '45', '45', '45', '55', '55', '55'),
- 'גצ' => array('0', '44', '44', '44', '45', '45', '45'),
- 'גץ' => array('0', '44', '44', '44', '45', '45', '45'),
- 'גק' => array('0', '45', '45', '45', '54', '54', '54'),
- 'גש' => array('0', '44', '44', '44', '54', '54', '54'),
- 'גת' => array('0', '43', '43', '43', '53', '53', '53'),
- 'ג' => array('0', '4', '4', '4', '5', '5', '5'),
- 'דז' => array('0', '4', '4', '4'),
- 'דד' => array('0', '3', '3', '3', '33', '33', '33'),
- 'דט' => array('0', '33', '33', '33'),
- 'דש' => array('0', '4', '4', '4'),
- 'דצ' => array('0', '4', '4', '4'),
- 'דץ' => array('0', '4', '4', '4'),
- 'ד' => array('0', '3', '3', '3'),
- 'הג' => array('0', '54', '54', '54', '55', '55', '55'),
- 'הכ' => array('0', '55', '55', '55'),
- 'הח' => array('0', '55', '55', '55'),
- 'הק' => array('0', '55', '55', '55', '5', '5', '5'),
- 'הה' => array('0', '5', '5', '', '55', '55', ''),
- 'ה' => array('0', '5', '5', ''),
- 'וי' => array('1', '', '', '', '7', '7', '7'),
- 'ו' => array('1', '7', '7', '7', '7', '', ''),
- 'וו' => array('1', '7', '7', '7', '7', '', ''),
+ 'א' => array('1', '0', '', ''),
+ 'או' => array('1', '0', '7', ''),
+ 'אג' => array('1', '4', '4', '4', '5', '5', '5', '34', '34', '34'),
+ 'בב' => array('0', '7', '7', '7', '77', '77', '77'),
+ 'ב' => array('0', '7', '7', '7'),
+ 'גג' => array('0', '4', '4', '4', '5', '5', '5', '45', '45', '45', '55', '55', '55', '54', '54', '54'),
+ 'גד' => array('0', '43', '43', '43', '53', '53', '53'),
+ 'גה' => array('0', '45', '45', '45', '55', '55', '55'),
+ 'גז' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'גח' => array('0', '45', '45', '45', '55', '55', '55'),
+ 'גכ' => array('0', '45', '45', '45', '55', '55', '55'),
+ 'גך' => array('0', '45', '45', '45', '55', '55', '55'),
+ 'גצ' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'גץ' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'גק' => array('0', '45', '45', '45', '54', '54', '54'),
+ 'גש' => array('0', '44', '44', '44', '54', '54', '54'),
+ 'גת' => array('0', '43', '43', '43', '53', '53', '53'),
+ 'ג' => array('0', '4', '4', '4', '5', '5', '5'),
+ 'דז' => array('0', '4', '4', '4'),
+ 'דד' => array('0', '3', '3', '3', '33', '33', '33'),
+ 'דט' => array('0', '33', '33', '33'),
+ 'דש' => array('0', '4', '4', '4'),
+ 'דצ' => array('0', '4', '4', '4'),
+ 'דץ' => array('0', '4', '4', '4'),
+ 'ד' => array('0', '3', '3', '3'),
+ 'הג' => array('0', '54', '54', '54', '55', '55', '55'),
+ 'הכ' => array('0', '55', '55', '55'),
+ 'הח' => array('0', '55', '55', '55'),
+ 'הק' => array('0', '55', '55', '55', '5', '5', '5'),
+ 'הה' => array('0', '5', '5', '', '55', '55', ''),
+ 'ה' => array('0', '5', '5', ''),
+ 'וי' => array('1', '', '', '', '7', '7', '7'),
+ 'ו' => array('1', '7', '7', '7', '7', '', ''),
+ 'וו' => array('1', '7', '7', '7', '7', '', ''),
'וופ' => array('1', '7', '7', '7', '77', '77', '77'),
- 'זש' => array('0', '4', '4', '4', '44', '44', '44'),
+ 'זש' => array('0', '4', '4', '4', '44', '44', '44'),
'זדז' => array('0', '2', '4', '4'),
- 'ז' => array('0', '4', '4', '4'),
- 'זג' => array('0', '44', '44', '44', '45', '45', '45'),
- 'זז' => array('0', '4', '4', '4', '44', '44', '44'),
- 'זס' => array('0', '44', '44', '44'),
- 'זצ' => array('0', '44', '44', '44'),
- 'זץ' => array('0', '44', '44', '44'),
- 'חג' => array('0', '54', '54', '54', '53', '53', '53'),
- 'חח' => array('0', '5', '5', '5', '55', '55', '55'),
- 'חק' => array('0', '55', '55', '55', '5', '5', '5'),
- 'חכ' => array('0', '45', '45', '45', '55', '55', '55'),
- 'חס' => array('0', '5', '54', '54'),
- 'חש' => array('0', '5', '54', '54'),
- 'ח' => array('0', '5', '5', '5'),
- 'טש' => array('0', '4', '4', '4'),
- 'טד' => array('0', '33', '33', '33'),
- 'טי' => array('0', '3', '3', '3', '4', '4', '4', '3', '3', '34'),
- 'טת' => array('0', '33', '33', '33'),
- 'טט' => array('0', '3', '3', '3', '33', '33', '33'),
- 'ט' => array('0', '3', '3', '3'),
- 'י' => array('1', '1', '', ''),
- 'יא' => array('1', '1', '', '', '1', '1', '1'),
- 'כג' => array('0', '55', '55', '55', '54', '54', '54'),
- 'כש' => array('0', '5', '54', '54'),
- 'כס' => array('0', '5', '54', '54'),
- 'ככ' => array('0', '5', '5', '5', '55', '55', '55'),
- 'כך' => array('0', '5', '5', '5', '55', '55', '55'),
- 'כ' => array('0', '5', '5', '5'),
- 'כח' => array('0', '55', '55', '55', '5', '5', '5'),
- 'ך' => array('0', '', '5', '5'),
- 'ל' => array('0', '8', '8', '8'),
- 'לל' => array('0', '88', '88', '88', '8', '8', '8'),
- 'מנ' => array('0', '66', '66', '66'),
- 'מן' => array('0', '66', '66', '66'),
- 'ממ' => array('0', '6', '6', '6', '66', '66', '66'),
- 'מם' => array('0', '6', '6', '6', '66', '66', '66'),
- 'מ' => array('0', '6', '6', '6'),
- 'ם' => array('0', '', '6', '6'),
- 'נמ' => array('0', '66', '66', '66'),
- 'נם' => array('0', '66', '66', '66'),
- 'ננ' => array('0', '6', '6', '6', '66', '66', '66'),
- 'נן' => array('0', '6', '6', '6', '66', '66', '66'),
- 'נ' => array('0', '6', '6', '6'),
- 'ן' => array('0', '', '6', '6'),
+ 'ז' => array('0', '4', '4', '4'),
+ 'זג' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'זז' => array('0', '4', '4', '4', '44', '44', '44'),
+ 'זס' => array('0', '44', '44', '44'),
+ 'זצ' => array('0', '44', '44', '44'),
+ 'זץ' => array('0', '44', '44', '44'),
+ 'חג' => array('0', '54', '54', '54', '53', '53', '53'),
+ 'חח' => array('0', '5', '5', '5', '55', '55', '55'),
+ 'חק' => array('0', '55', '55', '55', '5', '5', '5'),
+ 'חכ' => array('0', '45', '45', '45', '55', '55', '55'),
+ 'חס' => array('0', '5', '54', '54'),
+ 'חש' => array('0', '5', '54', '54'),
+ 'ח' => array('0', '5', '5', '5'),
+ 'טש' => array('0', '4', '4', '4'),
+ 'טד' => array('0', '33', '33', '33'),
+ 'טי' => array('0', '3', '3', '3', '4', '4', '4', '3', '3', '34'),
+ 'טת' => array('0', '33', '33', '33'),
+ 'טט' => array('0', '3', '3', '3', '33', '33', '33'),
+ 'ט' => array('0', '3', '3', '3'),
+ 'י' => array('1', '1', '', ''),
+ 'יא' => array('1', '1', '', '', '1', '1', '1'),
+ 'כג' => array('0', '55', '55', '55', '54', '54', '54'),
+ 'כש' => array('0', '5', '54', '54'),
+ 'כס' => array('0', '5', '54', '54'),
+ 'ככ' => array('0', '5', '5', '5', '55', '55', '55'),
+ 'כך' => array('0', '5', '5', '5', '55', '55', '55'),
+ 'כ' => array('0', '5', '5', '5'),
+ 'כח' => array('0', '55', '55', '55', '5', '5', '5'),
+ 'ך' => array('0', '', '5', '5'),
+ 'ל' => array('0', '8', '8', '8'),
+ 'לל' => array('0', '88', '88', '88', '8', '8', '8'),
+ 'מנ' => array('0', '66', '66', '66'),
+ 'מן' => array('0', '66', '66', '66'),
+ 'ממ' => array('0', '6', '6', '6', '66', '66', '66'),
+ 'מם' => array('0', '6', '6', '6', '66', '66', '66'),
+ 'מ' => array('0', '6', '6', '6'),
+ 'ם' => array('0', '', '6', '6'),
+ 'נמ' => array('0', '66', '66', '66'),
+ 'נם' => array('0', '66', '66', '66'),
+ 'ננ' => array('0', '6', '6', '6', '66', '66', '66'),
+ 'נן' => array('0', '6', '6', '6', '66', '66', '66'),
+ 'נ' => array('0', '6', '6', '6'),
+ 'ן' => array('0', '', '6', '6'),
'סתש' => array('0', '2', '4', '4'),
'סתז' => array('0', '2', '4', '4'),
'סטז' => array('0', '2', '4', '4'),
'סטש' => array('0', '2', '4', '4'),
'סצד' => array('0', '2', '4', '4'),
- 'סט' => array('0', '2', '4', '4', '43', '43', '43'),
- 'סת' => array('0', '2', '4', '4', '43', '43', '43'),
- 'סג' => array('0', '44', '44', '44', '4', '4', '4'),
- 'סס' => array('0', '4', '4', '4', '44', '44', '44'),
- 'סצ' => array('0', '44', '44', '44'),
- 'סץ' => array('0', '44', '44', '44'),
- 'סז' => array('0', '44', '44', '44'),
- 'סש' => array('0', '44', '44', '44'),
- 'ס' => array('0', '4', '4', '4'),
- 'ע' => array('1', '0', '', ''),
- 'פב' => array('0', '7', '7', '7', '77', '77', '77'),
+ 'סט' => array('0', '2', '4', '4', '43', '43', '43'),
+ 'סת' => array('0', '2', '4', '4', '43', '43', '43'),
+ 'סג' => array('0', '44', '44', '44', '4', '4', '4'),
+ 'סס' => array('0', '4', '4', '4', '44', '44', '44'),
+ 'סצ' => array('0', '44', '44', '44'),
+ 'סץ' => array('0', '44', '44', '44'),
+ 'סז' => array('0', '44', '44', '44'),
+ 'סש' => array('0', '44', '44', '44'),
+ 'ס' => array('0', '4', '4', '4'),
+ 'ע' => array('1', '0', '', ''),
+ 'פב' => array('0', '7', '7', '7', '77', '77', '77'),
'פוו' => array('0', '7', '7', '7', '77', '77', '77'),
- 'פפ' => array('0', '7', '7', '7', '77', '77', '77'),
- 'פף' => array('0', '7', '7', '7', '77', '77', '77'),
- 'פ' => array('0', '7', '7', '7'),
- 'ף' => array('0', '', '7', '7'),
- 'צג' => array('0', '44', '44', '44', '45', '45', '45'),
- 'צז' => array('0', '44', '44', '44'),
- 'צס' => array('0', '44', '44', '44'),
- 'צצ' => array('0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54', '45', '45', '45'),
- 'צץ' => array('0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54'),
- 'צש' => array('0', '44', '44', '44', '4', '4', '4', '5', '5', '5'),
- 'צ' => array('0', '4', '4', '4', '5', '5', '5'),
- 'ץ' => array('0', '', '4', '4'),
- 'קה' => array('0', '55', '55', '5'),
- 'קס' => array('0', '5', '54', '54'),
- 'קש' => array('0', '5', '54', '54'),
- 'קק' => array('0', '5', '5', '5', '55', '55', '55'),
- 'קח' => array('0', '55', '55', '55'),
- 'קכ' => array('0', '55', '55', '55'),
- 'קך' => array('0', '55', '55', '55'),
- 'קג' => array('0', '55', '55', '55', '54', '54', '54'),
- 'ק' => array('0', '5', '5', '5'),
- 'רר' => array('0', '99', '99', '99', '9', '9', '9'),
- 'ר' => array('0', '9', '9', '9'),
+ 'פפ' => array('0', '7', '7', '7', '77', '77', '77'),
+ 'פף' => array('0', '7', '7', '7', '77', '77', '77'),
+ 'פ' => array('0', '7', '7', '7'),
+ 'ף' => array('0', '', '7', '7'),
+ 'צג' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'צז' => array('0', '44', '44', '44'),
+ 'צס' => array('0', '44', '44', '44'),
+ 'צצ' => array('0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54', '45', '45', '45'),
+ 'צץ' => array('0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54'),
+ 'צש' => array('0', '44', '44', '44', '4', '4', '4', '5', '5', '5'),
+ 'צ' => array('0', '4', '4', '4', '5', '5', '5'),
+ 'ץ' => array('0', '', '4', '4'),
+ 'קה' => array('0', '55', '55', '5'),
+ 'קס' => array('0', '5', '54', '54'),
+ 'קש' => array('0', '5', '54', '54'),
+ 'קק' => array('0', '5', '5', '5', '55', '55', '55'),
+ 'קח' => array('0', '55', '55', '55'),
+ 'קכ' => array('0', '55', '55', '55'),
+ 'קך' => array('0', '55', '55', '55'),
+ 'קג' => array('0', '55', '55', '55', '54', '54', '54'),
+ 'ק' => array('0', '5', '5', '5'),
+ 'רר' => array('0', '99', '99', '99', '9', '9', '9'),
+ 'ר' => array('0', '9', '9', '9'),
'שטז' => array('0', '2', '4', '4'),
'שתש' => array('0', '2', '4', '4'),
'שתז' => array('0', '2', '4', '4'),
'שטש' => array('0', '2', '4', '4'),
- 'שד' => array('0', '2', '43', '43'),
- 'שז' => array('0', '44', '44', '44'),
- 'שס' => array('0', '44', '44', '44'),
- 'שת' => array('0', '2', '43', '43'),
- 'שג' => array('0', '4', '4', '4', '44', '44', '44', '4', '43', '43'),
- 'שט' => array('0', '2', '43', '43', '44', '44', '44'),
- 'שצ' => array('0', '44', '44', '44', '45', '45', '45'),
- 'שץ' => array('0', '44', '', '44', '45', '', '45'),
- 'שש' => array('0', '4', '4', '4', '44', '44', '44'),
- 'ש' => array('0', '4', '4', '4'),
- 'תג' => array('0', '34', '34', '34'),
- 'תז' => array('0', '34', '34', '34'),
- 'תש' => array('0', '4', '4', '4'),
- 'תת' => array('0', '3', '3', '3', '4', '4', '4', '33', '33', '33', '44', '44', '44', '34', '34', '34', '43', '43', '43'),
- 'ת' => array('0', '3', '3', '3', '4', '4', '4'),
+ 'שד' => array('0', '2', '43', '43'),
+ 'שז' => array('0', '44', '44', '44'),
+ 'שס' => array('0', '44', '44', '44'),
+ 'שת' => array('0', '2', '43', '43'),
+ 'שג' => array('0', '4', '4', '4', '44', '44', '44', '4', '43', '43'),
+ 'שט' => array('0', '2', '43', '43', '44', '44', '44'),
+ 'שצ' => array('0', '44', '44', '44', '45', '45', '45'),
+ 'שץ' => array('0', '44', '', '44', '45', '', '45'),
+ 'שש' => array('0', '4', '4', '4', '44', '44', '44'),
+ 'ש' => array('0', '4', '4', '4'),
+ 'תג' => array('0', '34', '34', '34'),
+ 'תז' => array('0', '34', '34', '34'),
+ 'תש' => array('0', '4', '4', '4'),
+ 'תת' => array('0', '3', '3', '3', '4', '4', '4', '33', '33', '33', '44', '44', '44', '34', '34', '34', '43', '43', '43'),
+ 'ת' => array('0', '3', '3', '3', '4', '4', '4'),
// Arabic alphabet
- 'ا' => array('1', '0', '', ''),
- 'ب' => array('0', '7', '7', '7'),
- 'ت' => array('0', '3', '3', '3'),
- 'ث' => array('0', '3', '3', '3'),
- 'ج' => array('0', '4', '4', '4'),
- 'ح' => array('0', '5', '5', '5'),
- 'خ' => array('0', '5', '5', '5'),
- 'د' => array('0', '3', '3', '3'),
- 'ذ' => array('0', '3', '3', '3'),
- 'ر' => array('0', '9', '9', '9'),
- 'ز' => array('0', '4', '4', '4'),
- 'س' => array('0', '4', '4', '4'),
- 'ش' => array('0', '4', '4', '4'),
- 'ص' => array('0', '4', '4', '4'),
- 'ض' => array('0', '3', '3', '3'),
- 'ط' => array('0', '3', '3', '3'),
- 'ظ' => array('0', '4', '4', '4'),
- 'ع' => array('1', '0', '', ''),
- 'غ' => array('0', '0', '', ''),
- 'ف' => array('0', '7', '7', '7'),
- 'ق' => array('0', '5', '5', '5'),
- 'ك' => array('0', '5', '5', '5'),
- 'ل' => array('0', '8', '8', '8'),
+ 'ا' => array('1', '0', '', ''),
+ 'ب' => array('0', '7', '7', '7'),
+ 'ت' => array('0', '3', '3', '3'),
+ 'ث' => array('0', '3', '3', '3'),
+ 'ج' => array('0', '4', '4', '4'),
+ 'ح' => array('0', '5', '5', '5'),
+ 'خ' => array('0', '5', '5', '5'),
+ 'د' => array('0', '3', '3', '3'),
+ 'ذ' => array('0', '3', '3', '3'),
+ 'ر' => array('0', '9', '9', '9'),
+ 'ز' => array('0', '4', '4', '4'),
+ 'س' => array('0', '4', '4', '4'),
+ 'ش' => array('0', '4', '4', '4'),
+ 'ص' => array('0', '4', '4', '4'),
+ 'ض' => array('0', '3', '3', '3'),
+ 'ط' => array('0', '3', '3', '3'),
+ 'ظ' => array('0', '4', '4', '4'),
+ 'ع' => array('1', '0', '', ''),
+ 'غ' => array('0', '0', '', ''),
+ 'ف' => array('0', '7', '7', '7'),
+ 'ق' => array('0', '5', '5', '5'),
+ 'ك' => array('0', '5', '5', '5'),
+ 'ل' => array('0', '8', '8', '8'),
'لا' => array('0', '8', '8', '8'),
- 'م' => array('0', '6', '6', '6'),
- 'ن' => array('0', '6', '6', '6'),
+ 'م' => array('0', '6', '6', '6'),
+ 'ن' => array('0', '6', '6', '6'),
'هن' => array('0', '66', '66', '66'),
- 'ه' => array('0', '5', '5', ''),
- 'و' => array('1', '', '', '', '7', '', ''),
- 'ي' => array('0', '1', '', ''),
- 'آ' => array('0', '1', '', ''),
- 'ة' => array('0', '', '', '3'),
- 'ی' => array('0', '1', '', ''),
- 'ى' => array('1', '1', '', ''),
+ 'ه' => array('0', '5', '5', ''),
+ 'و' => array('1', '', '', '', '7', '', ''),
+ 'ي' => array('0', '1', '', ''),
+ 'آ' => array('0', '1', '', ''),
+ 'ة' => array('0', '', '', '3'),
+ 'ی' => array('0', '1', '', ''),
+ 'ى' => array('1', '1', '', ''),
);
/**
@@ -692,7 +692,7 @@ class Soundex {
// Initialize
$name_script = I18N::textScript($name);
- $noVowels = ($name_script == 'Hebr' || $name_script == 'Arab');
+ $noVowels = ($name_script == 'Hebr' || $name_script == 'Arab');
$lastPos = strlen($name) - 1;
$currPos = 0;
diff --git a/app/Source.php b/app/Source.php
index 9c381c450e..ccf483a66e 100644
--- a/app/Source.php
+++ b/app/Source.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*/
class Source extends GedcomRecord {
const RECORD_TYPE = 'SOUR';
- const URL_PREFIX = 'source.php?sid=';
+ const URL_PREFIX = 'source.php?sid=';
/**
* Get an instance of a source object. For single records,
diff --git a/app/Statement.php b/app/Statement.php
index 536526e901..e1f54df0ae 100644
--- a/app/Statement.php
+++ b/app/Statement.php
@@ -30,7 +30,7 @@ class Statement {
/** @var PDOStatement */
private $pdo_statement;
- /** @var boolean Keep track of calls to execute(), so we can do it automatically */
+ /** @var bool Keep track of calls to execute(), so we can do it automatically */
private $executed = false;
/**
@@ -47,8 +47,9 @@ class Statement {
*
* @param array $bind_variables
*
- * @return Statement
* @throws \Exception
+ *
+ * @return Statement
*/
public function execute($bind_variables = array()) {
if ($this->executed) {
@@ -96,8 +97,6 @@ class Statement {
/**
* Close the cursor, and mark it as not-executed, so we can execute
* it again (perhaps with different parameters).
- *
- * @return void
*/
public function closeCursor() {
$this->pdo_statement->closeCursor();
@@ -109,7 +108,7 @@ class Statement {
*
* Execute the query, if necessary. Typically when there are no parameters.
*
- * @param integer $fetch_style
+ * @param int $fetch_style
*
* @return \stdClass|array|false
*/
@@ -126,7 +125,7 @@ class Statement {
*
* Execute the query, if necessary. Typically when there are no parameters.
*
- * @param integer $fetch_style
+ * @param int $fetch_style
*
* @return \stdClass[]|string[][]
*/
@@ -146,7 +145,7 @@ class Statement {
*
* Execute the query, if necessary. Typically when there are no parameters.
*
- * @param integer $fetch_style
+ * @param int $fetch_style
*
* @return \stdClass|array|null
*/
@@ -224,7 +223,7 @@ class Statement {
/**
* How many rows were affected by this statement.
*
- * @return integer
+ * @return int
*/
public function rowCount() {
return $this->pdo_statement->rowCount();
diff --git a/app/Stats.php b/app/Stats.php
index 93e6548056..4148757978 100644
--- a/app/Stats.php
+++ b/app/Stats.php
@@ -31,7 +31,7 @@ class Stats {
/** @var string[] All public functions are available as keywords - except these ones */
private $public_but_not_allowed = array(
- '__construct', 'embedTags', 'iso3166', 'getAllCountries', 'getAllTagsTable', 'getAllTagsText', 'statsPlaces', 'statsBirthQuery', 'statsDeathQuery', 'statsMarrQuery', 'statsAgeQuery', 'monthFirstChildQuery', 'statsChildrenQuery', 'statsMarrAgeQuery'
+ '__construct', 'embedTags', 'iso3166', 'getAllCountries', 'getAllTagsTable', 'getAllTagsText', 'statsPlaces', 'statsBirthQuery', 'statsDeathQuery', 'statsMarrQuery', 'statsAgeQuery', 'monthFirstChildQuery', 'statsChildrenQuery', 'statsMarrAgeQuery',
);
/** @var string[] List of GEDCOM media types */
@@ -156,7 +156,7 @@ class Stats {
public function embedTags($text) {
if (strpos($text, '#') !== false) {
list($new_tags, $new_values) = $this->getTags($text);
- $text = str_replace($new_tags, $new_values, $text);
+ $text = str_replace($new_tags, $new_values, $text);
}
return $text;
@@ -170,7 +170,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
public function gedcomId() {
return $this->tree->getTreeId();
@@ -308,13 +308,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalIndividualsQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -326,7 +326,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalIndisWithSourcesQuery() {
return (int) Database::prepare(
@@ -371,16 +371,17 @@ class Stats {
} else {
$color_to = $WT_STATS_CHART_COLOR2;
}
- $sizes = explode('x', $size);
+ $sizes = explode('x', $size);
$tot_indi = $this->totalIndividualsQuery();
if ($tot_indi == 0) {
return '';
} else {
$tot_sindi_per = round($this->totalIndisWithSourcesQuery() / $tot_indi, 3);
- $chd = $this->arrayToExtendedEncoding(array(100 - 100 * $tot_sindi_per, 100 * $tot_sindi_per));
- $chl = I18N::translate('Without sources') . ' - ' . I18N::percentage(1 - $tot_sindi_per, 1) . '|' .
+ $chd = $this->arrayToExtendedEncoding(array(100 - 100 * $tot_sindi_per, 100 * $tot_sindi_per));
+ $chl = I18N::translate('Without sources') . ' - ' . I18N::percentage(1 - $tot_sindi_per, 1) . '|' .
I18N::translate('With sources') . ' - ' . I18N::percentage($tot_sindi_per, 1);
$chart_title = I18N::translate('Individuals with sources');
+
return '<img src="https://chart.googleapis.com/chart?cht=p3&amp;chd=e:' . $chd . '&amp;chs=' . $size . '&amp;chco=' . $color_from . ',' . $color_to . '&amp;chf=bg,s,ffffff00&amp;chl=' . rawurlencode($chl) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . $chart_title . '" title="' . $chart_title . '">';
}
}
@@ -393,13 +394,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalFamiliesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##families` WHERE f_file = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -411,7 +412,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalFamsWithSourcesQuery() {
return (int) Database::prepare(
@@ -441,7 +442,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if (isset($params[0]) && $params[0] != '') {
$size = strtolower($params[0]);
} else {
@@ -457,16 +457,17 @@ class Stats {
} else {
$color_to = $WT_STATS_CHART_COLOR2;
}
- $sizes = explode('x', $size);
+ $sizes = explode('x', $size);
$tot_fam = $this->totalFamiliesQuery();
if ($tot_fam == 0) {
return '';
} else {
$tot_sfam_per = round($this->totalFamsWithSourcesQuery() / $tot_fam, 3);
- $chd = $this->arrayToExtendedEncoding(array(100 - 100 * $tot_sfam_per, 100 * $tot_sfam_per));
- $chl = I18N::translate('Without sources') . ' - ' . I18N::percentage(1 - $tot_sfam_per, 1) . '|' .
+ $chd = $this->arrayToExtendedEncoding(array(100 - 100 * $tot_sfam_per, 100 * $tot_sfam_per));
+ $chl = I18N::translate('Without sources') . ' - ' . I18N::percentage(1 - $tot_sfam_per, 1) . '|' .
I18N::translate('With sources') . ' - ' . I18N::percentage($tot_sfam_per, 1);
$chart_title = I18N::translate('Families with sources');
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
}
}
@@ -479,13 +480,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalSourcesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##sources` WHERE s_file = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -504,13 +505,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalNotesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##other` WHERE o_type='NOTE' AND o_file = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -529,13 +530,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalRepositoriesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##other` WHERE o_type='REPO' AND o_file = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -560,17 +561,17 @@ class Stats {
*/
public function totalSurnames($params = array()) {
if ($params) {
- $qs = implode(',', array_fill(0, count($params), '?'));
- $opt = "IN ({$qs})";
- $vars = $params;
+ $qs = implode(',', array_fill(0, count($params), '?'));
+ $opt = "IN ({$qs})";
+ $vars = $params;
$distinct = '';
} else {
- $opt = "IS NOT NULL";
- $vars = '';
+ $opt = "IS NOT NULL";
+ $vars = '';
$distinct = 'DISTINCT';
}
$vars[] = $this->tree->getTreeId();
- $total =
+ $total =
Database::prepare(
"SELECT SQL_CACHE COUNT({$distinct} n_surn COLLATE '" . I18N::collation() . "')" .
" FROM `##name`" .
@@ -592,9 +593,9 @@ class Stats {
*/
public function totalGivennames($params = array()) {
if ($params) {
- $qs = implode(',', array_fill(0, count($params), '?'));
+ $qs = implode(',', array_fill(0, count($params), '?'));
$params[] = $this->tree->getTreeId();
- $total =
+ $total =
Database::prepare("SELECT SQL_CACHE COUNT( n_givn) FROM `##name` WHERE n_givn IN ({$qs}) AND n_file=?")
->execute($params)
->fetchOne();
@@ -614,7 +615,7 @@ class Stats {
* @return string
*/
public function totalEvents($params = array()) {
- $sql = "SELECT SQL_CACHE COUNT(*) AS tot FROM `##dates` WHERE d_file=?";
+ $sql = "SELECT SQL_CACHE COUNT(*) AS tot FROM `##dates` WHERE d_file=?";
$vars = array($this->tree->getTreeId());
$no_types = array('HEAD', 'CHAN');
@@ -698,10 +699,10 @@ class Stats {
* @return string
*/
public function totalEventsOther() {
- $facts = array_merge(explode('|', WT_EVENTS_BIRT . '|' . WT_EVENTS_MARR . '|' . WT_EVENTS_DIV . '|' . WT_EVENTS_DEAT));
+ $facts = array_merge(explode('|', WT_EVENTS_BIRT . '|' . WT_EVENTS_MARR . '|' . WT_EVENTS_DIV . '|' . WT_EVENTS_DEAT));
$no_facts = array();
foreach ($facts as $fact) {
- $fact = '!' . str_replace('\'', '', $fact);
+ $fact = '!' . str_replace('\'', '', $fact);
$no_facts[] = $fact;
}
@@ -709,13 +710,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalSexMalesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'M'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -734,13 +735,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalSexFemalesQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'F'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -759,13 +760,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalSexUnknownQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_sex = 'U'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -817,7 +818,7 @@ class Stats {
$tot_f = $this->totalSexFemalesQuery();
$tot_m = $this->totalSexMalesQuery();
$tot_u = $this->totalSexUnknownQuery();
- $tot = $tot_f + $tot_m + $tot_u;
+ $tot = $tot_f + $tot_m + $tot_u;
// I18N data - for display
$per_f = $this->totalSexFemalesPercentage();
$per_m = $this->totalSexMalesPercentage();
@@ -834,6 +835,7 @@ class Stats {
I18N::translate('Males') . ' - ' . $per_m . I18N::$list_separator .
I18N::translate('Females') . ' - ' . $per_f . I18N::$list_separator .
I18N::translateContext('unknown people', 'Unknown') . ' - ' . $per_u;
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_unknown},{$color_female},{$color_male}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
} else {
$chd = $this->arrayToExtendedEncoding(array(4095 * $tot_f / $tot, 4095 * $tot_m / $tot));
@@ -842,6 +844,7 @@ class Stats {
I18N::translate('Males') . ' - ' . $per_m;
$chart_title = I18N::translate('Males') . ' - ' . $per_m . I18N::$list_separator .
I18N::translate('Females') . ' - ' . $per_f;
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_female},{$color_male}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
}
}
@@ -852,13 +855,13 @@ class Stats {
* than MAX_ALIVE_AGE years ago, and who have no DEAT record.
* A good reason to run the “Add missing DEAT records” batch-update!
*
- * @return integer
+ * @return int
*/
private function totalLivingQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_gedcom NOT REGEXP '\\n1 (" . WT_EVENTS_DEAT . ")'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -877,13 +880,13 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalDeceasedQuery() {
return (int) Database::prepare(
"SELECT SQL_CACHE COUNT(*) FROM `##individuals` WHERE i_file = :tree_id AND i_gedcom REGEXP '\\n1 (" . WT_EVENTS_DEAT . ")'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchOne();
}
@@ -929,7 +932,7 @@ class Stats {
// Raw data - for calculation
$tot_l = $this->totalLivingQuery();
$tot_d = $this->totalDeceasedQuery();
- $tot = $tot_l + $tot_d;
+ $tot = $tot_l + $tot_d;
// I18N data - for display
$per_l = $this->totalLivingPercentage();
$per_d = $this->totalDeceasedPercentage();
@@ -979,13 +982,13 @@ class Stats {
/**
* @param string $type
*
- * @return integer
+ * @return int
*/
private function totalMediaType($type = 'all') {
if (!in_array($type, $this->_media_types) && $type != 'all' && $type != 'unknown') {
return 0;
}
- $sql = "SELECT SQL_CACHE COUNT(*) AS tot FROM `##media` WHERE m_file=?";
+ $sql = "SELECT SQL_CACHE COUNT(*) AS tot FROM `##media` WHERE m_file=?";
$vars = array($this->tree->getTreeId());
if ($type != 'all') {
@@ -1173,18 +1176,18 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = $this->totalMediaType('all');
+ $tot = $this->totalMediaType('all');
// Beware divide by zero
if ($tot == 0) {
return I18N::translate('None');
}
// Build a table listing only the media types actually present in the GEDCOM
$mediaCounts = array();
- $mediaTypes = "";
+ $mediaTypes = "";
$chart_title = "";
- $c = 0;
- $max = 0;
- $media = array();
+ $c = 0;
+ $max = 0;
+ $media = array();
foreach ($this->_media_types as $type) {
$count = $this->totalMediaType($type);
if ($count > 0) {
@@ -1205,7 +1208,7 @@ class Stats {
if (($max / $tot) > 0.6 && count($media) > 10) {
arsort($media);
$media = array_slice($media, 0, 10);
- $c = $tot;
+ $c = $tot;
foreach ($media as $cm) {
$c -= $cm;
}
@@ -1222,8 +1225,8 @@ class Stats {
$chart_title .= GedcomTag::getFileFormTypeValue($type) . ' (' . $count . '), ';
}
$chart_title = substr($chart_title, 0, -2);
- $chd = $this->arrayToExtendedEncoding($mediaCounts);
- $chl = substr($mediaTypes, 0, -1);
+ $chd = $this->arrayToExtendedEncoding($mediaCounts);
+ $chl = substr($mediaTypes, 0, -1);
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
}
@@ -1264,7 +1267,7 @@ class Stats {
if (!isset($rows[0])) {
return '';
}
- $row = $rows[0];
+ $row = $rows[0];
$record = GedcomRecord::getInstance($row['d_gid'], $this->tree);
switch ($type) {
default:
@@ -1276,7 +1279,7 @@ class Stats {
}
break;
case 'year':
- $date = new Date($row['d_type'] . ' ' . $row['d_year']);
+ $date = new Date($row['d_type'] . ' ' . $row['d_year']);
$result = $date->display();
break;
case 'name':
@@ -1296,10 +1299,10 @@ class Stats {
}
/**
- * @param string $what
- * @param string $fact
- * @param integer $parent
- * @param boolean $country
+ * @param string $what
+ * @param string $fact
+ * @param int $parent
+ * @param bool $country
*
* @return integer[]|string[][]
*/
@@ -1309,13 +1312,13 @@ class Stats {
$rows = Database::prepare(
"SELECT i_gedcom AS ged FROM `##individuals` WHERE i_file = :tree_id AND i_gedcom LIKE '%\n2 PLAC %'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchAll();
} elseif ($what == 'FAM') {
$rows = Database::prepare(
"SELECT f_gedcom AS ged FROM `##families` WHERE f_file = :tree_id AND f_gedcom LIKE '%\n2 PLAC %'"
)->execute(array(
- 'tree_id' => $this->tree->getTreeId()
+ 'tree_id' => $this->tree->getTreeId(),
))->fetchAll();
}
$placelist = array();
@@ -1387,7 +1390,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
private function totalPlacesQuery() {
return
@@ -1440,7 +1443,7 @@ class Stats {
I18N::init($locale->languageTag());
$countries = $this->getAllCountries();
foreach ($this->iso3166() as $three => $two) {
- $country_to_iso3166[$three] = $two;
+ $country_to_iso3166[$three] = $two;
$country_to_iso3166[$countries[$three]] = $two;
}
}
@@ -1453,7 +1456,7 @@ class Stats {
$chart_title = I18N::translate('Surname distribution chart') . ': ' . $surname;
// Count how many people are events in each country
$surn_countries = array();
- $indis = QueryName::individuals($this->tree, I18N::strtoupper($surname), '', '', false, false);
+ $indis = QueryName::individuals($this->tree, I18N::strtoupper($surname), '', '', false, false);
foreach ($indis as $person) {
if (preg_match_all('/^2 PLAC (?:.*, *)*(.*)/m', $person->getGedcom(), $matches)) {
// webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
@@ -1473,7 +1476,7 @@ class Stats {
$chart_title = I18N::translate('Birth by country');
// Count how many people were born in each country
$surn_countries = array();
- $b_countries = $this->statsPlaces('INDI', 'BIRT', 0, true);
+ $b_countries = $this->statsPlaces('INDI', 'BIRT', 0, true);
foreach ($b_countries as $place => $count) {
$country = $place;
if (array_key_exists($country, $country_to_iso3166)) {
@@ -1489,7 +1492,7 @@ class Stats {
$chart_title = I18N::translate('Death by country');
// Count how many people were death in each country
$surn_countries = array();
- $d_countries = $this->statsPlaces('INDI', 'DEAT', 0, true);
+ $d_countries = $this->statsPlaces('INDI', 'DEAT', 0, true);
foreach ($d_countries as $place => $count) {
$country = $place;
if (array_key_exists($country, $country_to_iso3166)) {
@@ -1505,7 +1508,7 @@ class Stats {
$chart_title = I18N::translate('Marriage by country');
// Count how many families got marriage in each country
$surn_countries = array();
- $m_countries = $this->statsPlaces('FAM');
+ $m_countries = $this->statsPlaces('FAM');
// webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
foreach ($m_countries as $place) {
$country = $place['country'];
@@ -1523,7 +1526,7 @@ class Stats {
$chart_title = I18N::translate('Individual distribution chart');
// Count how many people have events in each country
$surn_countries = array();
- $a_countries = $this->statsPlaces('INDI');
+ $a_countries = $this->statsPlaces('INDI');
// webtrees uses 3 letter country codes and localised country names, but google uses 2 letter codes.
foreach ($a_countries as $place) {
$country = $place['country'];
@@ -1566,7 +1569,7 @@ class Stats {
return '';
}
$top10 = array();
- $i = 1;
+ $i = 1;
// Get the country names for each language
$country_names = array();
foreach (I18N::activeLocales() as $locale) {
@@ -1593,7 +1596,7 @@ class Stats {
foreach ($all_db_countries as $country_code => $country) {
$top10[] = '<li>';
foreach ($country as $country_name => $tot) {
- $tmp = new Place($country_name, $this->tree);
+ $tmp = new Place($country_name, $this->tree);
$place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $all_countries[$country_code] . '</a>';
$top10[] .= $place . ' - ' . I18N::number($tot);
}
@@ -1603,6 +1606,7 @@ class Stats {
}
}
$top10 = implode('', $top10);
+
return '<ul>' . $top10 . '</ul>';
}
@@ -1611,12 +1615,12 @@ class Stats {
*/
public function commonBirthPlacesList() {
$places = $this->statsPlaces('INDI', 'BIRT');
- $top10 = array();
- $i = 1;
+ $top10 = array();
+ $i = 1;
arsort($places);
foreach ($places as $place => $count) {
- $tmp = new Place($place, $this->tree);
- $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
+ $tmp = new Place($place, $this->tree);
+ $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
if ($i++ == 10) {
break;
@@ -1632,12 +1636,12 @@ class Stats {
*/
public function commonDeathPlacesList() {
$places = $this->statsPlaces('INDI', 'DEAT');
- $top10 = array();
- $i = 1;
+ $top10 = array();
+ $i = 1;
arsort($places);
foreach ($places as $place => $count) {
- $tmp = new Place($place, $this->tree);
- $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
+ $tmp = new Place($place, $this->tree);
+ $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
if ($i++ == 10) {
break;
@@ -1653,12 +1657,12 @@ class Stats {
*/
public function commonMarriagePlacesList() {
$places = $this->statsPlaces('FAM', 'MARR');
- $top10 = array();
- $i = 1;
+ $top10 = array();
+ $i = 1;
arsort($places);
foreach ($places as $place => $count) {
- $tmp = new Place($place, $this->tree);
- $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
+ $tmp = new Place($place, $this->tree);
+ $place = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
if ($i++ == 10) {
break;
@@ -1670,10 +1674,10 @@ class Stats {
}
/**
- * @param boolean $simple
- * @param boolean $sex
- * @param integer $year1
- * @param integer $year2
+ * @param bool $simple
+ * @param bool $sex
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return array|string
@@ -1684,7 +1688,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if ($simple) {
$sql =
"SELECT SQL_CACHE FLOOR(d_year/100+1) AS century, COUNT(*) AS total FROM `##dates` " .
@@ -1738,7 +1741,7 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = 0;
+ $tot = 0;
foreach ($rows as $values) {
$tot += $values['total'];
}
@@ -1747,7 +1750,7 @@ class Stats {
return '';
}
$centuries = "";
- $counts = array();
+ $counts = array();
foreach ($rows as $values) {
$counts[] = round(100 * $values['total'] / $tot, 0);
$centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
@@ -1762,10 +1765,10 @@ class Stats {
}
/**
- * @param boolean $simple
- * @param boolean $sex
- * @param integer $year1
- * @param integer $year2
+ * @param bool $simple
+ * @param bool $sex
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return array|string
@@ -1829,7 +1832,7 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = 0;
+ $tot = 0;
foreach ($rows as $values) {
$tot += $values['total'];
}
@@ -1838,7 +1841,7 @@ class Stats {
return '';
}
$centuries = "";
- $counts = array();
+ $counts = array();
foreach ($rows as $values) {
$counts[] = round(100 * $values['total'] / $tot, 0);
$centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
@@ -1848,6 +1851,7 @@ class Stats {
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Deaths by century') . "\" title=\"" . I18N::translate('Deaths by century') . "\" />";
}
+
return $rows;
}
@@ -2022,7 +2026,7 @@ class Stats {
if (!isset($rows[0])) {
return '';
}
- $row = $rows[0];
+ $row = $rows[0];
$person = Individual::getInstance($row['id'], $this->tree);
switch ($type) {
default:
@@ -2040,6 +2044,7 @@ class Stats {
$result = "<a href=\"" . $person->getHtmlUrl() . "\">" . $person->getFullName() . "</a>";
break;
}
+
return $result;
}
@@ -2092,7 +2097,7 @@ class Stats {
$top10 = array();
foreach ($rows as $row) {
$person = Individual::getInstance($row['deathdate'], $this->tree);
- $age = $row['age'];
+ $age = $row['age'];
if ((int) ($age / 365.25) > 0) {
$age = (int) ($age / 365.25) . 'y';
} elseif ((int) ($age / 30.4375) > 0) {
@@ -2120,6 +2125,7 @@ class Stats {
if ($type == 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
@@ -2168,7 +2174,7 @@ class Stats {
$top10 = array();
foreach ($rows as $row) {
$person = Individual::getInstance($row['id'], $this->tree);
- $age = (WT_CLIENT_JD - $row['age']);
+ $age = (WT_CLIENT_JD - $row['age']);
if ((int) ($age / 365.25) > 0) {
$age = (int) ($age / 365.25) . 'y';
} elseif ((int) ($age / 30.4375) > 0) {
@@ -2194,6 +2200,7 @@ class Stats {
if ($type === 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
@@ -2243,6 +2250,7 @@ class Stats {
} elseif (!empty($age)) {
$age = $age . 'd';
}
+
return get_age_at_event($age, true);
} else {
return I18N::number($age / 365.25);
@@ -2250,11 +2258,11 @@ class Stats {
}
/**
- * @param boolean $simple
+ * @param bool $simple
* @param string $related
* @param string $sex
- * @param integer $year1
- * @param integer $year2
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return array|string
@@ -2267,7 +2275,7 @@ class Stats {
$size = '230x250';
}
$sizes = explode('x', $size);
- $rows = $this->runSql(
+ $rows = $this->runSql(
"SELECT SQL_CACHE" .
" ROUND(AVG(death.d_julianday2-birth.d_julianday1)/365.25,1) AS age," .
" FLOOR(death.d_year/100+1) AS century," .
@@ -2292,11 +2300,11 @@ class Stats {
if (empty($rows)) {
return '';
}
- $chxl = '0:|';
+ $chxl = '0:|';
$countsm = '';
$countsf = '';
$countsa = '';
- $out = array();
+ $out = array();
foreach ($rows as $values) {
$out[$values['century']][$values['sex']] = $values['age'];
}
@@ -2331,7 +2339,7 @@ class Stats {
$countsm = substr($countsm, 0, -1);
$countsf = substr($countsf, 0, -1);
$countsa = substr($countsa, 0, -1);
- $chd = 't2:' . $countsm . '|' . $countsf . '|' . $countsa;
+ $chd = 't2:' . $countsm . '|' . $countsf . '|' . $countsa;
$decades = '';
for ($i = 0; $i <= 100; $i += 10) {
$decades .= '|' . I18N::number($i);
@@ -2341,7 +2349,7 @@ class Stats {
if (count($rows) > 6 || mb_strlen($title) < 30) {
$chtt = $title;
} else {
- $offset = 0;
+ $offset = 0;
$counter = array();
while ($offset = strpos($title, ' ', $offset + 1)) {
$counter[] = $offset;
@@ -2349,10 +2357,11 @@ class Stats {
$half = (int) (count($counter) / 2);
$chtt = substr_replace($title, '|', $counter[$half], 1);
}
+
return '<img src="' . "https://chart.googleapis.com/chart?cht=bvg&amp;chs={$sizes[0]}x{$sizes[1]}&amp;chm=D,FF0000,2,0,3,1|N*f1*,000000,0,-1,11,1|N*f1*,000000,1,-1,11,1&amp;chf=bg,s,ffffff00|c,s,ffffff00&amp;chtt=" . rawurlencode($chtt) . "&amp;chd={$chd}&amp;chco=0000FF,FFA0CB,FF0000&amp;chbh=20,3&amp;chxt=x,x,y,y&amp;chxl=" . rawurlencode($chxl) . "&amp;chdl=" . rawurlencode(I18N::translate('Males') . '|' . I18N::translate('Females') . '|' . I18N::translate('Average age at death')) . "\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Average age related to death century') . "\" title=\"" . I18N::translate('Average age related to death century') . "\" />";
} else {
$sex_search = '';
- $years = '';
+ $years = '';
if ($sex == 'F') {
$sex_search = " AND i_sex='F'";
} elseif ($sex == 'M') {
@@ -2459,7 +2468,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -2525,7 +2534,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -2591,7 +2600,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -2615,7 +2624,7 @@ class Stats {
'MARR' => I18N::translate('marriage'),
'ADOP' => I18N::translate('adoption'),
'BURI' => I18N::translate('burial'),
- 'CENS' => I18N::translate('census added')
+ 'CENS' => I18N::translate('census added'),
);
$fact_query = "IN ('" . str_replace('|', "','", $facts) . "')";
@@ -2642,7 +2651,7 @@ class Stats {
if (!isset($rows[0])) {
return '';
}
- $row = $rows[0];
+ $row = $rows[0];
$record = GedcomRecord::getInstance($row['id'], $this->tree);
switch ($type) {
default:
@@ -2654,7 +2663,7 @@ class Stats {
}
break;
case 'year':
- $date = new Date($row['type'] . ' ' . $row['year']);
+ $date = new Date($row['type'] . ' ' . $row['year']);
$result = $date->display();
break;
case 'type':
@@ -2676,6 +2685,7 @@ class Stats {
}
break;
}
+
return $result;
}
@@ -2752,10 +2762,10 @@ class Stats {
/**
* Query the database for marriage tags.
*
- * @param string $type
- * @param string $age_dir
- * @param string $sex
- * @param boolean $show_years
+ * @param string $type
+ * @param string $age_dir
+ * @param string $sex
+ * @param bool $show_years
*
* @return string
*/
@@ -2825,6 +2835,7 @@ class Stats {
}
break;
}
+
return $result;
}
@@ -2914,7 +2925,7 @@ class Stats {
asort($rows);
}
$top10 = array();
- $i = 0;
+ $i = 0;
foreach ($rows as $fam => $age) {
$family = Family::getInstance($fam, $this->tree);
if ($type === 'name') {
@@ -2957,6 +2968,7 @@ class Stats {
if ($type === 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
@@ -3043,10 +3055,10 @@ class Stats {
}
/**
- * @param string $type
- * @param string $age_dir
- * @param string $sex
- * @param boolean $show_years
+ * @param string $type
+ * @param string $age_dir
+ * @param string $sex
+ * @param bool $show_years
*
* @return string
*/
@@ -3115,14 +3127,15 @@ class Stats {
}
break;
}
+
return $result;
}
/**
- * @param boolean $simple
- * @param boolean $first
- * @param integer $year1
- * @param integer $year2
+ * @param bool $simple
+ * @param bool $first
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return string|array
@@ -3133,7 +3146,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if ($simple) {
$sql =
"SELECT SQL_CACHE FLOOR(d_year/100+1) AS century, COUNT(*) AS total" .
@@ -3192,7 +3204,7 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = 0;
+ $tot = 0;
foreach ($rows as $values) {
$tot += $values['total'];
}
@@ -3201,23 +3213,25 @@ class Stats {
return '';
}
$centuries = "";
- $counts = array();
+ $counts = array();
foreach ($rows as $values) {
$counts[] = round(100 * $values['total'] / $tot, 0);
$centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
}
$chd = $this->arrayToExtendedEncoding($counts);
$chl = substr($centuries, 0, -1);
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Marriages by century') . "\" title=\"" . I18N::translate('Marriages by century') . "\" />";
}
+
return $rows;
}
/**
- * @param boolean $simple
- * @param boolean $first
- * @param integer $year1
- * @param integer $year2
+ * @param bool $simple
+ * @param bool $first
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return string|array
@@ -3228,7 +3242,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if ($simple) {
$sql =
"SELECT SQL_CACHE FLOOR(d_year/100+1) AS century, COUNT(*) AS total" .
@@ -3286,7 +3299,7 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = 0;
+ $tot = 0;
foreach ($rows as $values) {
$tot += $values['total'];
}
@@ -3295,15 +3308,17 @@ class Stats {
return '';
}
$centuries = "";
- $counts = array();
+ $counts = array();
foreach ($rows as $values) {
$counts[] = round(100 * $values['total'] / $tot, 0);
$centuries .= $this->centuryName($values['century']) . ' - ' . I18N::number($values['total']) . '|';
}
$chd = $this->arrayToExtendedEncoding($counts);
$chl = substr($centuries, 0, -1);
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Divorces by century') . "\" title=\"" . I18N::translate('Divorces by century') . "\" />";
}
+
return $rows;
}
@@ -3438,10 +3453,10 @@ class Stats {
}
/**
- * @param boolean $simple
+ * @param bool $simple
* @param string $sex
- * @param integer $year1
- * @param integer $year2
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return array|string
@@ -3454,7 +3469,7 @@ class Stats {
$size = '200x250';
}
$sizes = explode('x', $size);
- $rows = $this->runSql(
+ $rows = $this->runSql(
"SELECT SQL_CACHE " .
" ROUND(AVG(married.d_julianday2-birth.d_julianday1-182.5)/365.25,1) AS age, " .
" FLOOR(married.d_year/100+1) AS century, " .
@@ -3492,14 +3507,14 @@ class Stats {
$max = $values['age'];
}
}
- $chxl = '0:|';
- $chmm = '';
- $chmf = '';
- $i = 0;
+ $chxl = '0:|';
+ $chmm = '';
+ $chmf = '';
+ $i = 0;
$countsm = '';
$countsf = '';
$countsa = '';
- $out = array();
+ $out = array();
foreach ($rows as $values) {
$out[$values['century']][$values['sex']] = $values['age'];
}
@@ -3549,8 +3564,8 @@ class Stats {
$countsm = substr($countsm, 0, -1);
$countsf = substr($countsf, 0, -1);
$countsa = substr($countsa, 0, -1);
- $chmf = substr($chmf, 0, -1);
- $chd = 't2:' . $countsm . '|' . $countsf . '|' . $countsa;
+ $chmf = substr($chmf, 0, -1);
+ $chd = 't2:' . $countsm . '|' . $countsf . '|' . $countsa;
if ($max <= 50) {
$chxl .= '1:||' . I18N::translate('century') . '|2:|0|10|20|30|40|50|3:||' . I18N::translate('Age') . '|';
} else {
@@ -3559,7 +3574,7 @@ class Stats {
if (count($rows) > 4 || mb_strlen(I18N::translate('Average age in century of marriage')) < 30) {
$chtt = I18N::translate('Average age in century of marriage');
} else {
- $offset = 0;
+ $offset = 0;
$counter = array();
while ($offset = strpos(I18N::translate('Average age in century of marriage'), ' ', $offset + 1)) {
$counter[] = $offset;
@@ -3567,6 +3582,7 @@ class Stats {
$half = (int) (count($counter) / 2);
$chtt = substr_replace(I18N::translate('Average age in century of marriage'), '|', $counter[$half], 1);
}
+
return "<img src=\"" . "https://chart.googleapis.com/chart?cht=bvg&amp;chs={$sizes[0]}x{$sizes[1]}&amp;chm=D,FF0000,2,0,3,1|{$chmm}{$chmf}&amp;chf=bg,s,ffffff00|c,s,ffffff00&amp;chtt=" . rawurlencode($chtt) . "&amp;chd={$chd}&amp;chco=0000FF,FFA0CB,FF0000&amp;chbh=20,3&amp;chxt=x,x,y,y&amp;chxl=" . rawurlencode($chxl) . "&amp;chdl=" . rawurlencode(I18N::translate('Males') . "|" . I18N::translate('Females') . "|" . I18N::translate('Average age')) . "\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Average age in century of marriage') . "\" title=\"" . I18N::translate('Average age in century of marriage') . "\" />";
} else {
if ($year1 >= 0 && $year2 >= 0) {
@@ -3601,6 +3617,7 @@ class Stats {
" birth.d_type IN ('@#DGREGORIAN@', '@#DJULIAN@') AND birth.d_fact='BIRT' AND " .
" married.d_julianday1>birth.d_julianday1 AND birth.d_julianday1<>0 "
);
+
return $rows;
}
}
@@ -3620,7 +3637,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -3643,7 +3660,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -3666,7 +3683,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -3689,7 +3706,7 @@ class Stats {
}
/**
- * @param boolean $show_years
+ * @param bool $show_years
*
* @return string
*/
@@ -3905,6 +3922,7 @@ class Stats {
$n = Database::prepare("SELECT SQL_CACHE COUNT(DISTINCT f_husb) FROM `##families` WHERE f_file=? AND f_gedcom LIKE '%\\n1 MARR%'")
->execute(array($this->tree->getTreeId()))
->fetchOne();
+
return I18N::number($n);
}
@@ -3915,6 +3933,7 @@ class Stats {
$n = Database::prepare("SELECT SQL_CACHE COUNT(DISTINCT f_wife) FROM `##families` WHERE f_file=? AND f_gedcom LIKE '%\\n1 MARR%'")
->execute(array($this->tree->getTreeId()))
->fetchOne();
+
return I18N::number($n);
}
@@ -3939,7 +3958,7 @@ class Stats {
if (!isset($rows[0])) {
return '';
}
- $row = $rows[0];
+ $row = $rows[0];
$family = Family::getInstance($row['id'], $this->tree);
switch ($type) {
default:
@@ -3957,6 +3976,7 @@ class Stats {
$result = "<a href=\"" . $family->getHtmlUrl() . "\">" . $family->getFullName() . '</a>';
break;
}
+
return $result;
}
@@ -4012,6 +4032,7 @@ class Stats {
if ($type === 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
@@ -4075,6 +4096,7 @@ class Stats {
} else {
$return = I18N::translate('This information is private and cannot be shown.');
}
+
return $return;
}
$age = $fam['age'];
@@ -4100,7 +4122,7 @@ class Stats {
$return .= " <a href=\"" . $family->getHtmlUrl() . "\">[" . I18N::translate('View family') . "]</a>";
$return .= '</li>';
$top10[] = $return;
- $dist[] = $fam['family'];
+ $dist[] = $fam['family'];
}
} elseif (!$one && $child1->canShow() && $child2->canShow()) {
$return = "<li>";
@@ -4118,6 +4140,7 @@ class Stats {
$return .= "<br>" . I18N::translate('and') . "<br>";
$return .= $child1->formatList('span', false, $child1->getFullName());
$return .= "<br><a href=\"" . $family->getHtmlUrl() . "\">[" . I18N::translate('View family') . "]</a>";
+
return $return;
} else {
return I18N::translate('This information is private and cannot be shown.');
@@ -4133,14 +4156,15 @@ class Stats {
if ($type === 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
/**
- * @param boolean $simple
- * @param boolean $sex
- * @param integer $year1
- * @param integer $year2
+ * @param bool $simple
+ * @param bool $sex
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return string|string[][]
@@ -4151,7 +4175,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if ($year1 >= 0 && $year2 >= 0) {
$sql_years = " AND (d_year BETWEEN '{$year1}' AND '{$year2}')";
} else {
@@ -4212,7 +4235,7 @@ class Stats {
$color_to = $WT_STATS_CHART_COLOR2;
}
$sizes = explode('x', $size);
- $tot = 0;
+ $tot = 0;
foreach ($rows as $values) {
$tot += $values['total'];
}
@@ -4220,7 +4243,7 @@ class Stats {
if ($tot == 0) {
return '';
}
- $text = '';
+ $text = '';
$counts = array();
foreach ($rows as $values) {
$counts[] = round(100 * $values['total'] / $tot, 0);
@@ -4267,8 +4290,10 @@ class Stats {
}
$chd = $this->arrayToExtendedEncoding($counts);
$chl = substr($text, 0, -1);
+
return '<img src="https://chart.googleapis.com/chart?cht=p3&amp;chd=e:' . $chd . '&amp;chs=' . $size . '&amp;chco=' . $color_from . ',' . $color_to . '&amp;chf=bg,s,ffffff00&amp;chl=' . $chl . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . I18N::translate('Month of birth of first child in a relation') . '" title="' . I18N::translate('Month of birth of first child in a relation') . '" />';
}
+
return $rows;
}
@@ -4344,7 +4369,7 @@ class Stats {
}
$sizes = explode('x', $size);
$total = (int) $total;
- $rows = $this->runSql(
+ $rows = $this->runSql(
" SELECT SQL_CACHE f_numchil AS tot, f_id AS id" .
" FROM `##families`" .
" WHERE f_file={$this->tree->getTreeId()}" .
@@ -4396,10 +4421,10 @@ class Stats {
}
/**
- * @param boolean $simple
+ * @param bool $simple
* @param string $sex
- * @param integer $year1
- * @param integer $year2
+ * @param int $year1
+ * @param int $year2
* @param string[] $params
*
* @return string|string[][]
@@ -4412,8 +4437,8 @@ class Stats {
$size = '220x200';
}
$sizes = explode('x', $size);
- $max = 0;
- $rows = $this->runSql(
+ $max = 0;
+ $rows = $this->runSql(
" SELECT SQL_CACHE ROUND(AVG(f_numchil),2) AS num, FLOOR(d_year/100+1) AS century" .
" FROM `##families`" .
" JOIN `##dates` ON (d_file = f_file AND d_gid=f_id)" .
@@ -4431,9 +4456,9 @@ class Stats {
$max = $values['num'];
}
}
- $chm = "";
- $chxl = "0:|";
- $i = 0;
+ $chm = "";
+ $chxl = "0:|";
+ $i = 0;
$counts = array();
foreach ($rows as $values) {
if ($sizes[0] < 980) {
@@ -4634,8 +4659,8 @@ class Stats {
} else {
$years = "";
}
- $max = 0;
- $tot = 0;
+ $max = 0;
+ $tot = 0;
$rows = $this->runSql(
"SELECT SQL_CACHE" .
" COUNT(*) AS count," .
@@ -4665,9 +4690,9 @@ class Stats {
if ($unknown > $max) {
$max = $unknown;
}
- $chm = "";
- $chxl = "0:|";
- $i = 0;
+ $chm = "";
+ $chxl = "0:|";
+ $i = 0;
$counts = array();
foreach ($rows as $values) {
if ($sizes[0] < 980) {
@@ -4679,7 +4704,7 @@ class Stats {
$i++;
}
$counts[] = round(4095 * $unknown / ($max + 1));
- $chd = $this->arrayToExtendedEncoding($counts);
+ $chd = $this->arrayToExtendedEncoding($counts);
$chm .= 't' . $unknown . ',000000,0,' . $i . ',11,1';
$chxl .= I18N::translateContext('unknown century', 'Unknown') . "|1:||" . I18N::translate('century') . "|2:|0|";
$step = $max + 1;
@@ -4699,6 +4724,7 @@ class Stats {
$chxl .= $n . "|";
}
$chxl .= "3:||" . I18N::translate('Total families') . "|";
+
return "<img src=\"https://chart.googleapis.com/chart?cht=bvg&amp;chs={$sizes[0]}x{$sizes[1]}&amp;chf=bg,s,ffffff00|c,s,ffffff00&amp;chm=D,FF0000,0,0:" . ($i - 1) . ",3,1|{$chm}&amp;chd=e:{$chd}&amp;chco=0000FF,ffffff00&amp;chbh=30,3&amp;chxt=x,x,y,y&amp;chxl=" . rawurlencode($chxl) . "\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . I18N::translate('Number of families without children') . "\" title=\"" . I18N::translate('Number of families without children') . "\" />";
}
@@ -4761,6 +4787,7 @@ class Stats {
if ($type === 'list') {
return '<ul>' . $top10 . '</ul>';
}
+
return $top10;
}
@@ -4784,7 +4811,7 @@ class Stats {
/**
* @param string $type
- * @param boolean $show_tot
+ * @param bool $show_tot
* @param string[] $params
*
* @return string
@@ -4832,6 +4859,7 @@ class Stats {
foreach (array_keys($surname_list) as $surname) {
$surnames = array_merge($surnames, QueryName::surnames($this->tree, $surname, '', false, false));
}
+
return format_surname_list($surnames, ($type == 'list' ? 1 : 2), $show_tot, 'indilist.php', $this->tree);
}
@@ -4840,6 +4868,7 @@ class Stats {
*/
public function getCommonSurname() {
$surnames = array_keys(get_top_surnames($this->tree->getTreeId(), 1, 1));
+
return array_shift($surnames);
}
@@ -4890,7 +4919,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if (isset($params[0]) && $params[0] != '') {
$size = strtolower($params[0]);
} else {
@@ -4916,7 +4944,7 @@ class Stats {
} else {
$maxtoshow = 7;
}
- $sizes = explode('x', $size);
+ $sizes = explode('x', $size);
$tot_indi = $this->totalIndividualsQuery();
$surnames = get_common_surnames($threshold, $this->tree);
if (count($surnames) <= 0) {
@@ -4924,7 +4952,7 @@ class Stats {
}
$SURNAME_TRADITION = $this->tree->getPreference('SURNAME_TRADITION');
uasort($surnames, __NAMESPACE__ . '\Stats::nameTotalReverseSort');
- $surnames = array_slice($surnames, 0, $maxtoshow);
+ $surnames = array_slice($surnames, 0, $maxtoshow);
$all_surnames = array();
foreach (array_keys($surnames) as $n => $surname) {
if ($n >= $maxtoshow) {
@@ -4966,14 +4994,15 @@ class Stats {
$chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
$chart_title = implode(I18N::$list_separator, $chl);
- $chl = implode('|', $chl);
+ $chl = implode('|', $chl);
+
return '<img src="https://chart.googleapis.com/chart?cht=p3&amp;chd=e:' . $chd . '&amp;chs=' . $size . '&amp;chco=' . $color_from . ',' . $color_to . '&amp;chf=bg,s,ffffff00&amp;chl=' . rawurlencode($chl) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . $chart_title . '" title="' . $chart_title . '" />';
}
/**
* @param string $sex
* @param string $type
- * @param boolean $show_tot
+ * @param bool $show_tot
* @param string[] $params
*
* @return string
@@ -5085,6 +5114,7 @@ class Stats {
jQuery("#' . $table_id . '").css("visibility", "visible");
');
$lookup = array('M' => I18N::translate('Male'), 'F' => I18N::translate('Female'), 'U' => I18N::translateContext('unknown gender', 'Unknown'), 'B' => I18N::translate('All'));
+
return '<table id="' . $table_id . '" class="givn-list"><thead><tr><th class="ui-state-default" colspan="3">' . $lookup[$sex] . '</th></tr><tr><th>' . I18N::translate('Name') . '</th><th>' . I18N::translate('Count') . '</th><th>COUNT</th></tr></thead><tbody>' . implode('', $common) . '</tbody></table>';
case 'list':
return '<ul>' . implode('', $common) . '</ul>';
@@ -5289,7 +5319,6 @@ class Stats {
$WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x');
$WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y');
-
if (isset($params[0]) && $params[0] != '') {
$size = strtolower($params[0]);
} else {
@@ -5310,9 +5339,9 @@ class Stats {
} else {
$maxtoshow = 7;
}
- $sizes = explode('x', $size);
+ $sizes = explode('x', $size);
$tot_indi = $this->totalIndividualsQuery();
- $given = $this->commonGivenQuery('B', 'chart');
+ $given = $this->commonGivenQuery('B', 'chart');
if (!is_array($given)) {
return '';
}
@@ -5340,7 +5369,8 @@ class Stats {
$chl[] = I18N::translate('Other') . ' - ' . I18N::number($tot_indi - $tot);
$chart_title = implode(I18N::$list_separator, $chl);
- $chl = implode('|', $chl);
+ $chl = implode('|', $chl);
+
return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_from},{$color_to}&amp;chf=bg,s,ffffff00&amp;chl=" . rawurlencode($chl) . "\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
}
@@ -5353,7 +5383,7 @@ class Stats {
$content = '';
// List active users
$NumAnonymous = 0;
- $loggedusers = array();
+ $loggedusers = array();
foreach (User::allLoggedIn() as $user) {
if (Auth::isAdmin() || $user->getPreference('visibleonline')) {
$loggedusers[] = $user;
@@ -5405,16 +5435,17 @@ class Stats {
if ($type == 'list') {
$content .= '</ul>';
}
+
return $content;
}
/**
* @param string $type
*
- * @return integer
+ * @return int
*/
private function usersLoggedInTotalQuery($type = 'all') {
- $anon = 0;
+ $anon = 0;
$visible = 0;
foreach (User::allLoggedIn() as $user) {
if (Auth::isAdmin() || $user->getPreference('visibleonline')) {
@@ -5447,21 +5478,21 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
public function usersLoggedInTotal() {
return $this->usersLoggedInTotalQuery('all');
}
/**
- * @return integer
+ * @return int
*/
public function usersLoggedInTotalAnon() {
return $this->usersLoggedInTotalQuery('anon');
}
/**
- * @return integer
+ * @return int
*/
public function usersLoggedInTotalVisible() {
return $this->usersLoggedInTotalQuery('visible');
@@ -5526,6 +5557,7 @@ class Stats {
} else {
$datestamp = I18N::dateFormat();
}
+
return timestamp_to_gedcom_date($user->getPreference('reg_timestamp'))->display(false, $datestamp);
case 'regtime':
if (is_array($params) && isset($params[0]) && $params[0] != '') {
@@ -5533,6 +5565,7 @@ class Stats {
} else {
$datestamp = str_replace('%', '', I18N::timeFormat());
}
+
return date($datestamp, $user->getPreference('reg_timestamp'));
case 'loggedin':
if (is_array($params) && isset($params[0]) && $params[0] != '') {
@@ -5545,6 +5578,7 @@ class Stats {
} else {
$no = I18N::translate('no');
}
+
return Database::prepare("SELECT SQL_NO_CACHE 1 FROM `##session` WHERE user_id=? LIMIT 1")->execute(array($user->getUserId()))->fetchOne() ? $yes : $no;
}
}
@@ -5602,7 +5636,7 @@ class Stats {
*/
public function contactWebmaster() {
$user_id = $this->tree->getPreference('WEBMASTER_USER_ID');
- $user = User::find($user_id);
+ $user = User::find($user_id);
if ($user) {
return Theme::theme()->contactLink($user);
} else {
@@ -5615,7 +5649,7 @@ class Stats {
*/
public function contactGedcom() {
$user_id = $this->tree->getPreference('CONTACT_USER_ID');
- $user = User::find($user_id);
+ $user = User::find($user_id);
if ($user) {
return Theme::theme()->contactLink($user);
} else {
@@ -5699,11 +5733,11 @@ class Stats {
if ($page_name === null) {
// index.php?ctype=gedcom
- $page_name = 'index.php';
+ $page_name = 'index.php';
$page_parameter = 'gedcom:' . ($page_parameter ? Tree::findByName($page_parameter)->getTreeId() : $this->tree->getTreeId());
} elseif ($page_name == 'index.php') {
// index.php?ctype=user
- $user = User::findByIdentifier($page_parameter);
+ $user = User::findByIdentifier($page_parameter);
$page_parameter = 'user:' . ($user ? $user->getUserId() : Auth::id());
} else {
// indi/fam/sour/etc.
@@ -5799,10 +5833,11 @@ class Stats {
if ($value < 0) {
$value = 0;
}
- $first = (int) ($value / 64);
+ $first = (int) ($value / 64);
$second = $value % 64;
$encoding .= $xencoding[(int) $first] . $xencoding[(int) $second];
}
+
return $encoding;
}
@@ -5810,7 +5845,7 @@ class Stats {
* @param array $a
* @param array $b
*
- * @return integer
+ * @return int
*/
private function nameTotalSort($a, $b) {
return $a['match'] - $b['match'];
@@ -5820,7 +5855,7 @@ class Stats {
* @param array $a
* @param array $b
*
- * @return integer
+ * @return int
*/
private function nameTotalReverseSort($a, $b) {
return $b['match'] - $a['match'];
@@ -5838,7 +5873,7 @@ class Stats {
if (isset($cache[$id])) {
return $cache[$id];
}
- $rows = Database::prepare($sql)->fetchAll(PDO::FETCH_ASSOC);
+ $rows = Database::prepare($sql)->fetchAll(PDO::FETCH_ASSOC);
$cache[$id] = $rows;
return $rows;
@@ -5871,7 +5906,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
public function totalGedcomFavorites() {
if (Module::getModuleByName('gedcom_favorites')) {
@@ -5882,7 +5917,7 @@ class Stats {
}
/**
- * @return integer
+ * @return int
*/
public function totalUserFavorites() {
if (Module::getModuleByName('user_favorites')) {
@@ -5925,12 +5960,13 @@ class Stats {
if (count($bits) < 2) {
continue;
}
- $v = array_shift($bits);
+ $v = array_shift($bits);
$cfg[$v] = implode('=', $bits);
}
- $block = $all_blocks[$block];
+ $block = $all_blocks[$block];
$block_id = Filter::getInteger('block_id');
- $content = $block->getBlock($block_id, false, $cfg);
+ $content = $block->getBlock($block_id, false, $cfg);
+
return $content;
}
@@ -6315,7 +6351,7 @@ class Stats {
/**
* century name, English => 21st, Polish => XXI, etc.
*
- * @param integer $century
+ * @param int $century
*
* @return string
*/
diff --git a/app/Theme.php b/app/Theme.php
index 57a18d7ed8..fe59856625 100644
--- a/app/Theme.php
+++ b/app/Theme.php
@@ -70,8 +70,9 @@ class Theme {
*
* @param BaseTheme|null $theme
*
- * @return BaseTheme
* @throws \LogicException
+ *
+ * @return BaseTheme
*/
public static function theme(BaseTheme $theme = null) {
diff --git a/app/Theme/AdministrationTheme.php b/app/Theme/AdministrationTheme.php
index a33e3ac220..bf56c6caf8 100644
--- a/app/Theme/AdministrationTheme.php
+++ b/app/Theme/AdministrationTheme.php
@@ -22,7 +22,7 @@ namespace Fisharebest\Webtrees;
class AdministrationTheme extends BaseTheme {
/** {@inheritdoc} */
protected function stylesheets() {
- $stylesheets = parent::stylesheets();
+ $stylesheets = parent::stylesheets();
$stylesheets[] = WT_DATATABLES_BOOTSTRAP_CSS_URL;
$stylesheets[] = WT_BOOTSTRAP_DATETIMEPICKER_CSS_URL;
$stylesheets[] = $this->assetUrl() . 'style.css';
diff --git a/app/Theme/BaseTheme.php b/app/Theme/BaseTheme.php
index 57eb1b5b04..b81ded11ac 100644
--- a/app/Theme/BaseTheme.php
+++ b/app/Theme/BaseTheme.php
@@ -26,7 +26,7 @@ abstract class BaseTheme {
/** @var string An escaped version of the "ged=XXX" URL parameter */
protected $tree_url;
- /** @var integer The number of times this page has been shown */
+ /** @var int The number of times this page has been shown */
protected $page_views;
/**
@@ -410,7 +410,7 @@ abstract class BaseTheme {
/**
* Add markup to the hit counter.
*
- * @param integer $count
+ * @param int $count
*
* @return string
*/
@@ -592,8 +592,6 @@ abstract class BaseTheme {
/**
* Allow themes to do things after initialization (since they cannot use
* the constructor).
- *
- * @return void
*/
public function hookAfterInit() {
}
@@ -629,9 +627,9 @@ abstract class BaseTheme {
/**
* Add HTML markup to create an alert
*
- * @param string $html The content of the alert
- * @param string $level One of 'success', 'info', 'warning', 'danger'
- * @param boolean $dismissible If true, add a close button.
+ * @param string $html The content of the alert
+ * @param string $level One of 'success', 'info', 'warning', 'danger'
+ * @param bool $dismissible If true, add a close button.
*
* @return string
*/
@@ -768,7 +766,6 @@ abstract class BaseTheme {
$thumbnail = '';
}
-
return
'<div data-pid="' . $individual->getXref() . '" class="person_box_template ' . $personBoxClass . ' iconz box-style0" style="width: ' . $this->parameter('compact-chart-box-x') . 'px; min-height: ' . $this->parameter('compact-chart-box-y') . 'px">' .
'<div class="compact_view">' .
@@ -926,7 +923,7 @@ abstract class BaseTheme {
foreach ($individual->getSpouseFamilies() as $family) {
$menus[] = new Menu('<strong>' . I18N::translate('Family with spouse') . '</strong>', $family->getHtmlUrl());
- $spouse = $family->getSpouse($individual);
+ $spouse = $family->getSpouse($individual);
if ($spouse && $spouse->canShowName()) {
$menus[] = new Menu($spouse->getFullName(), $spouse->getHtmlUrl());
}
@@ -960,8 +957,6 @@ abstract class BaseTheme {
* happens in a theme file, and we need to be able to change it.
*
* @param Tree|null $tree The current tree (if there is one).
- *
- * @return void
*/
final public function init(Tree $tree = null) {
$this->tree = $tree;
@@ -1791,7 +1786,7 @@ abstract class BaseTheme {
*
* @param PageController $controller
*
- * @return integer Number of views, or zero for pages that aren't logged.
+ * @return int Number of views, or zero for pages that aren't logged.
*/
protected function pageViews(PageController $controller) {
if ($this->tree && $this->tree->getPreference('SHOW_COUNTER')) {
@@ -1816,7 +1811,7 @@ abstract class BaseTheme {
*
* @param string $parameter_name
*
- * @return string|integer|float
+ * @return string|int|float
*/
public function parameter($parameter_name) {
$parameters = array(
@@ -1987,8 +1982,6 @@ abstract class BaseTheme {
/**
* Send any HTTP headers.
- *
- * @return void
*/
public function sendHeaders() {
header('Content-Type: text/html; charset=UTF-8');
diff --git a/app/Theme/ColorsTheme.php b/app/Theme/ColorsTheme.php
index 301bbbe238..35805f2308 100644
--- a/app/Theme/ColorsTheme.php
+++ b/app/Theme/ColorsTheme.php
@@ -57,22 +57,22 @@ class ColorsTheme extends CloudsTheme {
*/
public function hookAfterInit() {
$this->palettes = array(
- 'aquamarine' => /* I18N: The name of a colour-scheme */ I18N::translate('Aqua Marine'),
- 'ash' => /* I18N: The name of a colour-scheme */ I18N::translate('Ash'),
- 'belgianchocolate'=> /* I18N: The name of a colour-scheme */ I18N::translate('Belgian Chocolate'),
- 'bluelagoon' => /* I18N: The name of a colour-scheme */ I18N::translate('Blue Lagoon'),
- 'bluemarine' => /* I18N: The name of a colour-scheme */ I18N::translate('Blue Marine'),
- 'coffeeandcream' => /* I18N: The name of a colour-scheme */ I18N::translate('Coffee and Cream'),
- 'coldday' => /* I18N: The name of a colour-scheme */ I18N::translate('Cold Day'),
- 'greenbeam' => /* I18N: The name of a colour-scheme */ I18N::translate('Green Beam'),
- 'mediterranio' => /* I18N: The name of a colour-scheme */ I18N::translate('Mediterranio'),
- 'mercury' => /* I18N: The name of a colour-scheme */ I18N::translate('Mercury'),
- 'nocturnal' => /* I18N: The name of a colour-scheme */ I18N::translate('Nocturnal'),
- 'olivia' => /* I18N: The name of a colour-scheme */ I18N::translate('Olivia'),
- 'pinkplastic' => /* I18N: The name of a colour-scheme */ I18N::translate('Pink Plastic'),
- 'sage' => /* I18N: The name of a colour-scheme */ I18N::translate('Sage'),
- 'shinytomato' => /* I18N: The name of a colour-scheme */ I18N::translate('Shiny Tomato'),
- 'tealtop' => /* I18N: The name of a colour-scheme */ I18N::translate('Teal Top'),
+ 'aquamarine' => /* I18N: The name of a colour-scheme */ I18N::translate('Aqua Marine'),
+ 'ash' => /* I18N: The name of a colour-scheme */ I18N::translate('Ash'),
+ 'belgianchocolate' => /* I18N: The name of a colour-scheme */ I18N::translate('Belgian Chocolate'),
+ 'bluelagoon' => /* I18N: The name of a colour-scheme */ I18N::translate('Blue Lagoon'),
+ 'bluemarine' => /* I18N: The name of a colour-scheme */ I18N::translate('Blue Marine'),
+ 'coffeeandcream' => /* I18N: The name of a colour-scheme */ I18N::translate('Coffee and Cream'),
+ 'coldday' => /* I18N: The name of a colour-scheme */ I18N::translate('Cold Day'),
+ 'greenbeam' => /* I18N: The name of a colour-scheme */ I18N::translate('Green Beam'),
+ 'mediterranio' => /* I18N: The name of a colour-scheme */ I18N::translate('Mediterranio'),
+ 'mercury' => /* I18N: The name of a colour-scheme */ I18N::translate('Mercury'),
+ 'nocturnal' => /* I18N: The name of a colour-scheme */ I18N::translate('Nocturnal'),
+ 'olivia' => /* I18N: The name of a colour-scheme */ I18N::translate('Olivia'),
+ 'pinkplastic' => /* I18N: The name of a colour-scheme */ I18N::translate('Pink Plastic'),
+ 'sage' => /* I18N: The name of a colour-scheme */ I18N::translate('Sage'),
+ 'shinytomato' => /* I18N: The name of a colour-scheme */ I18N::translate('Shiny Tomato'),
+ 'tealtop' => /* I18N: The name of a colour-scheme */ I18N::translate('Teal Top'),
);
uasort($this->palettes, __NAMESPACE__ . '\I18N::strcasecmp');
diff --git a/app/Tree.php b/app/Tree.php
index 81183e71f1..33953b8e0a 100644
--- a/app/Tree.php
+++ b/app/Tree.php
@@ -22,7 +22,7 @@ use PDOException;
* Class Tree - Provide an interface to the wt_gedcom table
*/
class Tree {
- /** @var integer The tree's ID number */
+ /** @var int The tree's ID number */
private $tree_id;
/** @var string The tree's name */
@@ -53,9 +53,9 @@ class Tree {
* Create a tree object. This is a private constructor - it can only
* be called from Tree::getAll() to ensure proper initialisation.
*
- * @param integer $tree_id
- * @param string $tree_name
- * @param string $tree_title
+ * @param int $tree_id
+ * @param string $tree_name
+ * @param string $tree_title
*/
private function __construct($tree_id, $tree_name, $tree_title) {
$this->tree_id = $tree_id;
@@ -74,7 +74,7 @@ class Tree {
'priv_user' => Auth::PRIV_USER,
'priv_none' => Auth::PRIV_NONE,
'priv_hide' => Auth::PRIV_HIDE,
- 'tree_id' => $this->tree_id
+ 'tree_id' => $this->tree_id,
))->fetchAll();
foreach ($rows as $row) {
@@ -89,13 +89,12 @@ class Tree {
}
}
-
}
/**
* The ID of this tree
*
- * @return integer
+ * @return int
*/
public function getTreeId() {
return $this->tree_id;
@@ -284,7 +283,7 @@ class Tree {
'user_id' => $user->getUserId(),
'tree_id' => $this->tree_id,
'setting_name' => $setting_name,
- 'setting_value' => $setting_value
+ 'setting_value' => $setting_value,
));
}
// Update our cache
@@ -301,7 +300,7 @@ class Tree {
*
* @param User $user
*
- * @return boolean
+ * @return bool
*/
public function canAcceptChanges(User $user) {
return Auth::isModerator($this, $user);
@@ -315,7 +314,7 @@ class Tree {
public static function getAll() {
if (self::$trees === null) {
self::$trees = array();
- $rows = Database::prepare(
+ $rows = Database::prepare(
"SELECT SQL_CACHE g.gedcom_id AS tree_id, g.gedcom_name AS tree_name, gs1.setting_value AS tree_title" .
" FROM `##gedcom` g" .
" LEFT JOIN `##gedcom_setting` gs1 ON (g.gedcom_id=gs1.gedcom_id AND gs1.setting_name='title')" .
@@ -344,10 +343,11 @@ class Tree {
/**
* Find the tree with a specific ID.
*
- * @param integer $tree_id
+ * @param int $tree_id
*
- * @return Tree
* @throws \DomainException
+ *
+ * @return Tree
*/
public static function findById($tree_id) {
foreach (self::getAll() as $tree) {
@@ -568,7 +568,7 @@ class Tree {
$note = I18N::translate('Edit this individual and replace their details with your own.');
Database::prepare("INSERT INTO `##gedcom_chunk` (gedcom_id, chunk_data) VALUES (?, ?)")->execute(array(
$tree_id,
- "0 HEAD\n1 CHAR UTF-8\n0 @I1@ INDI\n1 NAME {$john_doe}\n1 SEX M\n1 BIRT\n2 DATE 01 JAN 1850\n2 NOTE {$note}\n0 TRLR\n"
+ "0 HEAD\n1 CHAR UTF-8\n0 @I1@ INDI\n1 NAME {$john_doe}\n1 SEX M\n1 BIRT\n2 DATE 01 JAN 1850\n2 NOTE {$note}\n0 TRLR\n",
));
// Set the initial blocks
@@ -594,11 +594,10 @@ class Tree {
return (bool) Database::prepare(
"SELECT 1 FROM `##change` WHERE status = 'pending' AND gedcom_id = :tree_id"
)->execute(array(
- 'tree_id' => $this->tree_id
+ 'tree_id' => $this->tree_id,
))->fetchOne();
}
-
/**
* Delete all the genealogy data from a tree - in preparation for importing
* new data. Optionally retain the media data, for when the user has been
@@ -675,7 +674,7 @@ class Tree {
'tree_id_2' => $this->tree_id,
'tree_id_3' => $this->tree_id,
'tree_id_4' => $this->tree_id,
- 'tree_id_5' => $this->tree_id
+ 'tree_id_5' => $this->tree_id,
));
$buffer = reformat_record_export(gedcom_header($this));
@@ -818,8 +817,9 @@ class Tree {
*
* @param string $gedcom
*
- * @return GedcomRecord
* @throws \Exception
+ *
+ * @return GedcomRecord
*/
public function createRecord($gedcom) {
if (preg_match('/^0 @(' . WT_REGEX_XREF . ')@ (' . WT_REGEX_TAG . ')/', $gedcom, $match)) {
@@ -851,7 +851,7 @@ class Tree {
$this->tree_id,
$xref,
$gedcom,
- Auth::id()
+ Auth::id(),
));
Log::addEditLog('Create: ' . $type . ' ' . $xref);
diff --git a/app/User.php b/app/User.php
index c635482775..224c62eef1 100644
--- a/app/User.php
+++ b/app/User.php
@@ -41,7 +41,7 @@ class User {
/**
* Find the user with a specified user_id.
*
- * @param integer|null $user_id
+ * @param int|null $user_id
*
* @return User|null
*/
@@ -89,7 +89,7 @@ class User {
" WHERE gedcom_id = :tree_id AND setting_name = 'gedcomid' AND setting_value = :xref"
)->execute(array(
'tree_id' => $individual->getTree()->getTreeId(),
- 'xref' => $individual->getXref()
+ 'xref' => $individual->getXref(),
))->fetchOne();
return self::find($user_id);
@@ -140,13 +140,14 @@ class User {
"INSERT INTO `##block` (`user_id`, `location`, `block_order`, `module_name`)" .
" SELECT :user_id , `location`, `block_order`, `module_name` FROM `##block` WHERE `user_id` = -1"
)->execute(array('user_id' => $user->getUserId()));
+
return $user;
}
/**
* Get a count of all users.
*
- * @return integer
+ * @return int
*/
public static function count() {
return (int) Database::prepare(
@@ -275,10 +276,9 @@ class User {
}
/** Validate a supplied password
- *
* @param string $password
*
- * @return boolean
+ * @return bool
*/
public function checkPassword($password) {
$password_hash = Database::prepare(
@@ -289,6 +289,7 @@ class User {
if (password_needs_rehash($password_hash, PASSWORD_DEFAULT)) {
$this->setPassword($password);
}
+
return true;
} else {
return false;
diff --git a/autocomplete.php b/autocomplete.php
index 5e8f6971cf..1d2dd2dfbe 100644
--- a/autocomplete.php
+++ b/autocomplete.php
@@ -80,7 +80,7 @@ case 'ASSO': // Associates of an individuals, whose name contains the search ter
}
}
echo json_encode($data);
-
+
return;
case 'CEME': // Cemetery fields, that contain the search term
@@ -105,7 +105,7 @@ case 'CEME': // Cemetery fields, that contain the search term
}
}
echo json_encode($data);
-
+
return;
case 'FAM': // Families, whose name contains the search terms
@@ -125,7 +125,7 @@ case 'FAM': // Families, whose name contains the search terms
}
}
echo json_encode($data);
-
+
return;
case 'GIVN': // Given names, that start with the search term
@@ -142,7 +142,7 @@ case 'GIVN': // Given names, that start with the search term
'collation' => I18N::collation(),
))->fetchOneColumn()
);
-
+
return;
case 'INDI': // Individuals, whose name contains the search terms
@@ -168,7 +168,7 @@ case 'INDI': // Individuals, whose name contains the search terms
}
}
echo json_encode($data);
-
+
return;
case 'NOTE': // Notes which contain the search terms
@@ -183,7 +183,7 @@ case 'NOTE': // Notes which contain the search terms
}
}
echo json_encode($data);
-
+
return;
case 'OBJE':
@@ -198,7 +198,7 @@ case 'OBJE':
}
}
echo json_encode($data);
-
+
return;
case 'PLAC': // Place names (with hierarchy), that include the search term
@@ -236,7 +236,7 @@ case 'PLAC': // Place names (with hierarchy), that include the search term
}
}
echo json_encode($data);
-
+
return;
case 'PLAC2': // Place names (without hierarchy), that include the search term
@@ -270,7 +270,7 @@ case 'REPO': // Repositories, that include the search terms
}
}
echo json_encode($data);
-
+
return;
case 'REPO_NAME': // Repository names, that include the search terms
@@ -285,7 +285,7 @@ case 'REPO_NAME': // Repository names, that include the search terms
}
}
echo json_encode($data);
-
+
return;
case 'SOUR': // Sources, that include the search terms
@@ -302,7 +302,7 @@ case 'SOUR': // Sources, that include the search terms
}
}
echo json_encode($data);
-
+
return;
case 'PAGE': // Citation details, for a given source, that contain the search term
@@ -353,7 +353,7 @@ case 'PAGE': // Citation details, for a given source, that contain the search te
// back into integers.
$data = array_values(array_unique($data));
echo json_encode($data);
-
+
return;
case 'SOUR_TITL': // Source titles, that include the search terms
@@ -377,7 +377,7 @@ case 'SOUR_TITL': // Source titles, that include the search terms
}
}
echo json_encode($data);
-
+
return;
case 'SURN': // Surnames, that start with the search term
@@ -394,7 +394,7 @@ case 'SURN': // Surnames, that start with the search term
'collation' => I18N::collation(),
))->fetchOneColumn()
);
-
+
return;
case 'IFSRO':
@@ -459,7 +459,7 @@ case 'IFSRO':
}
}
echo json_encode($data);
-
+
return;
case 'IFS':
@@ -497,7 +497,7 @@ case 'IFS':
}
}
echo json_encode($data);
-
+
return;
}
diff --git a/block_edit.php b/block_edit.php
index 1bb4600fd6..d16a54ebe4 100644
--- a/block_edit.php
+++ b/block_edit.php
@@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'block_edit.php');
require './includes/session.php';
$block_id = Filter::getInteger('block_id');
-$block = Database::prepare(
+$block = Database::prepare(
"SELECT SQL_CACHE * FROM `##block` WHERE block_id=?"
)->execute(array($block_id))->fetchOneRow();
diff --git a/calendar.php b/calendar.php
index 2df36fcfa2..80d145bed5 100644
--- a/calendar.php
+++ b/calendar.php
@@ -635,8 +635,8 @@ function apply_filter($facts, $filterof, $filtersx) {
/**
* Format an anniversary display.
*
- * @param Fact $fact
- * @param boolean $show_places
+ * @param Fact $fact
+ * @param bool $show_places
*
* @return string
*/
@@ -656,9 +656,9 @@ function calendar_fact_text(Fact $fact, $show_places) {
* Format a list of facts for display
*
* @param Fact[] $list
- * @param string $tag1
- * @param string $tag2
- * @param boolean $show_sex_symbols
+ * @param string $tag1
+ * @param string $tag2
+ * @param bool $show_sex_symbols
*
* @return string
*/
diff --git a/edit_changes.php b/edit_changes.php
index 1e57f8ff4a..4b65817916 100644
--- a/edit_changes.php
+++ b/edit_changes.php
@@ -132,8 +132,8 @@ if ($changed_gedcoms) {
" ORDER BY gedcom_id, c.xref, c.change_id"
)->fetchAll();
- $output = '<br><br><table class="list_table">';
- $prev_xref = null;
+ $output = '<br><br><table class="list_table">';
+ $prev_xref = null;
$prev_gedcom_id = null;
foreach ($changes as $change) {
$tree = Tree::findById($change->gedcom_id);
diff --git a/edit_interface.php b/edit_interface.php
index 1a309f2451..6070ead99d 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -97,7 +97,7 @@ case 'updateraw':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=editraw&xref=' . $xref);
-
+
return;
}
@@ -150,7 +150,7 @@ case 'editrawfact':
$controller
->pageHeader()
->addInlineJavascript('closePopupAndReloadParent();');
-
+
return;
}
@@ -193,7 +193,7 @@ case 'updaterawfact':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=editrawfact&xref=' . $xref . '&fact_id=' . $fact_id);
-
+
return;
}
@@ -212,7 +212,7 @@ case 'updaterawfact':
$controller
->pageHeader()
->addInlineJavascript('closePopupAndReloadParent();');
-
+
return;
}
@@ -249,7 +249,7 @@ case 'edit':
$controller
->pageHeader()
->addInlineJavascript('closePopupAndReloadParent();');
-
+
return;
}
@@ -397,7 +397,7 @@ case 'update':
$prev_action = Filter::post('prev_action', 'add|edit|addname|editname');
$fact_type = Filter::post('fact_type', WT_REGEX_TAG);
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=' . $prev_action . '&xref=' . $xref . '&fact_id=' . $fact_id . '&fact=' . $fact_type);
-
+
return;
}
@@ -470,7 +470,7 @@ case 'update':
}
if (!empty($NOTE)) {
$tempnote = preg_split('/\r?\n/', trim($NOTE) . "\n"); // make sure only one line ending on the end
- $title[] = '0 @' . $xref . '@ NOTE ' . array_shift($tempnote);
+ $title[] = '0 @' . $xref . '@ NOTE ' . array_shift($tempnote);
foreach ($tempnote as &$line) {
$line = trim('1 CONT ' . $line, ' ');
}
@@ -525,7 +525,7 @@ case 'add_child_to_family_action':
if (!Filter::checkCsrf()) {
$gender = Filter::get('gender', '[MFU]', 'U');
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_child_to_family&xref=' . $xref . '&gender=' . $gender);
-
+
return;
}
@@ -602,7 +602,7 @@ case 'add_child_to_individual_action':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_child_to_individual&xref=' . $xref);
-
+
return;
}
@@ -685,7 +685,7 @@ case 'add_parent_to_individual_action':
if (!Filter::checkCsrf()) {
$gender = Filter::get('gender', '[MFU]', 'U');
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_parent_to_individual&xref=' . $xref . '&gender=' . $gender);
-
+
return;
}
@@ -755,7 +755,7 @@ case 'add_unlinked_indi_action':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_unlinked_indi');
-
+
return;
}
@@ -820,7 +820,7 @@ case 'add_spouse_to_individual_action':
if (!Filter::checkCsrf()) {
$famtag = Filter::get('famtag', 'HUSB|WIFE');
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_spouse_to_individual&xref=' . $xref . '&famtag=' . $famtag);
-
+
return;
}
@@ -912,7 +912,7 @@ case 'add_spouse_to_family_action':
if (!Filter::checkCsrf()) {
$famtag = Filter::get('famtag', 'HUSB|WIFE');
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=add_spouse_to_family&xref=' . $xref . '&famtag=' . $famtag);
-
+
return;
}
@@ -1024,7 +1024,7 @@ case 'linkfamaction':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=addfamlink&xref=' . $xref);
-
+
return;
}
@@ -1137,7 +1137,7 @@ case 'linkspouseaction':
if (!Filter::checkCsrf()) {
$famtag = Filter::get('famtag', 'HUSB|WIFE');
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=linkspouse&xref=' . $xref . '&famtag=' . $famtag);
-
+
return;
}
@@ -1275,12 +1275,12 @@ case 'addsourceaction':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=addnewsource');
-
+
return;
}
$newgedrec = '0 @XREF@ SOUR';
- $ABBR = Filter::post('ABBR');
+ $ABBR = Filter::post('ABBR');
if ($ABBR) {
$newgedrec .= "\n1 ABBR " . $ABBR;
}
@@ -1380,7 +1380,7 @@ case 'addnoteaction':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=addnewnote');
-
+
return;
}
@@ -1403,7 +1403,7 @@ case 'addnoteaction_assisted':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=addnewnote_assisted');
-
+
return;
}
@@ -1488,7 +1488,7 @@ case 'editnoteaction':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=editnote&xref=' . $xref);
-
+
return;
}
@@ -1576,7 +1576,7 @@ case 'addrepoaction':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=addnewrepository');
-
+
return;
}
@@ -1584,7 +1584,7 @@ case 'addrepoaction':
->setPageTitle(I18N::translate('Create a new repository'))
->pageHeader();
- $gedrec = '0 @XREF@ REPO';
+ $gedrec = '0 @XREF@ REPO';
$REPO_NAME = Filter::post('REPO_NAME');
if ($REPO_NAME) {
$gedrec .= "\n1 NAME " . $REPO_NAME;
@@ -1641,7 +1641,7 @@ case 'editname':
$controller
->pageHeader()
->addInlineJavascript('closePopupAndReloadParent();');
-
+
return;
}
@@ -1731,7 +1731,7 @@ case 'reorder_media':
<input type="hidden" name="xref" value="<?php echo $xref; ?>">
<?php echo Filter::getCsrf(); ?>
<ul id="reorder_media_list">
- <?php foreach ($sort_obje as $n=>$obje) { ?>
+ <?php foreach ($sort_obje as $n => $obje) { ?>
<li class="facts_value" style="list-style:none;cursor:move;margin-bottom:2px;" id="li_<?php echo $obje->getXref(); ?>">
<table class="pic">
<tr>
@@ -1766,7 +1766,7 @@ case 'reorder_media_update':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=reorder_media_&xref=' . $xref);
-
+
return;
}
@@ -1786,7 +1786,7 @@ case 'reorder_media_update':
}
if (is_array($order1)) {
// Add new _WT_OBJE_SORT records
- foreach ($order1 as $xref=>$n) {
+ foreach ($order1 as $xref => $n) {
$facts[] = '1 _WT_OBJE_SORT @' . $xref . '@';
}
}
@@ -1829,7 +1829,7 @@ case 'reorder_children':
$ids[] = $child->getXref();
}
$children = array();
- foreach ($family->getChildren() as $k=>$child) {
+ foreach ($family->getChildren() as $k => $child) {
$bdate = $child->getEstimatedBirthDate();
if ($bdate->isOK()) {
$sortkey = $bdate->julianDay();
@@ -1841,9 +1841,9 @@ case 'reorder_children':
if ($option === 'bybirth') {
asort($children);
}
- $i = 0;
+ $i = 0;
$show_full = 1; // Force details to show for each child
- foreach ($children as $id=>$child) {
+ foreach ($children as $id => $child) {
echo '<li style="cursor:move; margin-bottom:2px; position:relative;"';
if (!in_array($id, $ids)) {
echo ' class="facts_value new"';
@@ -1876,7 +1876,7 @@ case 'reorder_update':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=reorder_children&xref=' . $xref);
-
+
return;
}
@@ -1892,8 +1892,8 @@ case 'reorder_update':
$facts = $family->getFacts();
// Move children to the end of the record
- foreach ($order as $child=>$num) {
- foreach ($facts as $n=>$fact) {
+ foreach ($order as $child => $num) {
+ foreach ($facts as $n => $fact) {
if ($fact->getValue() === '@' . $child . '@') {
$facts[] = $fact;
unset($facts[$n]);
@@ -1924,8 +1924,8 @@ case 'changefamily':
->setPageTitle(I18N::translate('Change family members') . ' – ' . $family->getFullName())
->pageHeader();
- $father = $family->getHusband();
- $mother = $family->getWife();
+ $father = $family->getHusband();
+ $mother = $family->getWife();
$children = $family->getChildren();
?>
<div id="edit_interface-page">
@@ -2071,12 +2071,12 @@ case 'changefamily_update':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=changefamily&xref=' . $xref);
-
+
return;
}
$CHIL = array();
- for ($i = 0; ;++$i) {
+ for ($i = 0;; ++$i) {
if (isset($_POST['CHIL' . $i])) {
$CHIL[] = Filter::post('CHIL' . $i, WT_REGEX_XREF);
} else {
@@ -2097,8 +2097,8 @@ case 'changefamily_update':
$old_children = $family->getChildren();
// New family members
- $new_father = Individual::getInstance($HUSB, $WT_TREE);
- $new_mother = Individual::getInstance($WIFE, $WT_TREE);
+ $new_father = Individual::getInstance($HUSB, $WT_TREE);
+ $new_mother = Individual::getInstance($WIFE, $WT_TREE);
$new_children = array();
if (is_array($CHIL)) {
foreach ($CHIL as $child) {
@@ -2213,7 +2213,7 @@ case 'reorder_fams':
<input type="hidden" name="option" value="bymarriage">
<?php echo Filter::getCsrf(); ?>
<ul id="reorder_list">
- <?php foreach ($fams as $n=>$family) { ?>
+ <?php foreach ($fams as $n => $family) { ?>
<li class="facts_value" style="cursor:move;margin-bottom:2px;" id="li_<?php echo $family->getXref(); ?>">
<div class="name2"><?php echo $family->getFullName(); ?></div>
<?php echo $family->formatFirstMajorFact(WT_EVENTS_MARR, 2); ?>
@@ -2238,7 +2238,7 @@ case 'reorder_fams_update':
if (!Filter::checkCsrf()) {
header('Location: ' . WT_BASE_URL . WT_SCRIPT_NAME . '?action=reorder_fams&xref=' . $xref);
-
+
return;
}
@@ -2254,8 +2254,8 @@ case 'reorder_fams_update':
$facts = $person->getFacts();
// Move families to the end of the record
- foreach ($order as $family=>$num) {
- foreach ($facts as $n=>$fact) {
+ foreach ($order as $family => $num) {
+ foreach ($facts as $n => $fact) {
if ($fact->getValue() === '@' . $family . '@') {
$facts[] = $fact;
unset($facts[$n]);
@@ -2333,7 +2333,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
if ($name_fact) {
$name_fact_id = $name_fact->getFactId();
$name_type = $name_fact->getAttribute('TYPE');
- $namerec = $name_fact->getGedcom();
+ $namerec = $name_fact->getGedcom();
// Populate the standard NAME field and subfields
foreach ($STANDARD_NAME_FACTS as $tag) {
if ($tag === 'NAME') {
@@ -2634,7 +2634,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
}
// Edit the standard name fields
- foreach ($name_fields as $tag=>$value) {
+ foreach ($name_fields as $tag => $value) {
add_simple_tag('0 ' . $tag . ' ' . $value);
}
@@ -2652,7 +2652,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
if (isset($adv_name_fields['TYPE'])) {
unset($adv_name_fields['TYPE']);
}
- foreach ($adv_name_fields as $tag=>$dummy) {
+ foreach ($adv_name_fields as $tag => $dummy) {
// Edit existing tags
if (preg_match_all('/2 ' . $tag . ' (.+)/', $namerec, $match)) {
foreach ($match[1] as $value) {
@@ -2711,7 +2711,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
$i++;
if (isset($gedlines[$i])) {
$fields = explode(' ', $gedlines[$i]);
- $level = $fields[0];
+ $level = $fields[0];
if (isset($fields[1])) {
$type = $fields[1];
}
@@ -2787,9 +2787,9 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
echo '</p>';
echo '</form>';
$controller->addInlineJavascript('
- SURNAME_TRADITION="'.$SURNAME_TRADITION . '";
- gender="'.$gender . '";
- famtag="'.$famtag . '";
+ SURNAME_TRADITION="' . $SURNAME_TRADITION . '";
+ gender="' . $gender . '";
+ famtag="' . $famtag . '";
function trim(str) {
str=str.replace(/\s\s+/g, " ");
return str.replace(/(^\s+)|(\s+$)/g, "");
diff --git a/family.php b/family.php
index 932f74beb6..38bab9085b 100644
--- a/family.php
+++ b/family.php
@@ -75,7 +75,7 @@ if ($controller->record && $controller->record->canShow()) {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This family does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
diff --git a/famlist.php b/famlist.php
index 7aee193266..0967e947ff 100644
--- a/famlist.php
+++ b/famlist.php
@@ -159,7 +159,7 @@ if (!Auth::isSearchEngine()) {
$list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
}
}
-echo '<p class="center alpha_index">', join(' | ', $list), '</p>';
+echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
// Search spiders don't get an option to show/hide the surname sublists,
// nor does it make sense on the all/unknown/surname views
@@ -248,7 +248,7 @@ if ($show === 'indi' || $show === 'surn') {
if ($show_all === 'no') {
echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
}
- echo '<p class="center alpha_index">', join(' | ', $list), '</p>';
+ echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
}
}
if ($show === 'indi') {
diff --git a/fanchart.php b/fanchart.php
index 9361bcba6b..34d5adcd53 100644
--- a/fanchart.php
+++ b/fanchart.php
@@ -115,7 +115,7 @@ $controller
if ($controller->error_message) {
echo '<p class="ui-state-error">', $controller->error_message, '</p>';
-
+
return;
}
diff --git a/find.php b/find.php
index a7e565be78..0b470639b1 100644
--- a/find.php
+++ b/find.php
@@ -117,7 +117,7 @@ echo '<script>';
<?php
echo '</script>';
-$options = array();
+$options = array();
$options["option"][] = "findindi";
$options["option"][] = "findfam";
$options["option"][] = "findmedia";
@@ -127,14 +127,14 @@ $options["option"][] = "findnote";
$options["option"][] = "findsource";
$options["option"][] = "findspecialchar";
$options["option"][] = "findfact";
-$options["form"][] = "formindi";
-$options["form"][] = "formfam";
-$options["form"][] = "formmedia";
-$options["form"][] = "formplace";
-$options["form"][] = "formrepo";
-$options["form"][] = "formnote";
-$options["form"][] = "formsource";
-$options["form"][] = "formspecialchar";
+$options["form"][] = "formindi";
+$options["form"][] = "formfam";
+$options["form"][] = "formmedia";
+$options["form"][] = "formplace";
+$options["form"][] = "formrepo";
+$options["form"][] = "formnote";
+$options["form"][] = "formsource";
+$options["form"][] = "formspecialchar";
echo '<div id="find-page"><h3>', $controller->getPageTitle(), '</h3>';
@@ -142,7 +142,7 @@ echo '<div id="find-page"><h3>', $controller->getPageTitle(), '</h3>';
if ($type == "indi") {
echo '<div id="find-header">
<form name="filterindi" method="get" onsubmit="return checknames(this);" action="find.php">
- <input type="hidden" name="callback" value="'.$callback . '">
+ <input type="hidden" name="callback" value="' . $callback . '">
<input type="hidden" name="action" value="filter">
<input type="hidden" name="type" value="indi">
<span>', /* I18N: Label for search field */ I18N::translate('Name contains'), '&nbsp;</span>
@@ -159,7 +159,7 @@ if ($type == "indi") {
if ($type == "fam") {
echo '<div id="find-header">
<form name="filterfam" method="get" onsubmit="return checknames(this);" action="find.php">
- <input type="hidden" name="callback" value="'.$callback . '">
+ <input type="hidden" name="callback" value="' . $callback . '">
<input type="hidden" name="action" value="filter">
<input type="hidden" name="type" value="fam">
<span>', I18N::translate('Name contains'), '&nbsp;</span>
@@ -276,7 +276,7 @@ if ($type == 'specialchar') {
<form name="filterspecialchar" method="get" action="find.php">
<input type="hidden" name="action" value="filter">
<input type="hidden" name="type" value="specialchar">
- <input type="hidden" name="callback" value="'.$callback . '">
+ <input type="hidden" name="callback" value="' . $callback . '">
<p><select id="language_filter" name="language_filter" onchange="submit();">
<option value="">', I18N::translate('Change language'), '</option>';
$language_options = '';
@@ -302,9 +302,9 @@ if ($type == "facts") {
<table class="list_table width100" border="0">
<tr><td class="list_label" style="padding: 5px; font-weight: normal; white-space: normal;">';
- $all = strlen($qs) ? explode(',', strtoupper($qs)) : array();
+ $all = strlen($qs) ? explode(',', strtoupper($qs)) : array();
$preselDefault = array();
- $preselCustom = array();
+ $preselCustom = array();
foreach ($all as $one) {
if (GedcomTag::isTag($one)) {
$preselDefault[] = $one;
@@ -471,7 +471,7 @@ if ($type == "facts") {
}
if ($action == "filter") {
- $filter = trim($filter);
+ $filter = trim($filter);
$filter_array = explode(' ', preg_replace('/ {2,}/', ' ', $filter));
// Output Individual
diff --git a/gedrecord.php b/gedrecord.php
index df530ca1b7..06d31d0bed 100644
--- a/gedrecord.php
+++ b/gedrecord.php
@@ -39,7 +39,7 @@ if (
$obj instanceof Media
) {
header('Location: ' . WT_BASE_URL . $obj->getRawUrl());
-
+
return;
} elseif (!$obj || !$obj->canShow()) {
$controller->pageHeader();
diff --git a/help_text.php b/help_text.php
index 895ad66eb4..901fd0d86a 100644
--- a/help_text.php
+++ b/help_text.php
@@ -36,78 +36,78 @@ switch ($help) {
case 'DATE':
$title = GedcomTag::getLabel('DATE');
$dates = array(
- '1900' =>new Date('1900'),
- 'JAN 1900' =>new Date('JAN 1900'),
- 'FEB 1900' =>new Date('FEB 1900'),
- 'MAR 1900' =>new Date('MAR 1900'),
- 'APR 1900' =>new Date('APR 1900'),
- 'MAY 1900' =>new Date('MAY 1900'),
- 'JUN 1900' =>new Date('JUN 1900'),
- 'JUL 1900' =>new Date('JUL 1900'),
- 'AUG 1900' =>new Date('AUG 1900'),
- 'SEP 1900' =>new Date('SEP 1900'),
- 'OCT 1900' =>new Date('OCT 1900'),
- 'NOV 1900' =>new Date('NOV 1900'),
- 'DEC 1900' =>new Date('DEC 1900'),
- '11 DEC 1913' =>new Date('11 DEC 1913'),
- '01 FEB 2003' =>new Date('01 FEB 2003'),
- 'ABT 1900' =>new Date('ABT 1900'),
- 'EST 1900' =>new Date('EST 1900'),
- 'CAL 1900' =>new Date('CAL 1900'),
- 'INT 1900 (...)' =>new Date('INT 1900 (...)'),
- '@#DJULIAN@ 44 B.C.' =>new Date('@#DJULIAN@ 44 B.C.'),
- '@#DJULIAN@ 14 JAN 1700' =>new Date('@#DJULIAN@ 14 JAN 1700'),
- 'BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752' =>new Date('BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752'),
- '@#DJULIAN@ 20 FEB 1742/43'=>new Date('@#DJULIAN@ 20 FEB 1742/43'),
- 'FROM 1900 TO 1910' =>new Date('FROM 1900 TO 1910'),
- 'FROM 1900' =>new Date('FROM 1900'),
- 'TO 1910' =>new Date('TO 1910'),
- 'BET 1900 AND 1910' =>new Date('BET 1900 AND 1910'),
- 'BET JAN 1900 AND MAR 1900'=>new Date('BET JAN 1900 AND MAR 1900'),
- 'BET APR 1900 AND JUN 1900'=>new Date('BET APR 1900 AND JUN 1900'),
- 'BET JUL 1900 AND SEP 1900'=>new Date('BET JUL 1900 AND SEP 1900'),
- 'BET OCT 1900 AND DEC 1900'=>new Date('BET OCT 1900 AND DEC 1900'),
- 'AFT 1900' =>new Date('AFT 1900'),
- 'BEF 1910' =>new Date('BEF 1910'),
+ '1900' => new Date('1900'),
+ 'JAN 1900' => new Date('JAN 1900'),
+ 'FEB 1900' => new Date('FEB 1900'),
+ 'MAR 1900' => new Date('MAR 1900'),
+ 'APR 1900' => new Date('APR 1900'),
+ 'MAY 1900' => new Date('MAY 1900'),
+ 'JUN 1900' => new Date('JUN 1900'),
+ 'JUL 1900' => new Date('JUL 1900'),
+ 'AUG 1900' => new Date('AUG 1900'),
+ 'SEP 1900' => new Date('SEP 1900'),
+ 'OCT 1900' => new Date('OCT 1900'),
+ 'NOV 1900' => new Date('NOV 1900'),
+ 'DEC 1900' => new Date('DEC 1900'),
+ '11 DEC 1913' => new Date('11 DEC 1913'),
+ '01 FEB 2003' => new Date('01 FEB 2003'),
+ 'ABT 1900' => new Date('ABT 1900'),
+ 'EST 1900' => new Date('EST 1900'),
+ 'CAL 1900' => new Date('CAL 1900'),
+ 'INT 1900 (...)' => new Date('INT 1900 (...)'),
+ '@#DJULIAN@ 44 B.C.' => new Date('@#DJULIAN@ 44 B.C.'),
+ '@#DJULIAN@ 14 JAN 1700' => new Date('@#DJULIAN@ 14 JAN 1700'),
+ 'BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752' => new Date('BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752'),
+ '@#DJULIAN@ 20 FEB 1742/43' => new Date('@#DJULIAN@ 20 FEB 1742/43'),
+ 'FROM 1900 TO 1910' => new Date('FROM 1900 TO 1910'),
+ 'FROM 1900' => new Date('FROM 1900'),
+ 'TO 1910' => new Date('TO 1910'),
+ 'BET 1900 AND 1910' => new Date('BET 1900 AND 1910'),
+ 'BET JAN 1900 AND MAR 1900' => new Date('BET JAN 1900 AND MAR 1900'),
+ 'BET APR 1900 AND JUN 1900' => new Date('BET APR 1900 AND JUN 1900'),
+ 'BET JUL 1900 AND SEP 1900' => new Date('BET JUL 1900 AND SEP 1900'),
+ 'BET OCT 1900 AND DEC 1900' => new Date('BET OCT 1900 AND DEC 1900'),
+ 'AFT 1900' => new Date('AFT 1900'),
+ 'BEF 1910' => new Date('BEF 1910'),
// Hijri dates
- '@#DHIJRI@ 1497' =>new Date('@#DHIJRI@ 1497'),
- '@#DHIJRI@ MUHAR 1497' =>new Date('@#DHIJRI@ MUHAR 1497'),
- 'ABT @#DHIJRI@ SAFAR 1497' =>new Date('ABT @#DHIJRI@ SAFAR 1497'),
- 'BET @#DHIJRI@ RABIA 1497 AND @#DHIJRI@ RABIT 1497'=>new Date('BET @#DHIJRI@ RABIA 1497 AND @#DHIJRI@ RABIT 1497'),
- 'FROM @#DHIJRI@ JUMAA 1497 TO @#DHIJRI@ JUMAT 1497'=>new Date('FROM @#DHIJRI@ JUMAA 1497 TO @#DHIJRI@ JUMAT 1497'),
- 'AFT @#DHIJRI@ RAJAB 1497' =>new Date('AFT @#DHIJRI@ RAJAB 1497'),
- 'BEF @#DHIJRI@ SHAAB 1497' =>new Date('BEF @#DHIJRI@ SHAAB 1497'),
- 'ABT @#DHIJRI@ RAMAD 1497' =>new Date('ABT @#DHIJRI@ RAMAD 1497'),
- 'FROM @#DHIJRI@ SHAWW 1497'=>new Date('FROM @#DHIJRI@ SHAWW 1497'),
- 'TO @#DHIJRI@ DHUAQ 1497' =>new Date('TO @#DHIJRI@ DHUAQ 1497'),
- '@#DHIJRI@ 03 DHUAH 1497' =>new Date('@#DHIJRI@ 03 DHUAH 1497'),
+ '@#DHIJRI@ 1497' => new Date('@#DHIJRI@ 1497'),
+ '@#DHIJRI@ MUHAR 1497' => new Date('@#DHIJRI@ MUHAR 1497'),
+ 'ABT @#DHIJRI@ SAFAR 1497' => new Date('ABT @#DHIJRI@ SAFAR 1497'),
+ 'BET @#DHIJRI@ RABIA 1497 AND @#DHIJRI@ RABIT 1497' => new Date('BET @#DHIJRI@ RABIA 1497 AND @#DHIJRI@ RABIT 1497'),
+ 'FROM @#DHIJRI@ JUMAA 1497 TO @#DHIJRI@ JUMAT 1497' => new Date('FROM @#DHIJRI@ JUMAA 1497 TO @#DHIJRI@ JUMAT 1497'),
+ 'AFT @#DHIJRI@ RAJAB 1497' => new Date('AFT @#DHIJRI@ RAJAB 1497'),
+ 'BEF @#DHIJRI@ SHAAB 1497' => new Date('BEF @#DHIJRI@ SHAAB 1497'),
+ 'ABT @#DHIJRI@ RAMAD 1497' => new Date('ABT @#DHIJRI@ RAMAD 1497'),
+ 'FROM @#DHIJRI@ SHAWW 1497' => new Date('FROM @#DHIJRI@ SHAWW 1497'),
+ 'TO @#DHIJRI@ DHUAQ 1497' => new Date('TO @#DHIJRI@ DHUAQ 1497'),
+ '@#DHIJRI@ 03 DHUAH 1497' => new Date('@#DHIJRI@ 03 DHUAH 1497'),
// French dates
- '@#DFRENCH R@ 12' =>new Date('@#DFRENCH R@ 12'),
- '@#DFRENCH R@ VEND 12' =>new Date('@#DFRENCH R@ VEND 12'),
- 'ABT @#DFRENCH R@ BRUM 12' =>new Date('ABT @#DFRENCH R@ BRUM 12'),
- 'BET @#DFRENCH R@ FRIM 12 AND @#DFRENCH R@ NIVO 12'=>new Date('BET @#DFRENCH R@ FRIM 12 AND @#DFRENCH R@ NIVO 12'),
- 'FROM @#DFRENCH R@ PLUV 12 TO @#DFRENCH R@ VENT 12'=>new Date('FROM @#DFRENCH R@ PLUV 12 TO @#DFRENCH R@ VENT 12'),
- 'AFT @#DFRENCH R@ GERM 12' =>new Date('AFT @#DFRENCH R@ GERM 12'),
- 'BEF @#DFRENCH R@ FLOR 12' =>new Date('BEF @#DFRENCH R@ FLOR 12'),
- 'ABT @#DFRENCH R@ PRAI 12' =>new Date('ABT @#DFRENCH R@ PRAI 12'),
- 'FROM @#DFRENCH R@ MESS 12'=>new Date('FROM @#DFRENCH R@ MESS 12'),
- 'TO @#DFRENCH R@ THER 12' =>new Date('TO @#DFRENCH R@ THER 12'),
- 'EST @#DFRENCH R@ FRUC 12' =>new Date('EST @#DFRENCH R@ FRUC 12'),
- '@#DFRENCH R@ 03 COMP 12' =>new Date('@#DFRENCH R@ 03 COMP 12'),
+ '@#DFRENCH R@ 12' => new Date('@#DFRENCH R@ 12'),
+ '@#DFRENCH R@ VEND 12' => new Date('@#DFRENCH R@ VEND 12'),
+ 'ABT @#DFRENCH R@ BRUM 12' => new Date('ABT @#DFRENCH R@ BRUM 12'),
+ 'BET @#DFRENCH R@ FRIM 12 AND @#DFRENCH R@ NIVO 12' => new Date('BET @#DFRENCH R@ FRIM 12 AND @#DFRENCH R@ NIVO 12'),
+ 'FROM @#DFRENCH R@ PLUV 12 TO @#DFRENCH R@ VENT 12' => new Date('FROM @#DFRENCH R@ PLUV 12 TO @#DFRENCH R@ VENT 12'),
+ 'AFT @#DFRENCH R@ GERM 12' => new Date('AFT @#DFRENCH R@ GERM 12'),
+ 'BEF @#DFRENCH R@ FLOR 12' => new Date('BEF @#DFRENCH R@ FLOR 12'),
+ 'ABT @#DFRENCH R@ PRAI 12' => new Date('ABT @#DFRENCH R@ PRAI 12'),
+ 'FROM @#DFRENCH R@ MESS 12' => new Date('FROM @#DFRENCH R@ MESS 12'),
+ 'TO @#DFRENCH R@ THER 12' => new Date('TO @#DFRENCH R@ THER 12'),
+ 'EST @#DFRENCH R@ FRUC 12' => new Date('EST @#DFRENCH R@ FRUC 12'),
+ '@#DFRENCH R@ 03 COMP 12' => new Date('@#DFRENCH R@ 03 COMP 12'),
// Jewish dates
- '@#DHEBREW@ 5481' =>new Date('@#DHEBREW@ 5481'),
- '@#DHEBREW@ TSH 5481' =>new Date('@#DHEBREW@ TSH 5481'),
- 'ABT @#DHEBREW@ CSH 5481' =>new Date('ABT @#DHEBREW@ CSH 5481'),
- 'BET @#DHEBREW@ KSL 5481 AND @#DHEBREW@ TVT 5481'=>new Date('BET @#DHEBREW@ KSL 5481 AND @#DHEBREW@ TVT 5481'),
- 'FROM @#DHEBREW@ SHV 5481 TO @#DHEBREW@ ADR 5481'=>new Date('FROM @#DHEBREW@ SHV 5481 TO @#DHEBREW@ ADR 5481'),
- 'AFT @#DHEBREW@ ADR 5481' =>new Date('AFT @#DHEBREW@ ADR 5481'),
- 'AFT @#DHEBREW@ ADS 5480' =>new Date('AFT @#DHEBREW@ ADS 5480'),
- 'BEF @#DHEBREW@ NSN 5481' =>new Date('BEF @#DHEBREW@ NSN 5481'),
- 'ABT @#DHEBREW@ IYR 5481' =>new Date('ABT @#DHEBREW@ IYR 5481'),
- 'FROM @#DHEBREW@ SVN 5481' =>new Date('FROM @#DHEBREW@ SVN 5481'),
- 'TO @#DHEBREW@ TMZ 5481' =>new Date('TO @#DHEBREW@ TMZ 5481'),
- 'EST @#DHEBREW@ AAV 5481' =>new Date('EST @#DHEBREW@ AAV 5481'),
- '@#DHEBREW@ 03 ELL 5481' =>new Date('@#DHEBREW@ 03 ELL 5481'),
+ '@#DHEBREW@ 5481' => new Date('@#DHEBREW@ 5481'),
+ '@#DHEBREW@ TSH 5481' => new Date('@#DHEBREW@ TSH 5481'),
+ 'ABT @#DHEBREW@ CSH 5481' => new Date('ABT @#DHEBREW@ CSH 5481'),
+ 'BET @#DHEBREW@ KSL 5481 AND @#DHEBREW@ TVT 5481' => new Date('BET @#DHEBREW@ KSL 5481 AND @#DHEBREW@ TVT 5481'),
+ 'FROM @#DHEBREW@ SHV 5481 TO @#DHEBREW@ ADR 5481' => new Date('FROM @#DHEBREW@ SHV 5481 TO @#DHEBREW@ ADR 5481'),
+ 'AFT @#DHEBREW@ ADR 5481' => new Date('AFT @#DHEBREW@ ADR 5481'),
+ 'AFT @#DHEBREW@ ADS 5480' => new Date('AFT @#DHEBREW@ ADS 5480'),
+ 'BEF @#DHEBREW@ NSN 5481' => new Date('BEF @#DHEBREW@ NSN 5481'),
+ 'ABT @#DHEBREW@ IYR 5481' => new Date('ABT @#DHEBREW@ IYR 5481'),
+ 'FROM @#DHEBREW@ SVN 5481' => new Date('FROM @#DHEBREW@ SVN 5481'),
+ 'TO @#DHEBREW@ TMZ 5481' => new Date('TO @#DHEBREW@ TMZ 5481'),
+ 'EST @#DHEBREW@ AAV 5481' => new Date('EST @#DHEBREW@ AAV 5481'),
+ '@#DHEBREW@ 03 ELL 5481' => new Date('@#DHEBREW@ 03 ELL 5481'),
);
foreach ($dates as &$date) {
@@ -215,7 +215,7 @@ case 'DATE':
// This help text is used for all NAME components
case 'NAME':
$title = GedcomTag::getLabel('NAME');
- $text =
+ $text =
'<p>' .
I18N::translate('The <b>name</b> field contains the individual’s full name, as they would have spelled it or as it was recorded. This is how it will be displayed on screen. It uses standard genealogy annotations to identify different parts of the name.') .
'</p>' .
@@ -236,14 +236,14 @@ case 'NAME':
case 'SURN':
$title = GedcomTag::getLabel('SURN');
- $text = '<p>' .
+ $text = '<p>' .
I18N::translate('The <b>surname</b> field contains a name that is used for sorting and grouping. It can be different to the individual’s actual surname which is always taken from the <b>name</b> field. This field can be used to sort surnames with or without a prefix (Gogh / van Gogh) and to group spelling variations or inflections (Kowalski / Kowalska). If an individual needs to be listed under more than one surname, each name should be separated by a comma.') .
'</p>';
break;
case 'OBJE':
$title = GedcomTag::getLabel('OBJE');
- $text =
+ $text =
'<p>' .
I18N::translate('A media object is a record in the family tree which contains information about a media file. This information may include a title, a copyright notice, a transcript, privacy restrictions, etc. The media file, such as the photo or video, can be stored locally (on this webserver) or remotely (on a different webserver).') .
'</p>';
@@ -251,12 +251,12 @@ case 'OBJE':
case 'PLAC':
$title = GedcomTag::getLabel('PLAC');
- $text = I18N::translate('Places should be entered according to the standards for genealogy. In genealogy, places are recorded with the most specific information about the place first and then working up to the least specific place last, using commas to separate the different place levels. The level at which you record the place information should represent the levels of government or church where vital records for that place are kept.<br><br>For example, a place like Salt Lake City would be entered as “Salt Lake City, Salt Lake, Utah, USA”.<br><br>Let’s examine each part of this place. The first part, “Salt Lake City,” is the city or township where the event occurred. In some countries, there may be municipalities or districts inside a city which are important to note. In that case, they should come before the city. The next part, “Salt Lake,” is the county. “Utah” is the state, and “USA” is the country. It is important to note each place because genealogy records are kept by the governments of each level.<br><br>If a level of the place is unknown, you should leave a space between the commas. Suppose, in the example above, you didn’t know the county for Salt Lake City. You should then record it like this: “Salt Lake City, , Utah, USA”. Suppose you only know that an individual was born in Utah. You would enter the information like this: “, , Utah, USA”. <br><br>You can use the <b>Find Place</b> link to help you find places that already exist in the database.');
+ $text = I18N::translate('Places should be entered according to the standards for genealogy. In genealogy, places are recorded with the most specific information about the place first and then working up to the least specific place last, using commas to separate the different place levels. The level at which you record the place information should represent the levels of government or church where vital records for that place are kept.<br><br>For example, a place like Salt Lake City would be entered as “Salt Lake City, Salt Lake, Utah, USA”.<br><br>Let’s examine each part of this place. The first part, “Salt Lake City,” is the city or township where the event occurred. In some countries, there may be municipalities or districts inside a city which are important to note. In that case, they should come before the city. The next part, “Salt Lake,” is the county. “Utah” is the state, and “USA” is the country. It is important to note each place because genealogy records are kept by the governments of each level.<br><br>If a level of the place is unknown, you should leave a space between the commas. Suppose, in the example above, you didn’t know the county for Salt Lake City. You should then record it like this: “Salt Lake City, , Utah, USA”. Suppose you only know that an individual was born in Utah. You would enter the information like this: “, , Utah, USA”. <br><br>You can use the <b>Find Place</b> link to help you find places that already exist in the database.');
break;
case 'RESN':
$title = GedcomTag::getLabel('RESN');
- $text =
+ $text =
I18N::translate('Restrictions can be added to records and/or facts. They restrict who can view the data and who can edit it.') .
'<br><br>' .
I18N::translate('Note that if a user account is linked to a record, then that user will always be able to view that record.');
@@ -264,12 +264,12 @@ case 'RESN':
case 'ROMN':
$title = GedcomTag::getLabel('ROMN');
- $text = I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use a non-Latin alphabet such as Hebrew, Greek, Russian, Chinese, or Arabic to enter the name in the standard name fields, then you can use this field to enter the same name using the Latin alphabet. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Romanized”, it is not restricted to containing only characters based on the Latin alphabet. This might be of use with Japanese names, where three different alphabets may occur.');
+ $text = I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use a non-Latin alphabet such as Hebrew, Greek, Russian, Chinese, or Arabic to enter the name in the standard name fields, then you can use this field to enter the same name using the Latin alphabet. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Romanized”, it is not restricted to containing only characters based on the Latin alphabet. This might be of use with Japanese names, where three different alphabets may occur.');
break;
case '_HEB':
$title = GedcomTag::getLabel('_HEB');
- $text = I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use the Latin alphabet to enter the name in the standard name fields, then you can use this field to enter the same name in the non-Latin alphabet such as Greek, Hebrew, Russian, Arabic, or Chinese. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Hebrew”, it is not restricted to containing only Hebrew characters.');
+ $text = I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use the Latin alphabet to enter the name in the standard name fields, then you can use this field to enter the same name in the non-Latin alphabet such as Greek, Hebrew, Russian, Arabic, or Chinese. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Hebrew”, it is not restricted to containing only Hebrew characters.');
break;
//////////////////////////////////////////////////////////////////////////////
@@ -278,12 +278,12 @@ case '_HEB':
case 'annivers_year_select':
$title = I18N::translate('Year input box');
- $text = I18N::translate('This input box lets you change that year of the calendar. Type a year into the box and press <b>Enter</b> to change the calendar to that year.<br><br><b>Advanced features</b> for <b>View year</b><dl><dt><b>More than one year</b></dt><dd>You can search for dates in a range of years.<br><br>Year ranges are <u>inclusive</u>. This means that the date range extends from 1 January of the first year of the range to 31 December of the last year mentioned. Here are a few examples of year ranges:<br><br><b>1992-5</b> for all events from 1992 to 1995.<br><b>1972-89</b> for all events from 1972 to 1989.<br><b>1610-759</b> for all events from 1610 to 1759.<br><b>1880-1905</b> for all events from 1880 to 1905.<br><b>880-1105</b> for all events from 880 to 1105.<br><br>To see all the events in a given decade or century, you can use <b>?</b> in place of the final digits. For example, <b>197?</b> for all events from 1970 to 1979 or <b>16??</b> for all events from 1600 to 1699.<br><br>Selecting a range of years will change the calendar to the year view.</dd></dl>');
+ $text = I18N::translate('This input box lets you change that year of the calendar. Type a year into the box and press <b>Enter</b> to change the calendar to that year.<br><br><b>Advanced features</b> for <b>View year</b><dl><dt><b>More than one year</b></dt><dd>You can search for dates in a range of years.<br><br>Year ranges are <u>inclusive</u>. This means that the date range extends from 1 January of the first year of the range to 31 December of the last year mentioned. Here are a few examples of year ranges:<br><br><b>1992-5</b> for all events from 1992 to 1995.<br><b>1972-89</b> for all events from 1972 to 1989.<br><b>1610-759</b> for all events from 1610 to 1759.<br><b>1880-1905</b> for all events from 1880 to 1905.<br><b>880-1105</b> for all events from 880 to 1105.<br><br>To see all the events in a given decade or century, you can use <b>?</b> in place of the final digits. For example, <b>197?</b> for all events from 1970 to 1979 or <b>16??</b> for all events from 1600 to 1699.<br><br>Selecting a range of years will change the calendar to the year view.</dd></dl>');
break;
case 'edit_edit_raw':
$title = I18N::translate('Edit raw GEDCOM');
- $text =
+ $text =
I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') .
'<br><br>' .
/* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="http://wiki.webtrees.net/w/images-en/Ged551-5.pdf">http://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>');
@@ -291,23 +291,22 @@ case 'edit_edit_raw':
case 'edit_SOUR_EVEN':
$title = I18N::translate('Associate events with this source');
- $text = I18N::translate('Each source records specific events, generally for a given date range and for a place jurisdiction. For example a Census records census events and church records record birth, marriage, and death events.<br><br>Select the events that are recorded by this source from the list of events provided. The date should be specified in a range format such as <i>FROM 1900 TO 1910</i>. The place jurisdiction is the name of the lowest jurisdiction that encompasses all lower-level places named in this source. For example, “Oneida, Idaho, USA” would be used as a source jurisdiction place for events occurring in the various towns within Oneida County. “Idaho, USA” would be the source jurisdiction place if the events recorded took place not only in Oneida County but also in other counties in Idaho.');
+ $text = I18N::translate('Each source records specific events, generally for a given date range and for a place jurisdiction. For example a Census records census events and church records record birth, marriage, and death events.<br><br>Select the events that are recorded by this source from the list of events provided. The date should be specified in a range format such as <i>FROM 1900 TO 1910</i>. The place jurisdiction is the name of the lowest jurisdiction that encompasses all lower-level places named in this source. For example, “Oneida, Idaho, USA” would be used as a source jurisdiction place for events occurring in the various towns within Oneida County. “Idaho, USA” would be the source jurisdiction place if the events recorded took place not only in Oneida County but also in other counties in Idaho.');
break;
-
case 'gedcom_news_archive':
$title = I18N::translate('View archive');
- $text = I18N::translate('To reduce the height of the News block, the administrator has hidden some articles. You can reveal these hidden articles by clicking the <b>View archive</b> link.');
+ $text = I18N::translate('To reduce the height of the News block, the administrator has hidden some articles. You can reveal these hidden articles by clicking the <b>View archive</b> link.');
break;
case 'google_chart_surname':
$title = I18N::translate('Surname');
- $text = I18N::translate('The number of occurrences of the specified name will be shown on the map. If you leave this field empty, the most common surname will be used.');
+ $text = I18N::translate('The number of occurrences of the specified name will be shown on the map. If you leave this field empty, the most common surname will be used.');
break;
case 'pending_changes':
$title = I18N::translate('Pending changes');
- $text =
+ $text =
'<p>' .
I18N::translate('When you add, edit, or delete information, the changes are not saved immediately. Instead, they are kept in a “pending” area. These pending changes need to be reviewed by a moderator before they are accepted.') .
'</p><p>' .
diff --git a/import.php b/import.php
index eac4e7ccdf..67bfd5a6e7 100644
--- a/import.php
+++ b/import.php
@@ -24,7 +24,7 @@ require './includes/session.php';
// Don't use ged=XX as we want to be able to run without changing the current gedcom.
// This will let us load several gedcoms together, or to edit one while loading another.
$gedcom_id = Filter::getInteger('gedcom_id');
-$tree = Tree::findById($gedcom_id);
+$tree = Tree::findById($gedcom_id);
if (!$tree || !Auth::isManager($tree, Auth::user())) {
http_response_code(403);
diff --git a/includes/config_data.php b/includes/config_data.php
index a7e7109026..a4719aabe2 100644
--- a/includes/config_data.php
+++ b/includes/config_data.php
@@ -177,15 +177,15 @@ $date_and_time = array(
// Level 2 tags that apply to specific Level 1 tags
// Tags are applied in the order they appear here.
$level2_tags = array(
- '_HEB'=>array(
+ '_HEB' => array(
'NAME',
'TITL',
),
- 'ROMN'=>array(
+ 'ROMN' => array(
'NAME',
'TITL',
),
- 'TYPE'=>array(
+ 'TYPE' => array(
'EVEN',
'FACT',
'GRAD',
@@ -194,24 +194,24 @@ $level2_tags = array(
'ORDN',
'SSN',
),
- 'AGNC'=>array(
+ 'AGNC' => array(
'EDUC',
'GRAD',
'OCCU',
'ORDN',
'RETI',
),
- 'CALN'=>array(
+ 'CALN' => array(
'REPO',
),
- 'CEME'=>array( // CEME is NOT a valid 5.5.1 tag
+ 'CEME' => array(// CEME is NOT a valid 5.5.1 tag
//'BURI',
),
- 'RELA'=>array(
+ 'RELA' => array(
'ASSO',
'_ASSO',
),
- 'DATE'=>array(
+ 'DATE' => array(
'ADOP',
'ANUL',
'BAPL',
@@ -258,18 +258,18 @@ $level2_tags = array(
'WILL',
'_TODO',
),
- 'AGE'=>array(
+ 'AGE' => array(
'CENS',
'DEAT',
),
- 'TEMP'=>array(
+ 'TEMP' => array(
'BAPL',
'CONL',
'ENDL',
'SLGC',
'SLGS',
),
- 'PLAC'=>array(
+ 'PLAC' => array(
'ADOP',
'ANUL',
'BAPL',
@@ -314,14 +314,14 @@ $level2_tags = array(
'SSN',
'WILL',
),
- 'STAT'=>array(
+ 'STAT' => array(
'BAPL',
'CONL',
'ENDL',
'SLGC',
'SLGS',
),
- 'ADDR'=>array(
+ 'ADDR' => array(
'BAPM',
'BIRT',
'BURI',
@@ -340,49 +340,49 @@ $level2_tags = array(
'PROP',
'RESI',
),
- 'CAUS'=>array(
+ 'CAUS' => array(
'DEAT',
),
- 'PHON'=>array(
+ 'PHON' => array(
'OCCU',
'RESI',
),
- 'FAX'=>array(
+ 'FAX' => array(
'OCCU',
'RESI',
),
- 'WWW'=>array(
+ 'WWW' => array(
'OCCU',
'RESI',
),
- 'EMAIL'=>array(
+ 'EMAIL' => array(
'OCCU',
'RESI',
),
- 'HUSB'=>array(
+ 'HUSB' => array(
'MARR',
),
- 'WIFE'=>array(
+ 'WIFE' => array(
'MARR',
),
- 'FAMC'=>array(
+ 'FAMC' => array(
'ADOP',
'SLGC',
),
- 'FILE'=>array(
+ 'FILE' => array(
'OBJE',
),
- '_PRIM'=>array(
+ '_PRIM' => array(
'OBJE',
),
- 'EVEN'=>array(
+ 'EVEN' => array(
'DATA',
),
- '_WT_USER'=>array(
+ '_WT_USER' => array(
'_TODO',
),
// See https://bugs.launchpad.net/webtrees/+bug/1082666
- 'RELI'=>array(
+ 'RELI' => array(
//'CHR',
//'CHRA',
//'BAPM',
diff --git a/includes/db_schema/db_schema_22_23.php b/includes/db_schema/db_schema_22_23.php
index dcd5ceb212..121752bcdb 100644
--- a/includes/db_schema/db_schema_22_23.php
+++ b/includes/db_schema/db_schema_22_23.php
@@ -45,7 +45,7 @@ foreach ($_cfgs as $_cfg) {
// $WT_DATA_DIR = /home/fisharebest/public_html/webtrees/data/
// Therefore we need to calculate ../../../my_pictures/
$_media_dir = '';
- $_tmp_dir = $WT_DATA_DIR;
+ $_tmp_dir = $WT_DATA_DIR;
while (strpos($_mf_dir, $_tmp_dir) !== 0) {
$_media_dir .= '../';
$_tmp_dir = preg_replace('~[^/\\\\]+[/\\\\]$~', '', $_tmp_dir);
diff --git a/includes/db_schema/db_schema_29_30.php b/includes/db_schema/db_schema_29_30.php
index 297afa4772..85bd1ece74 100644
--- a/includes/db_schema/db_schema_29_30.php
+++ b/includes/db_schema/db_schema_29_30.php
@@ -75,6 +75,5 @@ Database::exec(
" WHERE setting_name = 'languages'"
);
-
// Update the version to indicate success
Site::setPreference($schema_name, $next_version);
diff --git a/includes/db_schema/db_schema_5_6.php b/includes/db_schema/db_schema_5_6.php
index ab97271de4..3182d66113 100644
--- a/includes/db_schema/db_schema_5_6.php
+++ b/includes/db_schema/db_schema_5_6.php
@@ -23,7 +23,7 @@ $settings = Database::prepare(
"SELECT gedcom_id, setting_value FROM `##gedcom_setting` WHERE setting_name='SHOW_RELATIVES_EVENTS'"
)->fetchAssoc();
-foreach ($settings as $gedcom_id=>$setting) {
+foreach ($settings as $gedcom_id => $setting) {
// Delete old settings
$setting = preg_replace('/_(BIRT|MARR|DEAT)_(COUS|MSIB|FSIB|GGCH|NEPH|GGPA)/', '', $setting);
$setting = preg_replace('/_FAMC_(RESI_EMIG)/', '', $setting);
diff --git a/includes/db_schema/db_schema_9_10.php b/includes/db_schema/db_schema_9_10.php
index 65ebdc0f29..3200f8751a 100644
--- a/includes/db_schema/db_schema_9_10.php
+++ b/includes/db_schema/db_schema_9_10.php
@@ -29,7 +29,6 @@ try {
// Already been run?
}
-
try {
// The INDILIST and FAMLIST scripts have been rewritten to use this index
Database::exec(
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index e9c985031f..7bed7c02ce 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -28,8 +28,8 @@ namespace Fisharebest\Webtrees;
function fetch_latest_version() {
$last_update_timestamp = Site::getPreference('LATEST_WT_VERSION_TIMESTAMP');
if ($last_update_timestamp < WT_TIMESTAMP - 24 * 60 * 60) {
- $row = Database::prepare("SHOW VARIABLES LIKE 'version'")->fetchOneRow();
- $params = '?w=' . WT_VERSION . '&p=' . PHP_VERSION . '&m=' . $row->value . '&o=' . (DIRECTORY_SEPARATOR === '/' ? 'u' : 'w');
+ $row = Database::prepare("SHOW VARIABLES LIKE 'version'")->fetchOneRow();
+ $params = '?w=' . WT_VERSION . '&p=' . PHP_VERSION . '&m=' . $row->value . '&o=' . (DIRECTORY_SEPARATOR === '/' ? 'u' : 'w');
$latest_version_txt = File::fetchUrl('http://dev.webtrees.net/build/latest-version.txt' . $params);
if ($latest_version_txt) {
Site::setPreference('LATEST_WT_VERSION', $latest_version_txt);
@@ -48,7 +48,7 @@ function fetch_latest_version() {
/**
* Convert a file upload PHP error code into user-friendly text.
*
- * @param integer $error_code
+ * @param int $error_code
*
* @return string
*/
@@ -92,10 +92,10 @@ function file_upload_error_text($error_code) {
* The following example is the DATE subrecord of the above BIRT subrecord:
* <code>2 DATE 1 JAN 1900</code>
*
- * @param integer $level the N level of the subrecord to get
- * @param string $tag a gedcom tag or string to search for in the record (ie 1 BIRT or 2 DATE)
- * @param string $gedrec the parent gedcom record to search in
- * @param integer $num this allows you to specify which matching <var>$tag</var> to get. Oftentimes a
+ * @param int $level the N level of the subrecord to get
+ * @param string $tag a gedcom tag or string to search for in the record (ie 1 BIRT or 2 DATE)
+ * @param string $gedrec the parent gedcom record to search in
+ * @param int $num this allows you to specify which matching <var>$tag</var> to get. Oftentimes a
* gedcom record will have more that 1 of the same type of subrecord. An individual may have
* multiple events for example. Passing $num=1 would get the first 1. Passing $num=2 would get the
* second one, etc.
@@ -107,10 +107,10 @@ function get_sub_record($level, $tag, $gedrec, $num = 1) {
return '';
}
// -- adding \n before and after gedrec
- $gedrec = "\n" . $gedrec . "\n";
- $tag = trim($tag);
+ $gedrec = "\n" . $gedrec . "\n";
+ $tag = trim($tag);
$searchTarget = "~[\n]" . $tag . "[\s]~";
- $ct = preg_match_all($searchTarget, $gedrec, $match, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
+ $ct = preg_match_all($searchTarget, $gedrec, $match, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
if ($ct == 0) {
return '';
}
@@ -138,8 +138,8 @@ function get_sub_record($level, $tag, $gedrec, $num = 1) {
*
* get the N+1 CONT or CONC lines of a gedcom subrecord
*
- * @param integer $nlevel the level of the CONT lines to get
- * @param string $nrec the gedcom subrecord to search in
+ * @param int $nlevel the level of the CONT lines to get
+ * @param string $nrec the gedcom subrecord to search in
*
* @return string a string with all CONT lines merged
*/
@@ -166,7 +166,7 @@ function get_cont($nlevel, $nrec) {
* @param array $a
* @param array $b
*
- * @return integer
+ * @return int
*/
function event_sort($a, $b) {
if ($a['jd'] == $b['jd']) {
@@ -186,7 +186,7 @@ function event_sort($a, $b) {
* @param array $a
* @param array $b
*
- * @return integer
+ * @return int
*/
function event_sort_name($a, $b) {
if ($a['jd'] == $b['jd']) {
@@ -206,7 +206,7 @@ function event_sort_name($a, $b) {
* @param Fact[] $arr
*/
function sort_facts(&$arr) {
- $dated = array();
+ $dated = array();
$nondated = array();
//-- split the array into dated and non-dated arrays
$order = 0;
@@ -294,7 +294,7 @@ function get_associate_relationship_name(Individual $person1, Individual $person
*
* @param Individual $person1 The person to compute the relationship from
* @param Individual $person2 The person to compute the relatiohip to
- * @param integer $maxlength The maximum length of path
+ * @param int $maxlength The maximum length of path
*
* @return array|bool An array of nodes on the relationship path, or false if no path found
*/
@@ -351,12 +351,12 @@ function get_relationship(Individual $person1, Individual $person2, $maxlength =
if (!isset($visited[$spouse->getXref()])) {
$node1 = $node;
$node1['length']++;
- $node1['path'][] = $spouse;
- $node1['indi'] = $spouse;
+ $node1['path'][] = $spouse;
+ $node1['indi'] = $spouse;
$node1['relations'][] = $parent_codes[$spouse->getSex()];
- $p1nodes[] = $node1;
+ $p1nodes[] = $node1;
if ($spouse === $person2) {
- $found = true;
+ $found = true;
$resnode = $node1;
} else {
$visited[$spouse->getXref()] = true;
@@ -367,12 +367,12 @@ function get_relationship(Individual $person1, Individual $person2, $maxlength =
if (!isset($visited[$child->getXref()])) {
$node1 = $node;
$node1['length']++;
- $node1['path'][] = $child;
- $node1['indi'] = $child;
+ $node1['path'][] = $child;
+ $node1['indi'] = $child;
$node1['relations'][] = $sibling_codes[$child->getSex()];
- $p1nodes[] = $node1;
+ $p1nodes[] = $node1;
if ($child === $person2) {
- $found = true;
+ $found = true;
$resnode = $node1;
} else {
$visited[$child->getXref()] = true;
@@ -387,12 +387,12 @@ function get_relationship(Individual $person1, Individual $person2, $maxlength =
if (!in_array($spouse->getXref(), $node1) || !isset($visited[$spouse->getXref()])) {
$node1 = $node;
$node1['length']++;
- $node1['path'][] = $spouse;
- $node1['indi'] = $spouse;
+ $node1['path'][] = $spouse;
+ $node1['indi'] = $spouse;
$node1['relations'][] = $spouse_codes[$spouse->getSex()];
- $p1nodes[] = $node1;
+ $p1nodes[] = $node1;
if ($spouse === $person2) {
- $found = true;
+ $found = true;
$resnode = $node1;
} else {
$visited[$spouse->getXref()] = true;
@@ -403,12 +403,12 @@ function get_relationship(Individual $person1, Individual $person2, $maxlength =
if (!isset($visited[$child->getXref()])) {
$node1 = $node;
$node1['length']++;
- $node1['path'][] = $child;
- $node1['indi'] = $child;
+ $node1['path'][] = $child;
+ $node1['indi'] = $child;
$node1['relations'][] = $child_codes[$child->getSex()];
- $p1nodes[] = $node1;
+ $p1nodes[] = $node1;
if ($child === $person2) {
- $found = true;
+ $found = true;
$resnode = $node1;
} else {
$visited[$child->getXref()] = true;
@@ -436,7 +436,7 @@ function get_relationship_name($nodes) {
}
$person1 = $nodes['path'][0];
$person2 = $nodes['path'][count($nodes['path']) - 1];
- $path = array_slice($nodes['relations'], 1);
+ $path = array_slice($nodes['relations'], 1);
// Look for paths with *specific* names first.
// Note that every combination must be listed separately, as the same English
// name can be used for many different relationships. e.g.
@@ -461,8 +461,8 @@ function get_relationship_name($nodes) {
}
/**
- * @param integer $n
- * @param string $sex
+ * @param int $n
+ * @param string $sex
*
* @return string
*/
@@ -596,9 +596,9 @@ function cousin_name($n, $sex) {
* A variation on cousin_name(), for constructs such as “sixth great-nephew”
* Currently used only by Spanish relationship names.
*
- * @param integer $n
- * @param string $sex
- * @param string $relation
+ * @param int $n
+ * @param string $sex
+ * @param string $relation
*
* @return string
*/
@@ -1532,7 +1532,7 @@ function get_relationship_name_from_path($path, Individual $person1 = null, Indi
// Look for generic/pattern relationships.
if (preg_match('/^((?:mot|fat|par)+)(bro|sis|sib)$/', $path, $match)) {
// siblings of direct ancestors
- $up = strlen($match[1]) / 3;
+ $up = strlen($match[1]) / 3;
$bef_last = substr($path, -6, 3);
switch ($up) {
case 3:
@@ -1673,7 +1673,7 @@ function get_relationship_name_from_path($path, Individual $person1 = null, Indi
}
if (preg_match('/^(?:bro|sis|sib)((?:son|dau|chi)+)$/', $path, $match)) {
// direct descendants of siblings
- $down = strlen($match[1]) / 3 + 1; // Add one, as we count generations from the common ancestor
+ $down = strlen($match[1]) / 3 + 1; // Add one, as we count generations from the common ancestor
$first = substr($path, 0, 3);
switch ($down) {
case 4:
@@ -2061,11 +2061,11 @@ function get_relationship_name_from_path($path, Individual $person1 = null, Indi
}
if (preg_match('/^((?:mot|fat|par)+)(?:bro|sis|sib)((?:son|dau|chi)+)$/', $path, $match)) {
// cousins in English
- $ascent = $match[1];
+ $ascent = $match[1];
$descent = $match[2];
- $up = strlen($ascent) / 3;
- $down = strlen($descent) / 3;
- $cousin = min($up, $down); // Moved out of switch (en/default case) so that
+ $up = strlen($ascent) / 3;
+ $down = strlen($descent) / 3;
+ $cousin = min($up, $down); // Moved out of switch (en/default case) so that
$removed = abs($down - $up); // Spanish (and other languages) can use it, too.
// Different languages have different rules for naming cousins. For example,
@@ -2142,8 +2142,8 @@ function get_relationship_name_from_path($path, Individual $person1 = null, Indi
// Try splitting at every point, and choose the path with the shorted translated name.
$relationship = null;
- $path1 = substr($path, 0, 3);
- $path2 = substr($path, 3);
+ $path1 = substr($path, 0, 3);
+ $path2 = substr($path, 3);
while ($path2) {
$tmp = I18N::translate(
// I18N: A complex relationship, such as “third-cousin’s great-uncle”
@@ -2205,7 +2205,7 @@ function get_query_url($overwrite = null, $separator = '&') {
*
* @param string $file
*
- * @return boolean
+ * @return bool
*/
function isFileExternal($file) {
return strpos($file, '://') !== false;
diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php
index 05b8195518..860b07d9d0 100644
--- a/includes/functions/functions_charts.php
+++ b/includes/functions/functions_charts.php
@@ -19,9 +19,9 @@ namespace Fisharebest\Webtrees;
/**
* print a table cell with sosa number
*
- * @param integer $sosa
- * @param string $pid optional pid
- * @param string $arrowDirection direction of link arrow
+ * @param int $sosa
+ * @param string $pid optional pid
+ * @param string $arrowDirection direction of link arrow
*/
function print_sosa_number($sosa, $pid = "", $arrowDirection = "up") {
if (substr($sosa, -1, 1) == ".") {
@@ -56,11 +56,11 @@ function print_sosa_number($sosa, $pid = "", $arrowDirection = "up") {
* print the parents table for a family
*
* @param Family $family family gedcom ID
- * @param integer $sosa child sosa number
- * @param string $label indi label (descendancy booklet)
- * @param string $parid parent ID (descendancy booklet)
- * @param string $gparid gd-parent ID (descendancy booklet)
- * @param integer $show_full large or small box
+ * @param int $sosa child sosa number
+ * @param string $label indi label (descendancy booklet)
+ * @param string $parid parent ID (descendancy booklet)
+ * @param string $gparid gd-parent ID (descendancy booklet)
+ * @param int $show_full large or small box
*/
function print_family_parents(Family $family, $sosa = 0, $label = '', $parid = '', $gparid = '', $show_full = 1) {
@@ -264,12 +264,12 @@ function print_family_parents(Family $family, $sosa = 0, $label = '', $parid = '
/**
* print the children table for a family
*
- * @param Family $family family
- * @param string $childid child ID
- * @param integer $sosa child sosa number
- * @param string $label indi label (descendancy booklet)
- * @param integer $show_cousins display cousins on chart
- * @param integer $show_full large or small box
+ * @param Family $family family
+ * @param string $childid child ID
+ * @param int $sosa child sosa number
+ * @param string $label indi label (descendancy booklet)
+ * @param int $show_cousins display cousins on chart
+ * @param int $show_full large or small box
*/
function print_family_children(Family $family, $childid = '', $sosa = 0, $label = '', $show_cousins = 0, $show_full = 1) {
@@ -282,7 +282,7 @@ function print_family_children(Family $family, $childid = '', $sosa = 0, $label
$pbheight = $bheight + 14;
$children = $family->getChildren();
- $numchil = count($children);
+ $numchil = count($children);
echo '<table border="0" cellpadding="0" cellspacing="2"><tr>';
if ($sosa > 0) {
@@ -335,7 +335,6 @@ function print_family_children(Family $family, $childid = '', $sosa = 0, $label
// loop for all families where current child is a spouse
$famids = $child->getSpouseFamilies();
-
$maxfam = count($famids) - 1;
for ($f = 0; $f <= $maxfam; $f++) {
$famid_child = $famids[$f]->getXref();
@@ -351,9 +350,9 @@ function print_family_children(Family $family, $childid = '', $sosa = 0, $label
//find out how many cousins there are to establish vertical line on second families
$fchildren = $famids[$f]->getChildren();
- $kids = count($fchildren);
- $Pheader = ($bheight - 1) * $kids;
- $PBadj = 6; // default
+ $kids = count($fchildren);
+ $Pheader = ($bheight - 1) * $kids;
+ $PBadj = 6; // default
if ($show_cousins > 0) {
if ($kids) {
$PBadj = max(0, $Pheader / 2 + $kids * 4.5);
@@ -413,14 +412,14 @@ function print_family_children(Family $family, $childid = '', $sosa = 0, $label
* print a family with Sosa-Stradonitz numbering system
* ($rootid=1, father=2, mother=3 ...)
*
- * @param string $famid family gedcom ID
- * @param string $childid tree root ID
- * @param integer $sosa starting sosa number
- * @param string $label indi label (descendancy booklet)
- * @param string $parid parent ID (descendancy booklet)
- * @param string $gparid gd-parent ID (descendancy booklet)
- * @param integer $show_cousins display cousins on chart
- * @param integer $show_full large or small box
+ * @param string $famid family gedcom ID
+ * @param string $childid tree root ID
+ * @param int $sosa starting sosa number
+ * @param string $label indi label (descendancy booklet)
+ * @param string $parid parent ID (descendancy booklet)
+ * @param string $gparid gd-parent ID (descendancy booklet)
+ * @param int $show_cousins display cousins on chart
+ * @param int $show_full large or small box
*/
function print_sosa_family($famid, $childid, $sosa, $label = '', $parid = '', $gparid = '', $show_cousins = 0, $show_full = 1) {
global $WT_TREE;
@@ -441,9 +440,9 @@ function print_sosa_family($famid, $childid, $sosa, $label = '', $parid = '', $g
/**
* print an arrow to a new url
*
- * @param string $url target url
- * @param string $label arrow label
- * @param integer $dir arrow direction 0=left 1=right 2=up 3=down (default=2)
+ * @param string $url target url
+ * @param string $label arrow label
+ * @param int $dir arrow direction 0=left 1=right 2=up 3=down (default=2)
*/
function print_url_arrow($url, $label, $dir = 2) {
if ($url === '') {
@@ -459,10 +458,9 @@ function print_url_arrow($url, $label, $dir = 2) {
$adir = 0;
}
-
// arrow style 0 1 2 3
$array_style = array('icon-larrow', 'icon-rarrow', 'icon-uarrow', 'icon-darrow');
- $astyle = $array_style[$adir];
+ $astyle = $array_style[$adir];
// Labels include people’s names, which may contain markup
echo '<a href="' . $url . '" title="' . strip_tags($label) . '" class="' . $astyle . '"></a>';
@@ -486,14 +484,15 @@ function get_sosa_name($sosa) {
}
$sosa /= 2;
}
+
return get_relationship_name_from_path($path, null, null);
}
/**
* print cousins list
*
- * @param string $famid family ID
- * @param integer $show_full large or small box
+ * @param string $famid family ID
+ * @param int $show_full large or small box
*/
function print_cousins($famid, $show_full = 1) {
global $WT_TREE;
@@ -504,7 +503,7 @@ function print_cousins($famid, $show_full = 1) {
$bheight = Theme::theme()->parameter('compact-chart-box-y');
}
- $family = Family::getInstance($famid, $WT_TREE);
+ $family = Family::getInstance($famid, $WT_TREE);
$fchildren = $family->getChildren();
$kids = count($fchildren);
@@ -516,7 +515,7 @@ function print_cousins($famid, $show_full = 1) {
echo '<td rowspan="', $kids, '" valign="middle" align="right"><img width="3px" height="', (($bheight + 9) * ($kids - 1)), 'px" src="', Theme::theme()->parameter('image-vline'), '" alt=""></td>';
}
$ctkids = count($fchildren);
- $i = 1;
+ $i = 1;
foreach ($fchildren as $fchil) {
if ($i == 1) {
echo '<td><img width="10px" height="3px" align="top"';
diff --git a/includes/functions/functions_date.php b/includes/functions/functions_date.php
index d540dcde7b..cfbc9c513b 100644
--- a/includes/functions/functions_date.php
+++ b/includes/functions/functions_date.php
@@ -17,8 +17,8 @@ namespace Fisharebest\Webtrees;
*/
/**
- * @param string $age_string
- * @param boolean $show_years
+ * @param string $age_string
+ * @param bool $show_years
*
* @return string
*/
@@ -61,7 +61,7 @@ function get_age_at_event($age_string, $show_years) {
* Don't attempt to convert into other calendars, as not all days start at
* midnight, and we can only get it wrong.
*
- * @param integer $time
+ * @param int $time
*
* @return string
*/
@@ -106,7 +106,7 @@ function format_timestamp($time) {
/**
* Convert a unix-style timestamp into a Date object
*
- * @param integer $time
+ * @param int $time
*
* @return Date
*/
diff --git a/includes/functions/functions_db.php b/includes/functions/functions_db.php
index 94bfa3fcbf..d3e283215a 100644
--- a/includes/functions/functions_db.php
+++ b/includes/functions/functions_db.php
@@ -20,8 +20,8 @@ namespace Fisharebest\Webtrees;
* Fetch all records linked to a record - when deleting an object, we must
* also delete all links to it.
*
- * @param string $xref
- * @param integer $gedcom_id
+ * @param string $xref
+ * @param int $gedcom_id
*
* @return string[]
*/
@@ -36,7 +36,7 @@ function fetch_all_links($xref, $gedcom_id) {
$gedcom_id,
$xref,
$gedcom_id,
- $xref
+ $xref,
))->fetchOneColumn();
}
@@ -180,7 +180,6 @@ function search_indis_names(array $query, array $trees) {
$args['query_' . $n] = Filter::escapeLike($q);
}
-
$sql .= " AND i_file IN (";
foreach ($trees as $n => $tree) {
$sql .= $n ? ", " : "";
@@ -330,15 +329,15 @@ function search_indis_soundex($soundex, $lastname, $firstname, $place, array $tr
/**
* get recent changes since the given julian day inclusive
*
- * @param integer $jd leave empty to include all
- * @param boolean $allgeds
+ * @param int $jd leave empty to include all
+ * @param bool $allgeds
*
* @return string[] List of XREFs of records with changes
*/
function get_recent_changes($jd = 0, $allgeds = false) {
global $WT_TREE;
- $sql = "SELECT d_gid FROM `##dates` WHERE d_fact='CHAN' AND d_julianday1>=?";
+ $sql = "SELECT d_gid FROM `##dates` WHERE d_fact='CHAN' AND d_julianday1>=?";
$vars = array($jd);
if (!$allgeds) {
$sql .= " AND d_file=?";
@@ -639,8 +638,8 @@ function find_rin_id($rin) {
* This function returns a simple array of the most common surnames
* found in the individuals list.
*
- * @param integer $min The number of times a surname must occur before it is added to the array
- * @param Tree $tree
+ * @param int $min The number of times a surname must occur before it is added to the array
+ * @param Tree $tree
*
* @return mixed[][]
*/
@@ -666,6 +665,7 @@ function get_common_surnames($min, Tree $tree) {
foreach ($topsurns as $key => $value) {
$topsurns[$key] = array('name' => $key, 'match' => $value);
}
+
return $topsurns;
}
}
@@ -673,9 +673,9 @@ function get_common_surnames($min, Tree $tree) {
/**
* get the top surnames
*
- * @param integer $ged_id fetch surnames from this gedcom
- * @param integer $min only fetch surnames occuring this many times
- * @param integer $max only fetch this number of surnames (0=all)
+ * @param int $ged_id fetch surnames from this gedcom
+ * @param int $min only fetch surnames occuring this many times
+ * @param int $max only fetch this number of surnames (0=all)
*
* @return string[]
*/
@@ -714,9 +714,9 @@ function get_top_surnames($ged_id, $min, $max) {
* Get a list of events whose anniversary occured on a given julian day.
* Used on the on-this-day/upcoming blocks and the day/month calendar views.
*
- * @param integer $jd the julian day
- * @param string $facts restrict the search to just these facts or leave blank for all
- * @param Tree $tree the tree to search
+ * @param int $jd the julian day
+ * @param string $facts restrict the search to just these facts or leave blank for all
+ * @param Tree $tree the tree to search
*
* @return Fact[]
*/
@@ -876,7 +876,7 @@ function get_anniversary_events($jd, $facts, Tree $tree) {
$anniv_date = new Date($row->d_type . ' ' . $row->d_day . ' ' . $row->d_month . ' ' . $row->d_year);
foreach ($record->getFacts() as $fact) {
if (($fact->getDate()->minimumDate() == $anniv_date->minimumDate() || $fact->getDate()->maximumDate() == $anniv_date->minimumDate()) && $fact->getTag() === $row->d_fact) {
- $fact->anniv = $row->d_year === 0 ? 0 : $anniv->y - $row->d_year;
+ $fact->anniv = $row->d_year === 0 ? 0 : $anniv->y - $row->d_year;
$found_facts[] = $fact;
}
}
@@ -890,10 +890,10 @@ function get_anniversary_events($jd, $facts, Tree $tree) {
/**
* Get a list of events which occured during a given date range.
*
- * @param integer $jd1 the start range of julian day
- * @param integer $jd2 the end range of julian day
- * @param string $facts restrict the search to just these facts or leave blank for all
- * @param Tree $tree the tree to search
+ * @param int $jd1 the start range of julian day
+ * @param int $jd2 the end range of julian day
+ * @param string $facts restrict the search to just these facts or leave blank for all
+ * @param Tree $tree the tree to search
*
* @return Fact[]
*/
@@ -934,7 +934,7 @@ function get_calendar_events($jd1, $jd2, $facts, Tree $tree) {
$anniv_date = new Date($row->d_type . ' ' . $row->d_day . ' ' . $row->d_month . ' ' . $row->d_year);
foreach ($record->getFacts() as $fact) {
if (($fact->getDate()->minimumDate() == $anniv_date->minimumDate() || $fact->getDate()->maximumDate() == $anniv_date->minimumDate()) && $fact->getTag() === $row->d_fact) {
- $fact->anniv = 0;
+ $fact->anniv = 0;
$found_facts[] = $fact;
}
}
@@ -947,10 +947,10 @@ function get_calendar_events($jd1, $jd2, $facts, Tree $tree) {
/**
* Get the list of current and upcoming events, sorted by anniversary date
*
- * @param integer $jd1
- * @param integer $jd2
- * @param string $events
- * @param Tree $tree
+ * @param int $jd1
+ * @param int $jd2
+ * @param string $events
+ * @param Tree $tree
*
* @return Fact[]
*/
@@ -970,10 +970,10 @@ function get_events_list($jd1, $jd2, $events, Tree $tree) {
/**
* Check if a media file is shared (i.e. used by another gedcom)
*
- * @param string $file_name
- * @param integer $ged_id
+ * @param string $file_name
+ * @param int $ged_id
*
- * @return boolean
+ * @return bool
*/
function is_media_used_in_other_gedcom($file_name, $ged_id) {
return
@@ -983,15 +983,15 @@ function is_media_used_in_other_gedcom($file_name, $ged_id) {
}
/**
- * @param integer $user_id
+ * @param int $user_id
*
* @return string[][]
*/
function get_user_blocks($user_id) {
global $WT_TREE;
- $blocks = array('main'=>array(), 'side'=>array());
- $rows = Database::prepare(
+ $blocks = array('main' => array(), 'side' => array());
+ $rows = Database::prepare(
"SELECT SQL_CACHE location, block_id, module_name" .
" FROM `##block`" .
" JOIN `##module` USING (module_name)" .
@@ -1012,7 +1012,7 @@ function get_user_blocks($user_id) {
/**
* Get the blocks for the specified tree
*
- * @param integer $gedcom_id
+ * @param int $gedcom_id
*
* @return string[][]
*/
@@ -1023,8 +1023,8 @@ function get_gedcom_blocks($gedcom_id) {
$access_level = Auth::accessLevel(Tree::findById($gedcom_id));
}
- $blocks = array('main'=>array(), 'side'=>array());
- $rows = Database::prepare(
+ $blocks = array('main' => array(), 'side' => array());
+ $rows = Database::prepare(
"SELECT SQL_CACHE location, block_id, module_name" .
" FROM `##block`" .
" JOIN `##module` USING (module_name)" .
@@ -1051,7 +1051,7 @@ function get_gedcom_blocks($gedcom_id) {
* @param string $xref_to
* @param Tree $tree
*
- * @return integer
+ * @return int
*/
function update_favorites($xref_from, $xref_to, Tree $tree) {
return
diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php
index 2bb9afb5ef..00f94f5d41 100644
--- a/includes/functions/functions_edit.php
+++ b/includes/functions/functions_edit.php
@@ -88,9 +88,9 @@ function radio_buttons($name, $values, $selected, $extra = '') {
/**
* Print an edit control for a Yes/No field
*
- * @param string $name
- * @param boolean $selected
- * @param string $extra
+ * @param string $name
+ * @param bool $selected
+ * @param string $extra
*
* @return string
*/
@@ -103,9 +103,9 @@ function edit_field_yes_no($name, $selected = false, $extra = '') {
/**
* Print an edit control for a checkbox.
*
- * @param string $name
- * @param boolean $is_checked
- * @param string $extra
+ * @param string $name
+ * @param bool $is_checked
+ * @param string $extra
*
* @return string
*/
@@ -119,9 +119,9 @@ function checkbox($name, $is_checked = false, $extra = '') {
* This function gives us a three options, set, unset or not sent.
* Useful for dynamically generated forms where we don't know what elements are present.
*
- * @param string $name
- * @param integer $is_checked 0 or 1
- * @param string $extra
+ * @param string $name
+ * @param int $is_checked 0 or 1
+ * @param string $extra
*
* @return string
*/
@@ -167,11 +167,12 @@ function edit_language_checkboxes($parameter_name, $accepted_languages) {
*/
function edit_field_access_level($name, $selected = '', $extra = '') {
$ACCESS_LEVEL = array(
- Auth::PRIV_PRIVATE=> I18N::translate('Show to visitors'),
- Auth::PRIV_USER => I18N::translate('Show to members'),
- Auth::PRIV_NONE => I18N::translate('Show to managers'),
- Auth::PRIV_HIDE => I18N::translate('Hide from everyone')
+ Auth::PRIV_PRIVATE => I18N::translate('Show to visitors'),
+ Auth::PRIV_USER => I18N::translate('Show to members'),
+ Auth::PRIV_NONE => I18N::translate('Show to managers'),
+ Auth::PRIV_HIDE => I18N::translate('Hide from everyone'),
);
+
return select_edit_control($name, $ACCESS_LEVEL, null, $selected, $extra);
}
@@ -186,12 +187,13 @@ function edit_field_access_level($name, $selected = '', $extra = '') {
*/
function edit_field_resn($name, $selected = '', $extra = '') {
$RESN = array(
- '' =>'',
- 'none' => I18N::translate('Show to visitors'), // Not valid GEDCOM, but very useful
- 'privacy' => I18N::translate('Show to members'),
- 'confidential'=> I18N::translate('Show to managers'),
- 'locked' => I18N::translate('Only managers can edit')
+ '' => '',
+ 'none' => I18N::translate('Show to visitors'), // Not valid GEDCOM, but very useful
+ 'privacy' => I18N::translate('Show to members'),
+ 'confidential' => I18N::translate('Show to managers'),
+ 'locked' => I18N::translate('Only managers can edit'),
);
+
return select_edit_control($name, $RESN, null, $selected, $extra);
}
@@ -207,12 +209,13 @@ function edit_field_resn($name, $selected = '', $extra = '') {
function edit_field_contact($name, $selected = '', $extra = '') {
// Different ways to contact the users
$CONTACT_METHODS = array(
- 'messaging' => I18N::translate('Internal messaging'),
- 'messaging2'=> I18N::translate('Internal messaging with emails'),
- 'messaging3'=> I18N::translate('webtrees sends emails with no storage'),
- 'mailto' => I18N::translate('Mailto link'),
- 'none' => I18N::translate('No contact'),
+ 'messaging' => I18N::translate('Internal messaging'),
+ 'messaging2' => I18N::translate('Internal messaging with emails'),
+ 'messaging3' => I18N::translate('webtrees sends emails with no storage'),
+ 'mailto' => I18N::translate('Mailto link'),
+ 'none' => I18N::translate('No contact'),
);
+
return select_edit_control($name, $CONTACT_METHODS, null, $selected, $extra);
}
@@ -237,11 +240,11 @@ function edit_field_language($name, $selected = '', $extra = '') {
/**
* Print an edit control for a range of integers.
*
- * @param string $name
- * @param string $selected
- * @param integer $min
- * @param integer $max
- * @param string $extra
+ * @param string $name
+ * @param string $selected
+ * @param int $min
+ * @param int $max
+ * @param string $extra
*
* @return string
*/
@@ -250,6 +253,7 @@ function edit_field_integers($name, $selected = '', $min, $max, $extra = '') {
for ($i = $min; $i <= $max; ++$i) {
$array[$i] = I18N::number($i);
}
+
return select_edit_control($name, $array, null, $selected, $extra);
}
@@ -331,6 +335,7 @@ function edit_field_rela($name, $selected = '', $extra = '') {
if (!array_key_exists($selected, $rela_codes)) {
$rela_codes[$selected] = $selected;
}
+
return select_edit_control($name, $rela_codes, '', $selected, $extra);
}
@@ -438,7 +443,7 @@ function add_simple_tag($tag, $upperlevel = '', $label = '', $extra = null, Indi
$subnamefacts = array('NPFX', 'GIVN', 'SPFX', 'SURN', 'NSFX', '_MARNM_SURN');
preg_match('/^(?:(\d+) (' . WT_REGEX_TAG . ') ?(.*))/', $tag, $match);
list(, $level, $fact, $value) = $match;
- $level = (int) $level;
+ $level = (int) $level;
// element name : used to POST data
if ($level === 0) {
@@ -477,7 +482,7 @@ function add_simple_tag($tag, $upperlevel = '', $label = '', $extra = null, Indi
if ($fact === 'SHARED_NOTE_EDIT' || $fact === 'SHARED_NOTE') {
$islink = true;
- $fact = 'NOTE';
+ $fact = 'NOTE';
}
// label
@@ -906,9 +911,9 @@ function add_simple_tag($tag, $upperlevel = '', $label = '', $extra = null, Indi
/**
* Prints collapsable fields to add ASSO/RELA, SOUR, OBJE, etc.
*
- * @param string $tag
- * @param integer $level
- * @param string $parent_tag
+ * @param string $tag
+ * @param int $level
+ * @param string $parent_tag
*/
function print_add_layer($tag, $level = 2, $parent_tag = '') {
global $WT_TREE;
@@ -1068,6 +1073,7 @@ function addNewName() {
$gedrec .= "\n2 {$tag} {$TAG}";
}
}
+
return $gedrec;
}
@@ -1159,7 +1165,6 @@ function addNewFact($fact) {
* - $tagRest[] - an array of the tags for each gedcom line that was edited
* - $islinkRest[] - an array of 1 or 0 values to indicate when the text is a link element
* - $textRest[] - an array of the text data for each line
- *
*/
function splitSOUR() {
global $glevels, $tag, $islink, $text;
@@ -1167,14 +1172,14 @@ function splitSOUR() {
global $glevelsRest, $tagRest, $islinkRest, $textRest;
$glevelsSOUR = array();
- $tagSOUR = array();
- $islinkSOUR = array();
- $textSOUR = array();
+ $tagSOUR = array();
+ $islinkSOUR = array();
+ $textSOUR = array();
$glevelsRest = array();
- $tagRest = array();
- $islinkRest = array();
- $textRest = array();
+ $tagRest = array();
+ $islinkRest = array();
+ $textRest = array();
$inSOUR = false;
@@ -1184,27 +1189,27 @@ function splitSOUR() {
$dest = 'S';
} else {
$inSOUR = false;
- $dest = 'R';
+ $dest = 'R';
}
} else {
if ($tag[$i] === 'SOUR') {
- $inSOUR = true;
+ $inSOUR = true;
$levelSOUR = $glevels[$i];
- $dest = 'S';
+ $dest = 'S';
} else {
$dest = 'R';
}
}
if ($dest === 'S') {
$glevelsSOUR[] = $glevels[$i];
- $tagSOUR[] = $tag[$i];
- $islinkSOUR[] = $islink[$i];
- $textSOUR[] = $text[$i];
+ $tagSOUR[] = $tag[$i];
+ $islinkSOUR[] = $islink[$i];
+ $textSOUR[] = $text[$i];
} else {
$glevelsRest[] = $glevels[$i];
- $tagRest[] = $tag[$i];
- $islinkRest[] = $islink[$i];
- $textRest[] = $text[$i];
+ $tagRest[] = $tag[$i];
+ $islinkRest[] = $islink[$i];
+ $textRest[] = $text[$i];
}
}
}
@@ -1229,22 +1234,22 @@ function updateSOUR($inputRec, $levelOverride = 'no') {
// Save original interface update arrays before replacing them with the xxxSOUR ones
$glevelsSave = $glevels;
- $tagSave = $tag;
- $islinkSave = $islink;
- $textSave = $text;
+ $tagSave = $tag;
+ $islinkSave = $islink;
+ $textSave = $text;
$glevels = $glevelsSOUR;
- $tag = $tagSOUR;
- $islink = $islinkSOUR;
- $text = $textSOUR;
+ $tag = $tagSOUR;
+ $islink = $islinkSOUR;
+ $text = $textSOUR;
$myRecord = handle_updates($inputRec, $levelOverride); // Now do the update
// Restore the original interface update arrays (just in case ...)
$glevels = $glevelsSave;
- $tag = $tagSave;
- $islink = $islinkSave;
- $text = $textSave;
+ $tag = $tagSave;
+ $islink = $islinkSave;
+ $text = $textSave;
return $myRecord;
}
@@ -1269,22 +1274,22 @@ function updateRest($inputRec, $levelOverride = 'no') {
// Save original interface update arrays before replacing them with the xxxRest ones
$glevelsSave = $glevels;
- $tagSave = $tag;
- $islinkSave = $islink;
- $textSave = $text;
+ $tagSave = $tag;
+ $islinkSave = $islink;
+ $textSave = $text;
$glevels = $glevelsRest;
- $tag = $tagRest;
- $islink = $islinkRest;
- $text = $textRest;
+ $tag = $tagRest;
+ $islink = $islinkRest;
+ $text = $textRest;
$myRecord = handle_updates($inputRec, $levelOverride); // Now do the update
// Restore the original interface update arrays (just in case ...)
$glevels = $glevelsSave;
- $tag = $tagSave;
- $islink = $islinkSave;
- $text = $textSave;
+ $tag = $tagSave;
+ $islink = $islinkSave;
+ $text = $textSave;
return $myRecord;
}
@@ -1331,7 +1336,7 @@ function handle_updates($newged, $levelOverride = 'no') {
// The sub-records should be deleted.
if ($tag[$j] === 'SOUR' && ($text[$j] === '@@' || $text[$j] === '')) {
$text[$j] = '';
- $k = $j + 1;
+ $k = $j + 1;
while (($k < count($glevels)) && ($glevels[$k] > $glevels[$j])) {
$text[$k] = '';
$k++;
@@ -1343,7 +1348,7 @@ function handle_updates($newged, $levelOverride = 'no') {
} else {
//-- for facts with empty values they must have sub records
//-- this section checks if they have subrecords
- $k = $j + 1;
+ $k = $j + 1;
$pass = false;
while (($k < count($glevels)) && ($glevels[$k] > $glevels[$j])) {
if ($text[$k] !== '') {
@@ -1356,7 +1361,7 @@ function handle_updates($newged, $levelOverride = 'no') {
$filename = array_shift($uploaded_files);
if (!empty($filename)) {
$text[$k] = $filename;
- $pass = true;
+ $pass = true;
break;
}
}
@@ -1442,32 +1447,32 @@ function create_edit_form(GedcomRecord $record, Fact $fact) {
$pid = $record->getXref();
- $tags = array();
+ $tags = array();
$gedlines = explode("\n", $fact->getGedcom());
$linenum = 0;
- $fields = explode(' ', $gedlines[$linenum]);
- $glevel = $fields[0];
- $level = $glevel;
+ $fields = explode(' ', $gedlines[$linenum]);
+ $glevel = $fields[0];
+ $level = $glevel;
- $type = $fact->getTag();
- $parent = $fact->getParent();
+ $type = $fact->getTag();
+ $parent = $fact->getParent();
$level0type = $parent::RECORD_TYPE;
$level1type = $type;
- $i = $linenum;
- $inSource = false;
+ $i = $linenum;
+ $inSource = false;
$levelSource = 0;
- $add_date = true;
+ $add_date = true;
// List of tags we would expect at the next level
// NB add_missing_subtags() already takes care of the simple cases
// where a level 1 tag is missing a level 2 tag. Here we only need to
// handle the more complicated cases.
$expected_subtags = array(
- 'SOUR'=>array('PAGE', 'DATA'),
- 'DATA'=>array('TEXT'),
- 'PLAC'=>array('MAP'),
- 'MAP' =>array('LATI', 'LONG')
+ 'SOUR' => array('PAGE', 'DATA'),
+ 'DATA' => array('TEXT'),
+ 'PLAC' => array('MAP'),
+ 'MAP' => array('LATI', 'LONG'),
);
if ($record->getTree()->getPreference('FULL_SOURCES')) {
$expected_subtags['SOUR'][] = 'QUAY';
@@ -1477,7 +1482,7 @@ function create_edit_form(GedcomRecord $record, Fact $fact) {
$expected_subtags['PLAC'] = array_merge($match[1], $expected_subtags['PLAC']);
}
- $stack = array(0=>$level0type);
+ $stack = array(0 => $level0type);
// Loop on existing tags :
while (true) {
// Keep track of our hierarchy, e.g. 1=>BIRT, 2=>PLAC, 3=>FONE
@@ -1499,15 +1504,15 @@ function create_edit_form(GedcomRecord $record, Fact $fact) {
}
if ($type === 'SOUR') {
- $inSource = true;
+ $inSource = true;
$levelSource = $level;
} elseif ($levelSource >= $level) {
$inSource = false;
}
if ($type !== 'DATA' && $type !== 'CONT') {
- $tags[] = $type;
- $person = Individual::getInstance($pid, $WT_TREE);
+ $tags[] = $type;
+ $person = Individual::getInstance($pid, $WT_TREE);
$subrecord = $level . ' ' . $type . ' ' . $text;
if ($inSource && $type === 'DATE') {
add_simple_tag($subrecord, '', GedcomTag::getLabel($label, $person));
@@ -1559,7 +1564,7 @@ function create_edit_form(GedcomRecord $record, Fact $fact) {
$i++;
if (isset($gedlines[$i])) {
$fields = explode(' ', $gedlines[$i]);
- $level = $fields[0];
+ $level = $fields[0];
if (isset($fields[1])) {
$type = trim($fields[1]);
} else {
@@ -1576,14 +1581,15 @@ function create_edit_form(GedcomRecord $record, Fact $fact) {
if ($level1type !== '_PRIM') {
insert_missing_subtags($level1type, $add_date);
}
+
return $level1type;
}
/**
* Populates the global $tags array with any missing sub-tags.
*
- * @param string $level1tag the type of the level 1 gedcom record
- * @param boolean $add_date
+ * @param string $level1tag the type of the level 1 gedcom record
+ * @param bool $add_date
*/
function insert_missing_subtags($level1tag, $add_date = false) {
global $tags, $date_and_time, $level2_tags, $WT_TREE;
@@ -1592,11 +1598,11 @@ function insert_missing_subtags($level1tag, $add_date = false) {
// handle MARRiage TYPE
$type_val = '';
if (substr($level1tag, 0, 5) === 'MARR_') {
- $type_val = substr($level1tag, 5);
+ $type_val = substr($level1tag, 5);
$level1tag = 'MARR';
}
- foreach ($level2_tags as $key=>$value) {
+ foreach ($level2_tags as $key => $value) {
if ($key === 'DATE' && in_array($level1tag, $nondatefacts) || $key === 'PLAC' && in_array($level1tag, $nonplacfacts)) {
continue;
}
diff --git a/includes/functions/functions_export.php b/includes/functions/functions_export.php
index 1c85131a6c..36d14f691b 100644
--- a/includes/functions/functions_export.php
+++ b/includes/functions/functions_export.php
@@ -67,6 +67,7 @@ function reformat_record_export($rec) {
}
$newrec .= $line . WT_EOL;
}
+
return $newrec;
}
@@ -165,7 +166,6 @@ function convert_media_path($rec, $path) {
* 'toANSI': should the output be produced in ISO-8859-1 instead of UTF-8? (yes, no)
* 'path': what constant should prefix all media file paths? (eg: media/ or c:\my pictures\my family
* 'slashes': what folder separators apply to media file paths? (forward, backward)
- *
*/
function export_gedcom(Tree $tree, $gedout, $exportOptions) {
switch ($exportOptions['privatize']) {
@@ -197,7 +197,7 @@ function export_gedcom(Tree $tree, $gedout, $exportOptions) {
// Generate the OBJE/SOUR/REPO/NOTE records first, as their privacy calcualations involve
// database queries, and we wish to avoid large gaps between queries due to MySQL connection timeouts.
$tmp_gedcom = '';
- $rows = Database::prepare(
+ $rows = Database::prepare(
"SELECT m_id AS xref, m_gedcom AS gedcom" .
" FROM `##media` WHERE m_file = :tree_id ORDER BY m_id"
)->execute(array(
diff --git a/includes/functions/functions_import.php b/includes/functions/functions_import.php
index 748af1b2fd..3a39b7836f 100644
--- a/includes/functions/functions_import.php
+++ b/includes/functions/functions_import.php
@@ -38,9 +38,9 @@ function reformat_record_import($rec, Tree $tree) {
// Process the record line-by-line
$newrec = '';
- foreach ($matches as $n=>$match) {
+ foreach ($matches as $n => $match) {
list(, $level, $xref, $tag, $data) = $match;
- $tag = strtoupper($tag); // Tags should always be upper case
+ $tag = strtoupper($tag); // Tags should always be upper case
switch ($tag) {
// Convert PhpGedView tags to WT
case '_PGVU':
@@ -172,7 +172,7 @@ function reformat_record_import($rec, Tree $tree) {
// Preserve text from INT dates
if (strpos($data, '(') !== false) {
list($date, $text) = explode('(', $data, 2);
- $text = ' (' . $text;
+ $text = ' (' . $text;
} else {
$date = $data;
$text = '';
@@ -565,6 +565,7 @@ function reformat_record_import($rec, Tree $tree) {
break;
}
}
+
return $newrec;
}
@@ -573,9 +574,9 @@ function reformat_record_import($rec, Tree $tree) {
*
* this function will parse the given gedcom record and add it to the database
*
- * @param string $gedrec the raw gedcom record to parse
- * @param Tree $tree import the record into this tree
- * @param boolean $update whether or not this is an updated record that has been accepted
+ * @param string $gedrec the raw gedcom record to parse
+ * @param Tree $tree import the record into this tree
+ * @param bool $update whether or not this is an updated record that has been accepted
*/
function import_record($gedrec, Tree $tree, $update) {
$tree_id = $tree->getTreeId();
@@ -631,7 +632,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom) VALUES (?, ?, ?, ?, ?)"
)->execute(array(
- $xref, $tree_id, $rin, $record->getSex(), $gedrec
+ $xref, $tree_id, $rin, $record->getSex(), $gedrec,
));
// Update the cross-reference/index tables.
update_places($xref, $tree_id, $gedrec);
@@ -660,7 +661,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil) VALUES (?, ?, ?, ?, ?, ?)"
)->execute(array(
- $xref, $tree_id, $husb, $wife, $gedrec, $nchi
+ $xref, $tree_id, $husb, $wife, $gedrec, $nchi,
));
// Update the cross-reference/index tables.
update_places($xref, $tree_id, $gedrec);
@@ -682,7 +683,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom) VALUES (?, ?, LEFT(?, 255), ?)"
)->execute(array(
- $xref, $tree_id, $name, $gedrec
+ $xref, $tree_id, $name, $gedrec,
));
// Update the cross-reference/index tables.
update_links($xref, $tree_id, $gedrec);
@@ -696,7 +697,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'REPO', ?)"
)->execute(array(
- $xref, $tree_id, $gedrec
+ $xref, $tree_id, $gedrec,
));
// Update the cross-reference/index tables.
update_links($xref, $tree_id, $gedrec);
@@ -707,7 +708,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'NOTE', ?)"
)->execute(array(
- $xref, $tree_id, $gedrec
+ $xref, $tree_id, $gedrec,
));
// Update the cross-reference/index tables.
update_links($xref, $tree_id, $gedrec);
@@ -718,7 +719,7 @@ function import_record($gedrec, Tree $tree, $update) {
Database::prepare(
"INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom) VALUES (?, ?, ?, ?, ?, ?, ?)"
)->execute(array(
- $xref, $record->extension(), $record->getMediaType(), $record->title, $record->file, $tree_id, $gedrec
+ $xref, $record->extension(), $record->getMediaType(), $record->title, $record->file, $tree_id, $gedrec,
));
// Update the cross-reference/index tables.
update_links($xref, $tree_id, $gedrec);
@@ -754,9 +755,9 @@ function import_record($gedrec, Tree $tree, $update) {
/**
* extract all places from the given record and insert them into the places table
*
- * @param string $gid
- * @param integer $ged_id
- * @param string $gedrec
+ * @param string $gid
+ * @param int $ged_id
+ * @param string $gedrec
*/
function update_places($gid, $ged_id, $gedrec) {
global $placecache;
@@ -769,22 +770,22 @@ function update_places($gid, $ged_id, $gedrec) {
// 0 HEAD/1 PLAC or 0 _EVDEF/1 PLAC
$pt = preg_match_all("/^[2-9] PLAC (.+)/m", $gedrec, $match, PREG_SET_ORDER);
for ($i = 0; $i < $pt; $i++) {
- $place = trim($match[$i][1]);
+ $place = trim($match[$i][1]);
$lowplace = I18N::strtolower($place);
//-- if we have already visited this place for this person then we don't need to again
if (isset($personplace[$lowplace])) {
continue;
}
$personplace[$lowplace] = 1;
- $places = explode(',', $place);
+ $places = explode(',', $place);
//-- reverse the array to start at the highest level
- $secalp = array_reverse($places);
+ $secalp = array_reverse($places);
$parent_id = 0;
- $search = true;
+ $search = true;
foreach ($secalp as $place) {
$place = trim($place);
- $key = strtolower(mb_substr($place, 0, 150) . "_" . $parent_id);
+ $key = strtolower(mb_substr($place, 0, 150) . "_" . $parent_id);
//-- if this place has already been added then we don't need to add it again
if (isset($placecache[$key])) {
$parent_id = $placecache[$key];
@@ -797,7 +798,7 @@ function update_places($gid, $ged_id, $gedrec) {
Database::prepare(
"INSERT IGNORE INTO `##placelinks` (pl_p_id, pl_gid, pl_file) VALUES (?, ?, ?)"
)->execute(array(
- $parent_id, $gid, $ged_id
+ $parent_id, $gid, $ged_id,
));
}
continue;
@@ -809,7 +810,7 @@ function update_places($gid, $ged_id, $gedrec) {
$tmp = Database::prepare(
"SELECT p_id FROM `##places` WHERE p_file = ? AND p_parent_id = ? AND p_place = LEFT(?, 150)"
)->execute(array(
- $ged_id, $parent_id, $place
+ $ged_id, $parent_id, $place,
))->fetchOne();
if ($tmp) {
$p_id = $tmp;
@@ -825,7 +826,7 @@ function update_places($gid, $ged_id, $gedrec) {
Database::prepare(
"INSERT INTO `##places` (p_place, p_parent_id, p_file, p_std_soundex, p_dm_soundex) VALUES (LEFT(?, 150), ?, ?, ?, ?)"
)->execute(array(
- $place, $parent_id, $ged_id, $std_soundex, $dm_soundex
+ $place, $parent_id, $ged_id, $std_soundex, $dm_soundex,
));
$p_id = Database::getInstance()->lastInsertId();
}
@@ -833,11 +834,11 @@ function update_places($gid, $ged_id, $gedrec) {
Database::prepare(
"INSERT IGNORE INTO `##placelinks` (pl_p_id, pl_gid, pl_file) VALUES (?, ?, ?)"
)->execute(array(
- $p_id, $gid, $ged_id
+ $p_id, $gid, $ged_id,
));
//-- increment the level and assign the parent id for the next place level
- $parent_id = $p_id;
- $placecache[$key] = $p_id;
+ $parent_id = $p_id;
+ $placecache[$key] = $p_id;
$personplace[$key] = 1;
}
}
@@ -846,9 +847,9 @@ function update_places($gid, $ged_id, $gedrec) {
/**
* Extract all the dates from the given record and insert them into the database.
*
- * @param string $xref
- * @param integer $ged_id
- * @param string $gedrec
+ * @param string $xref
+ * @param int $ged_id
+ * @param string $gedrec
*/
function update_dates($xref, $ged_id, $gedrec) {
if (strpos($gedrec, '2 DATE ') && preg_match_all("/\n1 (\w+).*(?:\n[2-9].*)*(?:\n2 DATE (.+))(?:\n[2-9].*)*/", $gedrec, $matches, PREG_SET_ORDER)) {
@@ -895,9 +896,9 @@ function update_dates($xref, $ged_id, $gedrec) {
/**
* Extract all the links from the given record and insert them into the database
*
- * @param string $xref
- * @param integer $ged_id
- * @param string $gedrec
+ * @param string $xref
+ * @param int $ged_id
+ * @param string $gedrec
*/
function update_links($xref, $ged_id, $gedrec) {
if (preg_match_all('/^\d+ (' . WT_REGEX_TAG . ') @(' . WT_REGEX_XREF . ')@/m', $gedrec, $matches, PREG_SET_ORDER)) {
@@ -911,7 +912,7 @@ function update_links($xref, $ged_id, $gedrec) {
Database::prepare(
"INSERT INTO `##link` (l_from, l_to, l_type, l_file) VALUES (?, ?, ?, ?)"
)->execute(array(
- $xref, $match[2], $match[1], $ged_id
+ $xref, $match[2], $match[1], $ged_id,
));
} catch (PDOException $e) {
// We could display a warning here....
@@ -924,12 +925,12 @@ function update_links($xref, $ged_id, $gedrec) {
/**
* Extract all the names from the given record and insert them into the database.
*
- * @param string $xref
- * @param integer $ged_id
+ * @param string $xref
+ * @param int $ged_id
* @param GedcomRecord $record
*/
function update_names($xref, $ged_id, GedcomRecord $record) {
- foreach ($record->getAllNames() as $n=>$name) {
+ foreach ($record->getAllNames() as $n => $name) {
if ($record instanceof Individual) {
if ($name['givn'] === '@P.N.') {
$soundex_givn_std = null;
@@ -948,13 +949,13 @@ function update_names($xref, $ged_id, GedcomRecord $record) {
Database::prepare(
"INSERT INTO `##name` (n_file,n_id,n_num,n_type,n_sort,n_full,n_surname,n_surn,n_givn,n_soundex_givn_std,n_soundex_surn_std,n_soundex_givn_dm,n_soundex_surn_dm) VALUES (?, ?, ?, ?, LEFT(?, 255), LEFT(?, 255), LEFT(?, 255), LEFT(?, 255), ?, ?, ?, ?, ?)"
)->execute(array(
- $ged_id, $xref, $n, $name['type'], $name['sort'], $name['fullNN'], $name['surname'], $name['surn'], $name['givn'], $soundex_givn_std, $soundex_surn_std, $soundex_givn_dm, $soundex_surn_dm
+ $ged_id, $xref, $n, $name['type'], $name['sort'], $name['fullNN'], $name['surname'], $name['surn'], $name['givn'], $soundex_givn_std, $soundex_surn_std, $soundex_givn_dm, $soundex_surn_dm,
));
} else {
Database::prepare(
"INSERT INTO `##name` (n_file,n_id,n_num,n_type,n_sort,n_full) VALUES (?, ?, ?, ?, LEFT(?, 255), LEFT(?, 255))"
)->execute(array(
- $ged_id, $xref, $n, $name['type'], $name['sort'], $name['fullNN']
+ $ged_id, $xref, $n, $name['type'], $name['sort'], $name['fullNN'],
));
}
}
@@ -978,15 +979,16 @@ function convert_inline_media(Tree $tree, $gedrec) {
while (preg_match('/\n3 OBJE(?:\n[4-9].+)+/', $gedrec, $match)) {
$gedrec = str_replace($match[0], create_media_object(3, $match[0], $tree), $gedrec);
}
+
return $gedrec;
}
/**
* Create a new media object, from inline media data.
*
- * @param integer $level
- * @param string $gedrec
- * @param Tree $tree
+ * @param int $level
+ * @param string $gedrec
+ * @param Tree $tree
*
* @return string
*/
@@ -1007,7 +1009,7 @@ function create_media_object($level, $gedrec, Tree $tree) {
$xref = Database::prepare(
"SELECT m_id FROM `##media` WHERE m_filename = ? AND m_titl = ? AND m_file = ?"
)->execute(array(
- $file, $titl, $tree->getTreeId()
+ $file, $titl, $tree->getTreeId(),
))->fetchOne();
if (!$xref) {
@@ -1023,7 +1025,7 @@ function create_media_object($level, $gedrec, Tree $tree) {
Database::prepare(
"INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom) VALUES (?, ?, ?, ?, ?, ?, ?)"
)->execute(array(
- $xref, $record->extension(), $record->getMediaType(), $record->title, $record->file, $tree->getTreeId(), $gedrec
+ $xref, $record->extension(), $record->getMediaType(), $record->title, $record->file, $tree->getTreeId(), $gedrec,
));
}
@@ -1033,8 +1035,8 @@ function create_media_object($level, $gedrec, Tree $tree) {
/**
* Accept all pending changes for a specified record.
*
- * @param string $xref
- * @param integer $ged_id
+ * @param string $xref
+ * @param int $ged_id
*/
function accept_all_changes($xref, $ged_id) {
$changes = Database::prepare(
@@ -1080,15 +1082,16 @@ function reject_all_changes(GedcomRecord $record) {
/**
* update a record in the database
*
- * @param string $gedrec
- * @param integer $ged_id
- * @param boolean $delete
+ * @param string $gedrec
+ * @param int $ged_id
+ * @param bool $delete
*/
function update_record($gedrec, $ged_id, $delete) {
if (preg_match('/^0 @(' . WT_REGEX_XREF . ')@ (' . WT_REGEX_TAG . ')/', $gedrec, $match)) {
list(, $gid, $type) = $match;
} else {
echo "ERROR: Invalid gedcom record.";
+
return;
}
diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index 72b9be90bd..aef9531b27 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -21,7 +21,7 @@ namespace Fisharebest\Webtrees;
*
* @param string $val
*
- * @return integer
+ * @return int
*/
function return_bytes($val) {
if (!$val) {
@@ -48,7 +48,7 @@ function return_bytes($val) {
*
* @param string $serverFilename
*
- * @return boolean
+ * @return bool
*/
function hasMemoryForImage($serverFilename) {
// find out how much total memory this script can access
@@ -72,7 +72,7 @@ function hasMemoryForImage($serverFilename) {
// from comments on http://www.php.net/imagecreatefromjpeg
if ($imgsize && isset($imgsize['bits']) && (isset($imgsize['channels']))) {
$memoryNeeded = round(($imgsize[0] * $imgsize[1] * $imgsize['bits'] * $imgsize['channels'] / 8 + Pow(2, 16)) * 1.65);
- $memorySpare = $memoryAvailable - $memoryUsed - $memoryNeeded;
+ $memorySpare = $memoryAvailable - $memoryUsed - $memoryNeeded;
if ($memorySpare > 0) {
// we have enough memory to load this file
return true;
@@ -80,6 +80,7 @@ function hasMemoryForImage($serverFilename) {
// not enough memory to load this file
$image_info = sprintf('%.2fKB, %d × %d %d bits %d channels', filesize($serverFilename) / 1024, $imgsize[0], $imgsize[1], $imgsize['bits'], $imgsize['channels']);
Log::addMediaLog('Cannot create thumbnail ' . $serverFilename . ' (' . $image_info . ') memory avail: ' . $memoryAvailable . ' used: ' . $memoryUsed . ' needed: ' . $memoryNeeded . ' spare: ' . $memorySpare);
+
return false;
}
} else {
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index e2d3dbae6a..ab5cc8880b 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -23,8 +23,8 @@ use Rhumsaa\Uuid\Uuid;
*
* find and print a given individuals information for a pedigree chart
*
- * @param Individual $person The person to print
- * @param integer $show_full the style to print the box in, 0 for smaller boxes, 1 for larger boxes
+ * @param Individual $person The person to print
+ * @param int $show_full The style to print the box in, 0 for smaller boxes, 1 for larger boxes
*/
function print_pedigree_person(Individual $person = null, $show_full = 1) {
@@ -50,9 +50,9 @@ function print_pedigree_person(Individual $person = null, $show_full = 1) {
* print a note record
*
* @param string $text
- * @param integer $nlevel the level of the note record
- * @param string $nrec the note record to print
- * @param boolean $textOnly Don't print the "Note: " introduction
+ * @param int $nlevel the level of the note record
+ * @param string $nrec the note record to print
+ * @param bool $textOnly Don't print the "Note: " introduction
*
* @return string
*/
@@ -97,6 +97,7 @@ function print_note_record($text, $nlevel, $nrec, $textOnly = false) {
list($text) = explode("\n", strip_tags($html));
$first_line = strlen($text) > 100 ? mb_substr($text, 0, 100) . I18N::translate('…') : $text;
}
+
return
'<div class="fact_NOTE"><span class="label">' .
'<a href="#" onclick="expand_layer(\'' . $element_id . '\'); return false;"><i id="' . $element_id . '_img" class="icon-plus"></i></a> ' . GedcomTag::getLabel($label) . ':</span> ' . '<span id="' . $element_id . '-alt">' . $first_line . '</span>' .
@@ -108,19 +109,19 @@ function print_note_record($text, $nlevel, $nrec, $textOnly = false) {
/**
* Print all of the notes in this fact record
*
- * @param string $factrec the factrecord to print the notes from
- * @param integer $level The level of the factrecord
- * @param boolean $textOnly Don't print the "Note: " introduction
+ * @param string $factrec The factrecord to print the notes from
+ * @param int $level The level of the factrecord
+ * @param bool $textOnly Don't print the "Note: " introduction
*
* @return string HTML
*/
function print_fact_notes($factrec, $level, $textOnly = false) {
global $WT_TREE;
- $data = '';
+ $data = '';
$previous_spos = 0;
- $nlevel = $level + 1;
- $ct = preg_match_all("/$level NOTE (.*)/", $factrec, $match, PREG_SET_ORDER);
+ $nlevel = $level + 1;
+ $ct = preg_match_all("/$level NOTE (.*)/", $factrec, $match, PREG_SET_ORDER);
for ($j = 0; $j < $ct; $j++) {
$spos1 = strpos($factrec, $match[$j][0], $previous_spos);
$spos2 = strpos($factrec . "\n$level", "\n$level", $spos1 + 1);
@@ -128,7 +129,7 @@ function print_fact_notes($factrec, $level, $textOnly = false) {
$spos2 = strlen($factrec);
}
$previous_spos = $spos2;
- $nrec = substr($factrec, $spos1, $spos2 - $spos1);
+ $nrec = substr($factrec, $spos1, $spos2 - $spos1);
if (!isset($match[$j][1])) {
$match[$j][1] = '';
}
@@ -139,7 +140,7 @@ function print_fact_notes($factrec, $level, $textOnly = false) {
if ($note) {
if ($note->canShow()) {
$noterec = $note->getGedcom();
- $nt = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
+ $nt = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match);
$data .= print_note_record(($nt > 0) ? $n1match[1] : "", 1, $noterec, $textOnly);
if (!$textOnly) {
if (strpos($noterec, '1 SOUR') !== false) {
@@ -159,6 +160,7 @@ function print_fact_notes($factrec, $level, $textOnly = false) {
}
}
}
+
return $data;
}
@@ -279,6 +281,7 @@ function format_asso_rela_record(Fact $event) {
}
$html .= '<div class="fact_ASSO">' . $asso . '</div>';
}
+
return $html;
}
@@ -291,15 +294,15 @@ function format_asso_rela_record(Fact $event) {
* @return string HTML
*/
function format_parents_age(Individual $person, Date $birth_date) {
- $html = '';
+ $html = '';
$families = $person->getChildFamilies();
// Multiple sets of parents (e.g. adoption) cause complications, so ignore.
if ($birth_date->isOK() && count($families) == 1) {
$family = current($families);
foreach ($family->getSpouses() as $parent) {
if ($parent->getBirthDate()->isOK()) {
- $sex = $parent->getSexImage();
- $age = Date::getAge($parent->getBirthDate(), $birth_date, 2);
+ $sex = $parent->getSexImage();
+ $age = Date::getAge($parent->getBirthDate(), $birth_date, 2);
$deatdate = $parent->getDeathDate();
switch ($parent->getSex()) {
case 'F':
@@ -328,6 +331,7 @@ function format_parents_age(Individual $person, Date $birth_date) {
$html = '<span class="age">' . $html . '</span>';
}
}
+
return $html;
}
@@ -336,8 +340,8 @@ function format_parents_age(Individual $person, Date $birth_date) {
*
* @param Fact $event event containing the date/age
* @param GedcomRecord $record the person (or couple) whose ages should be printed
- * @param boolean $anchor option to print a link to calendar
- * @param boolean $time option to print TIME value
+ * @param bool $anchor option to print a link to calendar
+ * @param bool $time option to print TIME value
*
* @return string
*/
@@ -474,9 +478,9 @@ function format_fact_date(Fact $event, GedcomRecord $record, $anchor, $time) {
* print fact PLACe TEMPle STATus
*
* @param Fact $event gedcom fact record
- * @param boolean $anchor to print a link to placelist
- * @param boolean $sub_records to print place subrecords
- * @param boolean $lds to print LDS TEMPle and STATus
+ * @param bool $anchor to print a link to placelist
+ * @param bool $sub_records to print place subrecords
+ * @param bool $lds to print LDS TEMPle and STATus
*
* @return string HTML
*/
@@ -499,13 +503,13 @@ function format_fact_place(Fact $event, $anchor = false, $sub_records = false, $
}
}
$map_lati = "";
- $cts = preg_match('/\d LATI (.*)/', $placerec, $match);
+ $cts = preg_match('/\d LATI (.*)/', $placerec, $match);
if ($cts > 0) {
$map_lati = $match[1];
$html .= '<br><span class="label">' . GedcomTag::getLabel('LATI') . ': </span>' . $map_lati;
}
$map_long = '';
- $cts = preg_match('/\d LONG (.*)/', $placerec, $match);
+ $cts = preg_match('/\d LONG (.*)/', $placerec, $match);
if ($cts > 0) {
$map_long = $match[1];
$html .= ' <span class="label">' . GedcomTag::getLabel('LONG') . ': </span>' . $map_long;
@@ -534,6 +538,7 @@ function format_fact_place(Fact $event, $anchor = false, $sub_records = false, $
}
}
}
+
return $html;
}
@@ -572,6 +577,7 @@ function CheckFactUnique($uniquefacts, $recfacts, $type) {
}
}
}
+
return $uniquefacts;
}
@@ -588,7 +594,7 @@ function print_add_new_fact($id, $usedfacts, $type) {
// -- Add from clipboard
if (is_array(Session::get('clipboard'))) {
$newRow = true;
- foreach (array_reverse(Session::get('clipboard'), true) as $fact_id=>$fact) {
+ foreach (array_reverse(Session::get('clipboard'), true) as $fact_id => $fact) {
if ($fact["type"] == $type || $fact["type"] == 'all') {
if ($newRow) {
$newRow = false;
@@ -619,35 +625,35 @@ function print_add_new_fact($id, $usedfacts, $type) {
// -- Add from pick list
switch ($type) {
case "INDI":
- $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "FAM":
- $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "SOUR":
- $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "NOTE":
- $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "REPO":
- $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
default:
return;
}
- $addfacts = array_merge(CheckFactUnique($uniquefacts, $usedfacts, $type), $addfacts);
- $quickfacts = array_intersect($quickfacts, $addfacts);
+ $addfacts = array_merge(CheckFactUnique($uniquefacts, $usedfacts, $type), $addfacts);
+ $quickfacts = array_intersect($quickfacts, $addfacts);
$translated_addfacts = array();
foreach ($addfacts as $addfact) {
$translated_addfacts[$addfact] = GedcomTag::getLabel($addfact);
@@ -662,7 +668,7 @@ function print_add_new_fact($id, $usedfacts, $type) {
echo '<form method="get" name="newfactform" action="?" onsubmit="return false;">';
echo '<select id="newfact" name="newfact">';
echo '<option value="" disabled selected>' . I18N::translate('&lt;select&gt;') . '</option>';
- foreach ($translated_addfacts as $fact=>$fact_name) {
+ foreach ($translated_addfacts as $fact => $fact_name) {
echo '<option value="', $fact, '">', $fact_name, '</option>';
}
if ($type == 'INDI' || $type == 'FAM') {
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php
index db8a8f4054..a84a01a220 100644
--- a/includes/functions/functions_print_facts.php
+++ b/includes/functions/functions_print_facts.php
@@ -39,12 +39,15 @@ function print_fact(Fact $fact, GedcomRecord $record) {
switch ($fact->getTag()) {
case 'NOTE':
print_main_notes($fact, 1);
+
return;
case 'SOUR':
print_main_sources($fact, 1);
+
return;
case 'OBJE':
print_main_media($fact, 1);
+
return;
case 'FAMC':
case 'FAMS':
@@ -478,15 +481,15 @@ function print_repository_record($xref) {
* this function is called by the print_fact function and other functions to
* print any source information attached to the fact
*
- * @param string $factrec The fact record to look for sources in
- * @param integer $level The level to look for sources at
+ * @param string $factrec The fact record to look for sources in
+ * @param int $level The level to look for sources at
*
* @return string HTML text
*/
function print_fact_sources($factrec, $level) {
global $WT_TREE;
- $data = '';
+ $data = '';
$nlevel = $level + 1;
// -- Systems not using source records [ 1046971 ]
@@ -497,10 +500,10 @@ function print_fact_sources($factrec, $level) {
}
}
// -- find source for each fact
- $ct = preg_match_all("/$level SOUR @(.*)@/", $factrec, $match, PREG_SET_ORDER);
+ $ct = preg_match_all("/$level SOUR @(.*)@/", $factrec, $match, PREG_SET_ORDER);
$spos2 = 0;
for ($j = 0; $j < $ct; $j++) {
- $sid = $match[$j][1];
+ $sid = $match[$j][1];
$source = Source::getInstance($sid, $WT_TREE);
if ($source) {
if ($source->canShow()) {
@@ -510,7 +513,7 @@ function print_fact_sources($factrec, $level) {
$spos2 = strlen($factrec);
}
$srec = substr($factrec, $spos1, $spos2 - $spos1);
- $lt = preg_match_all("/$nlevel \w+/", $srec, $matches);
+ $lt = preg_match_all("/$nlevel \w+/", $srec, $matches);
$data .= '<div class="fact_SOUR">';
$data .= '<span class="label">';
$elementID = Uuid::uuid4();
@@ -561,8 +564,8 @@ function print_fact_sources($factrec, $level) {
/**
* Print the links to media objects
*
- * @param string $factrec
- * @param integer $level
+ * @param string $factrec
+ * @param int $level
*/
function print_media_links($factrec, $level) {
global $WT_TREE;
@@ -574,7 +577,7 @@ function print_media_links($factrec, $level) {
$objectNum = 0;
while ($objectNum < count($omatch)) {
$media_id = $omatch[$objectNum][1];
- $media = Media::getInstance($media_id, $WT_TREE);
+ $media = Media::getInstance($media_id, $WT_TREE);
if ($media) {
if ($media->canShow()) {
if ($objectNum > 0) {
@@ -605,7 +608,7 @@ function print_media_links($factrec, $level) {
}
$ct = preg_match("/WT_FAMILY_ID: (.*)/", $factrec, $match);
if ($ct > 0) {
- $famid = trim($match[1]);
+ $famid = trim($match[1]);
$family = Family::getInstance($famid, $spouse->getTree());
if ($family) {
if ($spouse) {
@@ -631,7 +634,7 @@ function print_media_links($factrec, $level) {
* Print a row for the sources tab on the individual page.
*
* @param Fact $fact
- * @param integer $level
+ * @param int $level
*/
function print_main_sources(Fact $fact, $level) {
$factrec = $fact->getGedcom();
@@ -652,16 +655,16 @@ function print_main_sources(Fact $fact, $level) {
}
// -- find source for each fact
- $ct = preg_match_all("/($level SOUR (.+))/", $factrec, $match, PREG_SET_ORDER);
+ $ct = preg_match_all("/($level SOUR (.+))/", $factrec, $match, PREG_SET_ORDER);
$spos2 = 0;
for ($j = 0; $j < $ct; $j++) {
- $sid = trim($match[$j][2], '@');
+ $sid = trim($match[$j][2], '@');
$spos1 = strpos($factrec, $match[$j][1], $spos2);
$spos2 = strpos($factrec, "\n$level", $spos1);
if (!$spos2) {
$spos2 = strlen($factrec);
}
- $srec = substr($factrec, $spos1, $spos2 - $spos1);
+ $srec = substr($factrec, $spos1, $spos2 - $spos1);
$source = Source::getInstance($sid, $fact->getParent()->getTree());
// Allow access to "1 SOUR @non_existent_source@", so it can be corrected/deleted
if (!$source || $source->canShow()) {
@@ -677,7 +680,7 @@ function print_main_sources(Fact $fact, $level) {
echo ' ', $styleadd, ' width20">';
$factlines = explode("\n", $factrec); // 1 BIRT Y\n2 SOUR ...
$factwords = explode(" ", $factlines[0]); // 1 BIRT Y
- $factname = $factwords[1]; // BIRT
+ $factname = $factwords[1]; // BIRT
if ($factname == 'EVEN' || $factname == 'FACT') {
// Add ' EVEN' to provide sensible output for an event with an empty TYPE record
$ct = preg_match("/2 TYPE (.*)/", $factrec, $ematch);
@@ -829,13 +832,13 @@ function printSourceStructure($textSOUR) {
function getSourceStructure($srec) {
// Set up the output array
$textSOUR = array(
- 'PAGE'=>'',
- 'EVEN'=>'',
- 'ROLE'=>'',
- 'DATA'=>'',
- 'DATE'=>'',
- 'TEXT'=>array(),
- 'QUAY'=>'',
+ 'PAGE' => '',
+ 'EVEN' => '',
+ 'ROLE' => '',
+ 'DATA' => '',
+ 'DATE' => '',
+ 'TEXT' => array(),
+ 'QUAY' => '',
);
if ($srec) {
@@ -870,7 +873,7 @@ function getSourceStructure($srec) {
* Print a row for the notes tab on the individual page.
*
* @param Fact $fact
- * @param integer $level
+ * @param int $level
*/
function print_main_notes(Fact $fact, $level) {
$factrec = $fact->getGedcom();
@@ -940,8 +943,8 @@ function print_main_notes(Fact $fact, $level) {
}
$factlines = explode("\n", $factrec); // 1 BIRT Y\n2 NOTE ...
$factwords = explode(" ", $factlines[0]); // 1 BIRT Y
- $factname = $factwords[1]; // BIRT
- $parent = GedcomRecord::getInstance($pid, $fact->getParent()->getTree());
+ $factname = $factwords[1]; // BIRT
+ $parent = GedcomRecord::getInstance($pid, $fact->getParent()->getTree());
if ($factname == 'EVEN' || $factname == 'FACT') {
// Add ' EVEN' to provide sensible output for an event with an empty TYPE record
$ct = preg_match("/2 TYPE (.*)/", $factrec, $ematch);
@@ -1017,7 +1020,7 @@ function print_main_notes(Fact $fact, $level) {
* Print a row for the media tab on the individual page.
*
* @param Fact $fact
- * @param integer $level
+ * @param int $level
*/
function print_main_media(Fact $fact, $level) {
$factrec = $fact->getGedcom();
@@ -1053,7 +1056,7 @@ function print_main_media(Fact $fact, $level) {
preg_match("/^\d (\w*)/", $factrec, $factname);
$factlines = explode("\n", $factrec); // 1 BIRT Y\n2 SOUR ...
$factwords = explode(" ", $factlines[0]); // 1 BIRT Y
- $factname = $factwords[1]; // BIRT
+ $factname = $factwords[1]; // BIRT
if ($factname == 'EVEN' || $factname == 'FACT') {
// Add ' EVEN' to provide sensible output for an event with an empty TYPE record
$ct = preg_match("/2 TYPE (.*)/", $factrec, $ematch);
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index bcfdf93204..f1b78b0b94 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -287,7 +287,7 @@ function format_indi_table($datalist, $option = '') {
</tfoot>
<tbody>';
- $d100y = new Date(date('Y') - 100); // 100 years ago
+ $d100y = new Date(date('Y') - 100); // 100 years ago
$unique_indis = array(); // Don't double-count indis with multiple names.
foreach ($datalist as $key => $person) {
if (!$person->canShowName()) {
@@ -310,11 +310,11 @@ function format_indi_table($datalist, $option = '') {
$title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $person)) . '"';
}
if ($num == $person->getPrimaryName()) {
- $class = ' class="name2"';
- $sex_image = $person->getSexImage();
+ $class = ' class="name2"';
+ $sex_image = $person->getSexImage();
list($surn, $givn) = explode(',', $name['sort']);
} else {
- $class = '';
+ $class = '';
$sex_image = '';
}
$html .= '<a ' . $title . ' href="' . $person->getHtmlUrl() . '"' . $class . '>' . highlight_search_hits($name['full']) . '</a>' . $sex_image . '<br>';
@@ -573,7 +573,7 @@ function format_fam_table($datalist) {
jQuery(".loading-image").css("display", "none");
');
- $stats = new Stats($WT_TREE);
+ $stats = new Stats($WT_TREE);
$max_age = max($stats->oldestMarriageMaleAge(), $stats->oldestMarriageFemaleAge()) + 1;
//-- init chart data
@@ -779,11 +779,11 @@ function format_fam_table($datalist) {
$title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $husb)) . '"';
}
if ($num == $husb->getPrimaryName()) {
- $class = ' class="name2"';
- $sex_image = $husb->getSexImage();
+ $class = ' class="name2"';
+ $sex_image = $husb->getSexImage();
list($surn, $givn) = explode(',', $name['sort']);
} else {
- $class = '';
+ $class = '';
$sex_image = '';
}
// Only show married names if they are the name we are filtering by.
@@ -824,11 +824,11 @@ function format_fam_table($datalist) {
$title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $wife)) . '"';
}
if ($num == $wife->getPrimaryName()) {
- $class = ' class="name2"';
- $sex_image = $wife->getSexImage();
+ $class = ' class="name2"';
+ $sex_image = $wife->getSexImage();
list($surn, $givn) = explode(',', $name['sort']);
} else {
- $class = '';
+ $class = '';
$sex_image = '';
}
// Only show married names if they are the name we are filtering by.
@@ -1014,7 +1014,7 @@ function format_sour_table($datalist) {
"SELECT CONCAT(l_to, '@', l_file), COUNT(*) FROM `##other` JOIN `##link` ON l_from = o_id AND l_file = o_file AND o_type = 'NOTE' AND l_type = 'SOUR' GROUP BY l_to, l_file"
)->fetchAssoc();
- $html = '';
+ $html = '';
$table_id = 'table-sour-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
@@ -1156,7 +1156,7 @@ function format_sour_table($datalist) {
function format_note_table($datalist) {
global $WT_TREE, $controller;
- $html = '';
+ $html = '';
$table_id = 'table-note-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
@@ -1278,7 +1278,7 @@ function format_repo_table($repositories) {
"SELECT CONCAT(l_to, '@', l_file), COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'REPO' GROUP BY l_to, l_file"
)->fetchAssoc();
- $html = '';
+ $html = '';
$table_id = 'table-repo-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
@@ -1385,7 +1385,7 @@ function format_repo_table($repositories) {
function format_media_table($media_objects) {
global $WT_TREE, $controller;
- $html = '';
+ $html = '';
$table_id = 'table-obje-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
@@ -1583,7 +1583,7 @@ function format_surname_table($surnames, $script, Tree $tree) {
*
* @param string[][] $surnames array (of SURN, of array of SPFX_SURN, of array of PID)
* @param string $script indilist or famlist
- * @param boolean $totals show totals after each name
+ * @param bool $totals show totals after each name
* @param Tree $tree generate links to this tree
*
* @return string
@@ -1626,8 +1626,8 @@ function format_surname_tagcloud($surnames, $script, $totals, Tree $tree) {
* Print a list of surnames.
*
* @param string[][] $surnames array (of SURN, of array of SPFX_SURN, of array of PID)
- * @param integer $style 1=bullet list, 2=semicolon-separated list, 3=tabulated list with up to 4 columns
- * @param boolean $totals show totals after each name
+ * @param int $style 1=bullet list, 2=semicolon-separated list, 3=tabulated list with up to 4 columns
+ * @param bool $totals show totals after each name
* @param string $script indilist or famlist
* @param Tree $tree Link back to the individual list in this tree
*
@@ -1673,7 +1673,7 @@ function format_surname_list($surnames, $style, $totals, $script, Tree $tree) {
case 2:
return implode(I18N::$list_separator, $html);
case 3:
- $i = 0;
+ $i = 0;
$count = count($html);
if ($count > 36) {
$col = 4;
@@ -1685,7 +1685,7 @@ function format_surname_list($surnames, $style, $totals, $script, Tree $tree) {
$col = 1;
}
$newcol = ceil($count / $col);
- $html2 = '<table class="list_table"><tr>';
+ $html2 = '<table class="list_table"><tr>';
$html2 .= '<td class="list_value" style="padding: 14px;">';
foreach ($html as $surns) {
@@ -1713,7 +1713,7 @@ function format_surname_list($surnames, $style, $totals, $script, Tree $tree) {
function print_changes_list($change_ids, $sort) {
global $WT_TREE;
- $n = 0;
+ $n = 0;
$arr = array();
foreach ($change_ids as $change_id) {
$record = GedcomRecord::getInstance($change_id, $WT_TREE);
@@ -1722,8 +1722,8 @@ function print_changes_list($change_ids, $sort) {
}
// setup sorting parameters
$arr[$n]['record'] = $record;
- $arr[$n]['jd'] = ($sort == 'name') ? 1 : $n;
- $arr[$n]['anniv'] = $record->lastChangeTimestamp(true);
+ $arr[$n]['jd'] = ($sort == 'name') ? 1 : $n;
+ $arr[$n]['anniv'] = $record->lastChangeTimestamp(true);
$arr[$n++]['fact'] = $record->getSortName(); // in case two changes have same timestamp
}
@@ -1765,7 +1765,7 @@ function print_changes_list($change_ids, $sort) {
function print_changes_table($change_ids, $sort) {
global $controller, $WT_TREE;
- $n = 0;
+ $n = 0;
$table_id = 'table-chan-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
switch ($sort) {
case 'name': //name
@@ -1877,18 +1877,18 @@ function print_changes_table($change_ids, $sort) {
/**
* Print a table of events
*
- * @param integer $startjd
- * @param integer $endjd
- * @param string $events
- * @param boolean $only_living
- * @param string $sort_by
+ * @param int $startjd
+ * @param int $endjd
+ * @param string $events
+ * @param bool $only_living
+ * @param string $sort_by
*
* @return string
*/
function print_events_table($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_living = false, $sort_by = 'anniv') {
global $controller, $WT_TREE;
- $html = '';
+ $html = '';
$table_id = 'table-even-' . Uuid::uuid4(); // lists requires a unique ID in case there are multiple lists per page
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
@@ -1916,8 +1916,8 @@ function print_events_table($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_
');
// Did we have any output? Did we skip anything?
- $output = 0;
- $filter = 0;
+ $output = 0;
+ $filter = 0;
$filtered_events = array();
foreach (get_events_list($startjd, $endjd, $events, $WT_TREE) as $fact) {
@@ -2027,11 +2027,11 @@ function print_events_table($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_
*
* This performs the same function as print_events_table(), but formats the output differently.
*
- * @param integer $startjd
- * @param integer $endjd
- * @param string $events
- * @param boolean $only_living
- * @param string $sort_by
+ * @param int $startjd
+ * @param int $endjd
+ * @param string $events
+ * @param bool $only_living
+ * @param string $sort_by
*
* @return string
*/
@@ -2039,10 +2039,10 @@ function print_events_list($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_l
global $WT_TREE;
// Did we have any output? Did we skip anything?
- $output = 0;
- $filter = 0;
+ $output = 0;
+ $filter = 0;
$filtered_events = array();
- $html = '';
+ $html = '';
foreach (get_events_list($startjd, $endjd, $events, $WT_TREE) as $fact) {
$record = $fact->getParent();
//-- only living people ?
@@ -2146,13 +2146,13 @@ function print_events_list($startjd, $endjd, $events = 'BIRT MARR DEAT', $only_l
* @return string
*/
function print_chart_by_age($data, $title) {
- $count = 0;
+ $count = 0;
$agemax = 0;
- $vmax = 0;
- $avg = 0;
+ $vmax = 0;
+ $avg = 0;
foreach ($data as $age => $v) {
- $n = strlen($v);
- $vmax = max($vmax, $n);
+ $n = strlen($v);
+ $vmax = max($vmax, $n);
$agemax = max($agemax, $age);
$count += $n;
$avg += $age * $n;
@@ -2160,7 +2160,7 @@ function print_chart_by_age($data, $title) {
if ($count < 1) {
return;
}
- $avg = round($avg / $count);
+ $avg = round($avg / $count);
$chart_url = "https://chart.googleapis.com/chart?cht=bvs"; // chart type
$chart_url .= "&amp;chs=725x150"; // size
$chart_url .= "&amp;chbh=3,2,2"; // bvg : 4,1,2
@@ -2218,9 +2218,9 @@ function print_chart_by_age($data, $title) {
*/
function print_chart_by_decade($data, $title) {
$count = 0;
- $vmax = 0;
+ $vmax = 0;
foreach ($data as $v) {
- $n = strlen($v);
+ $n = strlen($v);
$vmax = max($vmax, $n);
$count += $n;
}
diff --git a/includes/functions/functions_rtl.php b/includes/functions/functions_rtl.php
index 5dc68d2d50..f0586d248e 100644
--- a/includes/functions/functions_rtl.php
+++ b/includes/functions/functions_rtl.php
@@ -581,8 +581,8 @@ function beginCurrentSpan(&$result) {
/**
* Finish current span
*
- * @param string $result
- * @param boolean $theEnd
+ * @param string $result
+ * @param bool $theEnd
*/
function finishCurrentSpan(&$result, $theEnd = false) {
global $previousState, $currentState, $posSpanStart, $waitingText;
@@ -1090,10 +1090,10 @@ function finishCurrentSpan(&$result, $theEnd = false) {
}
/**
- * @param string $string
- * @param integer $width
- * @param string $sep
- * @param boolean $cut
+ * @param string $string
+ * @param int $width
+ * @param string $sep
+ * @param bool $cut
*
* @return string
*/
diff --git a/includes/php_53_compatibility.php b/includes/php_53_compatibility.php
index ac841376b3..39530a2dfe 100644
--- a/includes/php_53_compatibility.php
+++ b/includes/php_53_compatibility.php
@@ -64,8 +64,8 @@ if (!defined('PASSWORD_BCRYPT') && crypt("password", $hash) !== $hash) {
define('PASSWORD_BCRYPT', 1);
define('PASSWORD_DEFAULT', 1);
/**
- * @param string $password
- * @param integer $algo
+ * @param string $password
+ * @param int $algo
*
* @return string
*/
@@ -74,10 +74,10 @@ if (!defined('PASSWORD_BCRYPT') && crypt("password", $hash) !== $hash) {
}
/**
- * @param string $hash
- * @param integer $algo
+ * @param string $hash
+ * @param int $algo
*
- * @return boolean
+ * @return bool
*/
function password_needs_rehash($hash, $algo) {
return false;
@@ -87,7 +87,7 @@ if (!defined('PASSWORD_BCRYPT') && crypt("password", $hash) !== $hash) {
* @param string $password
* @param string $hash
*
- * @return boolean
+ * @return bool
*/
function password_verify($password, $hash) {
return crypt($password, $hash) === $hash;
@@ -100,6 +100,7 @@ if (!defined('PASSWORD_BCRYPT') && crypt("password", $hash) !== $hash) {
* @param string|null $code
*
* @link https://php.net/http_response_code
+ *
* @return int|null
*/
function http_response_code($code = null) {
@@ -222,7 +223,7 @@ function http_response_code($code = null) {
throw new \DomainException;
}
$http_response_code = $code;
- $protocol = Filter::server('SERVER_PROTOCOL', null, 'HTTP/1.0');
+ $protocol = Filter::server('SERVER_PROTOCOL', null, 'HTTP/1.0');
header($protocol . ' ' . $code . ' ' . $text);
}
diff --git a/includes/reportheader.php b/includes/reportheader.php
index 18d767cd34..1264ffefbe 100644
--- a/includes/reportheader.php
+++ b/includes/reportheader.php
@@ -20,18 +20,19 @@ namespace Fisharebest\Webtrees;
* element handlers array
*
* An array of element handler functions
+ *
* @global array $elementHandler
*/
-$elementHandler = array();
-$elementHandler['Report']['start'] = __NAMESPACE__ . '\\reportStartHandler';
-$elementHandler['var']['start'] = __NAMESPACE__ . '\\varStartHandler';
-$elementHandler['Title']['start'] = __NAMESPACE__ . '\\titleStartHandler';
-$elementHandler['Title']['end'] = __NAMESPACE__ . '\\titleEndHandler';
+$elementHandler = array();
+$elementHandler['Report']['start'] = __NAMESPACE__ . '\\reportStartHandler';
+$elementHandler['var']['start'] = __NAMESPACE__ . '\\varStartHandler';
+$elementHandler['Title']['start'] = __NAMESPACE__ . '\\titleStartHandler';
+$elementHandler['Title']['end'] = __NAMESPACE__ . '\\titleEndHandler';
$elementHandler['Description']['end'] = __NAMESPACE__ . '\\descriptionEndHandler';
-$elementHandler['Input']['start'] = __NAMESPACE__ . '\\inputStartHandler';
-$elementHandler['Input']['end'] = __NAMESPACE__ . '\\inputEndHandler';
+$elementHandler['Input']['start'] = __NAMESPACE__ . '\\inputStartHandler';
+$elementHandler['Input']['end'] = __NAMESPACE__ . '\\inputEndHandler';
-$text = "";
+$text = "";
$report_array = array();
/**
@@ -57,6 +58,7 @@ function startElement($parser, $name, $attrs) {
* xml end element handler
*
* this function is called whenever an ending element is reached
+ *
* @param resource $parser the resource handler for the xml parser
* @param string $name the name of the xml element parsed
*/
@@ -75,6 +77,7 @@ function endElement($parser, $name) {
*
* this function is called whenever raw character data is reached
* just print it to the screen
+ *
* @param resource $parser the resource handler for the xml parser
* @param string $data the name of the xml element parsed
*/
@@ -145,7 +148,7 @@ function titleEndHandler() {
global $report_array, $text;
$report_array["title"] = $text;
- $text = "";
+ $text = "";
}
/**
@@ -155,7 +158,7 @@ function descriptionEndHandler() {
global $report_array, $text;
$report_array["description"] = $text;
- $text = "";
+ $text = "";
}
/**
@@ -164,13 +167,13 @@ function descriptionEndHandler() {
function inputStartHandler($attrs) {
global $input, $text;
- $text = "";
- $input = array();
- $input["name"] = "";
- $input["type"] = "";
- $input["lookup"] = "";
+ $text = "";
+ $input = array();
+ $input["name"] = "";
+ $input["type"] = "";
+ $input["lookup"] = "";
$input["default"] = "";
- $input["value"] = "";
+ $input["value"] = "";
$input["options"] = "";
if (isset($attrs["name"])) {
$input["name"] = $attrs["name"];
@@ -213,5 +216,5 @@ function inputEndHandler() {
$report_array["inputs"] = array();
}
$report_array["inputs"][] = $input;
- $text = "";
+ $text = "";
}
diff --git a/includes/session.php b/includes/session.php
index b7bd5124d8..afa7c92634 100644
--- a/includes/session.php
+++ b/includes/session.php
@@ -25,6 +25,7 @@ use PDOException;
// WT_SCRIPT_NAME is defined in each script that the user is permitted to load.
if (!defined('WT_SCRIPT_NAME')) {
http_response_code(403);
+
return;
}
@@ -406,7 +407,7 @@ session_set_save_handler(
Session::start(array(
'gc_maxlifetime' => Site::getPreference('SESSION_TIME'),
- 'cookie_path' => parse_url(WT_BASE_URL, PHP_URL_PATH),
+ 'cookie_path' => parse_url(WT_BASE_URL, PHP_URL_PATH),
));
if (!Auth::isSearchEngine() && !Session::get('initiated')) {
diff --git a/index_edit.php b/index_edit.php
index b83763e606..3adb38eb8c 100644
--- a/index_edit.php
+++ b/index_edit.php
@@ -137,7 +137,7 @@ if ($action === 'update') {
}
}
// deleted blocks
- foreach ($blocks[$location] as $block_id=>$block_name) {
+ foreach ($blocks[$location] as $block_id => $block_name) {
if (!in_array($block_id, $main) && !in_array($block_id, $right)) {
Database::prepare("DELETE FROM `##block_setting` WHERE block_id=?")->execute(array($block_id));
Database::prepare("DELETE FROM `##block` WHERE block_id=?")->execute(array($block_id));
@@ -272,7 +272,6 @@ $controller
var block_descr = new Array();
');
-
// Load Block Description array for use by javascript
foreach ($all_blocks as $block_name => $block) {
$controller->addInlineJavascript(
@@ -314,7 +313,7 @@ $controller
// NOTE: Row 2 column 2: Left (Main) block list
echo '<td class="optionbox center">';
echo '<select multiple="multiple" id="main_select" name="main[]" size="10" onchange="show_description(\'main_select\');">';
- foreach ($blocks['main'] as $block_id=>$block_name) {
+ foreach ($blocks['main'] as $block_id => $block_name) {
echo '<option value="', $block_id, '">', $all_blocks[$block_name]->getTitle(), '</option>';
}
echo '</select>';
@@ -331,7 +330,7 @@ $controller
// Row 2 column 4: Middle (Available) block list
echo '<td class="optionbox center">';
echo '<select id="available_select" name="available[]" size="10" onchange="show_description(\'available_select\');">';
- foreach ($all_blocks as $block_name=>$block) {
+ foreach ($all_blocks as $block_name => $block) {
echo '<option value="', $block_name, '">', $block->getTitle(), '</option>';
}
echo '</select>';
@@ -348,7 +347,7 @@ $controller
// NOTE: Row 2 column 6: Right block list
echo '<td class="optionbox center">';
echo '<select multiple="multiple" id="right_select" name="right[]" size="10" onchange="show_description(\'right_select\');">';
- foreach ($blocks['side'] as $block_id=>$block_name) {
+ foreach ($blocks['side'] as $block_id => $block_name) {
echo '<option value="', $block_id, '">', $all_blocks[$block_name]->getTitle(), '</option>';
}
echo '</select>';
diff --git a/indilist.php b/indilist.php
index 089fd4cef3..aeb0080f9c 100644
--- a/indilist.php
+++ b/indilist.php
@@ -159,7 +159,7 @@ if (!Auth::isSearchEngine()) {
$list[] = '<a href="' . WT_SCRIPT_NAME . '?show_all=yes' . '&amp;ged=' . $WT_TREE->getNameUrl() . '">' . I18N::translate('All') . '</a>';
}
}
-echo '<p class="center alpha_index">', join(' | ', $list), '</p>';
+echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
// Search spiders don't get an option to show/hide the surname sublists,
// nor does it make sense on the all/unknown/surname views
@@ -248,7 +248,7 @@ if ($show === 'indi' || $show === 'surn') {
if ($show_all === 'no') {
echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
}
- echo '<p class="center alpha_index">', join(' | ', $list), '</p>';
+ echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
}
}
if ($show === 'indi') {
diff --git a/individual.php b/individual.php
index 6bd8956844..c0ec04025f 100644
--- a/individual.php
+++ b/individual.php
@@ -32,7 +32,7 @@ $controller
if ($controller->record && $controller->record->canShow()) {
if (Filter::get('action') == 'ajax') {
$controller->ajaxRequest();
-
+
return;
}
// Generate the sidebar content *before* we display the page header,
@@ -82,13 +82,13 @@ if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
echo '<h2>', $controller->record->getFullName(), '</h2>';
echo '<p class="ui-state-highlight">', I18N::translate('The details of this individual are private.'), '</p>';
-
+
return;
} else {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This individual does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
diff --git a/login.php b/login.php
index b35ab7f9cc..93e48517ee 100644
--- a/login.php
+++ b/login.php
@@ -195,7 +195,7 @@ default:
// hidden New Password block
echo '<div id="new_passwd">
- <form id="new_passwd_form" name="new_passwd_form" action="'.WT_LOGIN_URL . '" method="post">
+ <form id="new_passwd_form" name="new_passwd_form" action="' . WT_LOGIN_URL . '" method="post">
<input type="hidden" name="action" value="requestpw">
<h4>', I18N::translate('Lost password request'), '</h4>
<div>
@@ -216,9 +216,9 @@ case 'requestpw':
$user = User::findByIdentifier($user_name);
if ($user) {
- $passchars = 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
+ $passchars = 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$user_new_pw = '';
- $max = strlen($passchars) - 1;
+ $max = strlen($passchars) - 1;
for ($i = 0; $i < 8; $i++) {
$index = rand(0, $max);
$user_new_pw .= $passchars{$index};
@@ -532,7 +532,7 @@ case 'verify_hash':
$webmaster = User::find($WT_TREE->getPreference('WEBMASTER_USER_ID'));
I18N::init($webmaster->getPreference('language'));
- $user = User::findByIdentifier($user_name);
+ $user = User::findByIdentifier($user_name);
$mail1_body =
I18N::translate('Hello administrator…') .
Mail::EOL . Mail::EOL .
diff --git a/mediafirewall.php b/mediafirewall.php
index f4821e5f9a..60260e56b7 100644
--- a/mediafirewall.php
+++ b/mediafirewall.php
@@ -91,7 +91,7 @@ function applyWatermark($im, Tree $tree) {
/**
* @param resource $im
* @param string $text
- * @param integer $maxsize
+ * @param int $maxsize
* @param string $color
* @param string $font
* @param string $vpos
@@ -201,11 +201,11 @@ function embedText($im, $text, $maxsize, $color, $font, $vpos, $hpos) {
}
/**
- * @param integer $t
- * @param integer $mxl
- * @param string $text
+ * @param int $t
+ * @param int $mxl
+ * @param string $text
*
- * @return integer
+ * @return int
*/
function textlength($t, $mxl, $text) {
$taille_c = $t;
@@ -224,10 +224,10 @@ function textlength($t, $mxl, $text) {
* imagettftext is the function that is most likely to throw an error
* use this custom error handler to catch and log it
*
- * @param integer $errno
- * @param string $errstr
+ * @param int $errno
+ * @param string $errstr
*
- * @return boolean
+ * @return bool
*/
function imagettftextErrorHandler($errno, $errstr) {
global $useTTF, $serverFilename;
@@ -370,7 +370,7 @@ if ($if_modified_since === $filetimeHeader) {
// then check if the etag matches
if ($if_none_match === $etag) {
http_response_code(304);
-
+
return;
}
}
diff --git a/mediaviewer.php b/mediaviewer.php
index 69c794c6c2..9c2ab8a4dd 100644
--- a/mediaviewer.php
+++ b/mediaviewer.php
@@ -71,7 +71,7 @@ if ($controller->record && $controller->record->canShow()) {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This media object does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
@@ -118,7 +118,7 @@ echo '<div id="media-tabs">';
<td>
<table class="facts_table">';
$facts = $controller->getFacts();
- foreach ($facts as $f=>$fact) {
+ foreach ($facts as $f => $fact) {
print_fact($fact, $controller->record);
}
echo '</table>
diff --git a/message.php b/message.php
index 48850cc3f3..703c4b9bda 100644
--- a/message.php
+++ b/message.php
@@ -293,7 +293,7 @@ function addMessage($message) {
WT_CLIENT_IP,
$recipient->getUserId(),
$message['subject'],
- str_replace('<br>', '', $message['body']) // Remove the <br> that we added for the external email. TODO: create different messages
+ str_replace('<br>', '', $message['body']), // Remove the <br> that we added for the external email. TODO: create different messages
));
}
if ($message['method'] !== 'messaging') {
diff --git a/modules_v3/GEDFact_assistant/CENS_ctrl.php b/modules_v3/GEDFact_assistant/CENS_ctrl.php
index 367bb960e5..7f92be2c80 100644
--- a/modules_v3/GEDFact_assistant/CENS_ctrl.php
+++ b/modules_v3/GEDFact_assistant/CENS_ctrl.php
@@ -58,7 +58,7 @@ $summary = $person->formatFirstMajorFact(WT_EVENTS_BIRT, 2);
if (!($person->isDead())) {
// If alive display age
$bdate = $person->getBirthDate();
- $age = Date::getAgeGedcom($bdate);
+ $age = Date::getAgeGedcom($bdate);
if ($age != "") {
$summary .= "<span class=\"label\">" . I18N::translate('Age') . ":</span><span class=\"field\"> " . get_age_at_event($age, true) . "</span>";
}
diff --git a/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php b/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php
index fdbb593eb1..f473fa7f1a 100644
--- a/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php
+++ b/modules_v3/GEDFact_assistant/_CENS/addnoteaction_assisted.php
@@ -110,7 +110,7 @@ if (!empty($AUTH)) {
}
if (!empty($PUBL)) {
$newlines = preg_split("/\r?\n/", $PUBL, -1, PREG_SPLIT_NO_EMPTY);
- foreach ($newlines as $k=>$line) {
+ foreach ($newlines as $k => $line) {
if ($k == 0) {
$newgedrec .= "1 PUBL $line\n";
} else {
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php b/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
index 4f90f94c63..60cef958d3 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
@@ -36,9 +36,9 @@ if ($person->getBirthYear() == 0) {
} else {
$BirthYr = $person->getBirthYear();
}
-$fulln = rtrim($nam[0]['givn'], '*') . " " . $nam[0]['surname'];
-$fulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulln);
-$fulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulln);
+$fulln = rtrim($nam[0]['givn'], '*') . " " . $nam[0]['surname'];
+$fulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulln);
+$fulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulln);
$wholename = $fulln;
echo '<script src="', WT_STATIC_URL, WT_MODULES_DIR, 'GEDFact_assistant/_CENS/js/dynamicoptionlist.js"></script>';
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_find.php b/modules_v3/GEDFact_assistant/_CENS/census_3_find.php
index 748f65eba5..431fa399b8 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_3_find.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_3_find.php
@@ -64,7 +64,7 @@ echo "</table>";
echo "<br>";
if ($action == "filter") {
- $filter = trim($filter);
+ $filter = trim($filter);
$filter_array = explode(' ', preg_replace('/ {2,}/', ' ', $filter));
// Output Individual for GEDFact Assistant ======================
@@ -74,14 +74,14 @@ if ($action == "filter") {
echo "<tr><td class=\"list_value_wrap\"><ul>";
usort($myindilist, __NAMESPACE__ . '\GedcomRecord::compare');
foreach ($myindilist as $indi) {
- $nam = $indi->getAllNames();
+ $nam = $indi->getAllNames();
$wholename = rtrim($nam[0]['givn'], '*') . "&nbsp;" . $nam[0]['surname'];
- $fulln = rtrim($nam[0]['givn'], '*') . "&nbsp;" . $nam[0]['surname'];
- $fulln = str_replace('"', '\'', $fulln); // Replace double quotes
- $fulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulln);
- $fulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulln);
- $givn = rtrim($nam[0]['givn'], '*');
- $surn = $nam[0]['surname'];
+ $fulln = rtrim($nam[0]['givn'], '*') . "&nbsp;" . $nam[0]['surname'];
+ $fulln = str_replace('"', '\'', $fulln); // Replace double quotes
+ $fulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $fulln);
+ $fulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $fulln);
+ $givn = rtrim($nam[0]['givn'], '*');
+ $surn = $nam[0]['surname'];
if (isset($nam[1])) {
$fulmn = rtrim($nam[1]['givn'], '*') . "&nbsp;" . $nam[1]['surname'];
$fulmn = str_replace('"', '\'', $fulmn); // Replace double quotes
@@ -117,17 +117,17 @@ if ($action == "filter") {
//-- Get Children’s Name, DOB, DOD --------------------------
$chBLDarray = array();
if (isset($children)) {
- foreach ($children as $key=>$child) {
- $chnam = $child->getAllNames();
- $chfulln = rtrim($chnam[0]['givn'], '*') . " " . $chnam[0]['surname'];
- $chfulln = str_replace('"', "", $chfulln); // Must remove quotes completely here
- $chfulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $chfulln);
- $chfulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $chfulln); // Child’s Full Name
- $chdob = ($child->getBirthDate()->minimumJulianDay() + $child->getBirthDate()->maximumJulianDay()) / 2; // Child’s Date of Birth (Julian)
+ foreach ($children as $key => $child) {
+ $chnam = $child->getAllNames();
+ $chfulln = rtrim($chnam[0]['givn'], '*') . " " . $chnam[0]['surname'];
+ $chfulln = str_replace('"', "", $chfulln); // Must remove quotes completely here
+ $chfulln = str_replace("@N.N.", "(" . I18N::translate('unknown') . ")", $chfulln);
+ $chfulln = str_replace("@P.N.", "(" . I18N::translate('unknown') . ")", $chfulln); // Child’s Full Name
+ $chdob = ($child->getBirthDate()->minimumJulianDay() + $child->getBirthDate()->maximumJulianDay()) / 2; // Child’s Date of Birth (Julian)
if (!isset($chdob)) { $chdob = ""; }
- $chdod = ($child->getDeathDate()->minimumJulianDay() + $child->getDeathDate()->maximumJulianDay()) / 2; // Child’s Date of Death (Julian)
+ $chdod = ($child->getDeathDate()->minimumJulianDay() + $child->getDeathDate()->maximumJulianDay()) / 2; // Child’s Date of Death (Julian)
if (!isset($chdod)) { $chdod = ""; }
- $chBLD = ($chfulln . ", " . $chdob . ", " . $chdod);
+ $chBLD = ($chfulln . ", " . $chdob . ", " . $chdod);
array_push($chBLDarray, $chBLD);
}
}
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
index d805708867..58e98e6364 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
@@ -98,8 +98,8 @@ namespace Fisharebest\Webtrees;
//-- Parents Husbands Parents --------------------------------------
$gparent = $family->getHusband();
foreach ($gparent->getChildFamilies() as $cfamily) {
- $phusb = $cfamily->getHusband();
- $pwife = $cfamily->getWife();
+ $phusb = $cfamily->getHusband();
+ $pwife = $cfamily->getWife();
if ($phusb) { $HusbFBP = $phusb->getBirthPlace(); }
if ($pwife) { $HusbMBP = $pwife->getBirthPlace(); }
}
@@ -115,7 +115,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censdate);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -137,7 +137,7 @@ namespace Fisharebest\Webtrees;
"<?php echo $gparent->getXref(); ?>",
"<?php echo $fulln; ?>",
"<?php echo $fulmn; ?>",
- "<?php echo $person === $gparent ? 'head': Filter::escapeHtml($label); ?>",
+ "<?php echo $person === $gparent ? 'head' : Filter::escapeHtml($label); ?>",
"<?php echo $gparent->getSex(); ?>",
"<?php echo $married >= 0 ? 'M' : 'S'; ?>",
"<?php echo $marrdate->julianDay(); ?>",
@@ -177,8 +177,8 @@ namespace Fisharebest\Webtrees;
$gparent = $family->getWife();
$cfamily = null;
foreach ($gparent->getChildFamilies() as $cfamily) {
- $phusb = $cfamily->getHusband();
- $pwife = $cfamily->getWife();
+ $phusb = $cfamily->getHusband();
+ $pwife = $cfamily->getWife();
if ($phusb) { $WifeFBP = $phusb->getBirthPlace(); }
if ($pwife) { $WifeMBP = $pwife->getBirthPlace(); }
}
@@ -194,7 +194,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censyear);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -215,7 +215,7 @@ namespace Fisharebest\Webtrees;
"<?php echo $gparent->getXref(); ?>",
"<?php echo $fulln; ?>",
"<?php echo $fulmn; ?>",
- "<?php echo $person === $gparent ? 'head': Filter::escapeHtml($label); ?>",
+ "<?php echo $person === $gparent ? 'head' : Filter::escapeHtml($label); ?>",
"<?php echo $gparent->getSex(); ?>",
"<?php echo $married >= 0 && isset($nam[1]) ? 'M' : 'S'; ?>",
"<?php echo $marrdate->julianDay(); ?>",
@@ -268,7 +268,7 @@ namespace Fisharebest\Webtrees;
$marrdate = '';
foreach ($child->getSpouseFamilies() as $childfamily) {
$marrdate = $childfamily->getMarriageDate();
- $married = Date::compare($censdate, $marrdate);
+ $married = Date::compare($censdate, $marrdate);
}
$nam = $child->getAllNames();
$fulln = strip_tags($nam[0]['full']);
@@ -279,7 +279,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $child);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($child->getXref(), $label, $censyear);
$submenu = new Menu($spouselinks);
$menu->addSubmenu($submenu);
@@ -366,16 +366,16 @@ namespace Fisharebest\Webtrees;
//-- Step Husbands Details --------------------------------------
$married = Date::compare($censdate, $marrdate);
- $nam = $gparent->getAllNames();
- $fulln = strip_tags($nam[0]['full']);
- $fulmn = $fulln;
+ $nam = $gparent->getAllNames();
+ $fulln = strip_tags($nam[0]['full']);
+ $fulmn = $fulln;
foreach ($nam as $n) {
if ($n['type'] === '_MARNM') {
$fulmn = strip_tags($n['full']);
}
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censyear);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -406,9 +406,9 @@ namespace Fisharebest\Webtrees;
"<?php echo $gparent->getXref(); ?>",
"<?php echo $fulln; ?>",
"<?php echo $fulmn; ?>",
- "<?php echo $person === $gparent ? 'head': Filter::escapeHtml($label); ?>",
+ "<?php echo $person === $gparent ? 'head' : Filter::escapeHtml($label); ?>",
"<?php echo $gparent->getSex(); ?>",
- "<?php echo $married >= 0 ? 'M': 'S'; ?>",
+ "<?php echo $married >= 0 ? 'M' : 'S'; ?>",
"<?php echo $marrdate ? $marrdate->julianDay() : ''; ?>",
"<?php echo $gparent->getBirthDate()->julianDay(); ?>",
"<?php echo $censyear - $gparent->getbirthyear(); ?>",
@@ -444,8 +444,8 @@ namespace Fisharebest\Webtrees;
$gparent = $family->getWife();
$cfamily = null;
foreach ($gparent->getChildFamilies() as $cfamily) {
- $phusb = $cfamily->getHusband();
- $pwife = $cfamily->getWife();
+ $phusb = $cfamily->getHusband();
+ $pwife = $cfamily->getWife();
if ($phusb) { $WifeFBP = $phusb->getBirthPlace(); }
if ($pwife) { $WifeMBP = $pwife->getBirthPlace(); }
}
@@ -462,7 +462,7 @@ namespace Fisharebest\Webtrees;
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censyear);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -485,9 +485,9 @@ namespace Fisharebest\Webtrees;
"<?php echo $gparent->getXref(); ?>",
"<?php echo $fulln; ?>",
"<?php echo $fulmn; ?>",
- "<?php echo $person === $gparent ? 'head': Filter::escapeHtml($label); ?>",
+ "<?php echo $person === $gparent ? 'head' : Filter::escapeHtml($label); ?>",
"<?php echo $gparent->getSex(); ?>",
- "<?php echo $married >= 0 && isset($nam[1]) ? 'M': 'S'; ?>",
+ "<?php echo $married >= 0 && isset($nam[1]) ? 'M' : 'S'; ?>",
"<?php echo $marrdate ? $marrdate->julianDay() : ''; ?>",
"<?php echo $gparent->getBirthDate()->julianDay(); ?>",
"<?php echo $censyear - $gparent->getbirthyear(); ?>",
@@ -533,7 +533,7 @@ namespace Fisharebest\Webtrees;
}
}
- $nam = $child->getAllNames();
+ $nam = $child->getAllNames();
$fulln = strip_tags($nam[0]['full']);
$fulmn = $fulln;
foreach ($nam as $n) {
@@ -542,7 +542,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $child);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($child->getXref(), $label, $censyear);
$submenu = new Menu($spouselinks);
$menu->addSubmenu($submenu);
@@ -651,7 +651,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censyear);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -741,7 +741,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $gparent);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($gparent->getXref(), $label, $censyear);
$submenu = new Menu($parentlinks);
$menu->addSubmenu($submenu);
@@ -837,7 +837,7 @@ namespace Fisharebest\Webtrees;
}
}
$label = get_close_relationship_name($person, $child);
- $menu = new Menu($label);
+ $menu = new Menu($label);
print_pedigree_person_nav_cens($child->getXref(), $label, $censyear);
$submenu = new Menu($spouselinks);
$menu->addSubmenu($submenu);
@@ -912,8 +912,6 @@ namespace Fisharebest\Webtrees;
* @param string $pid The Gedcom Xref ID of the individual to print
* @param string $currpid
* @param string $censyear
- *
- * @return void
*/
function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
global $spouselinks, $parentlinks, $step_parentlinks, $persons, $person_step, $person_parent;
@@ -921,8 +919,8 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
$person = Individual::getInstance($pid, $WT_TREE);
- $tmp = array('M'=>'', 'F'=>'F', 'U'=>'NN');
- $isF = $tmp[$person->getSex()];
+ $tmp = array('M' => '', 'F' => 'F', 'U' => 'NN');
+ $isF = $tmp[$person->getSex()];
$spouselinks = '';
$parentlinks = '';
$step_parentlinks = '';
@@ -952,8 +950,8 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
// Parent families
foreach ($person->getChildFamilies() as $family) {
- $husb = $family->getHusband();
- $wife = $family->getWife();
+ $husb = $family->getHusband();
+ $wife = $family->getWife();
$children = $family->getChildren();
// Get Parent Children’s Name, DOB, DOD
@@ -975,17 +973,17 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
if ($husb) {
// Parent Husbands Parents
foreach ($husb->getChildFamilies() as $pfamily) {
- $phusb = $pfamily->getHusband();
- $pwife = $pfamily->getWife();
+ $phusb = $pfamily->getHusband();
+ $pwife = $pfamily->getWife();
if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
}
// Parent Husbands Details
$person_parent = 'Yes';
- $nam = $husb->getAllNames();
- $fulln = strip_tags($nam[0]['full']);
- $fulmn = $fulln;
+ $nam = $husb->getAllNames();
+ $fulln = strip_tags($nam[0]['full']);
+ $fulmn = $fulln;
foreach ($nam as $n) {
if ($n['type'] === '_MARNM') {
$fulmn = strip_tags($n['full']);
@@ -1040,8 +1038,8 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
if ($wife) {
// Parent Wifes Parents
foreach ($wife->getChildFamilies() as $pfamily) {
- $pwhusb = $pfamily->getHusband();
- $pwwife = $pfamily->getWife();
+ $pwhusb = $pfamily->getHusband();
+ $pwwife = $pfamily->getWife();
if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
}
@@ -1105,8 +1103,8 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
// Step families
foreach ($person->getChildStepFamilies() as $family) {
- $husb = $family->getHusband();
- $wife = $family->getWife();
+ $husb = $family->getHusband();
+ $wife = $family->getWife();
$children = $family->getChildren();
$marrdate = $family->getMarriageDate();
@@ -1130,16 +1128,16 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
if ($husb) {
// Step Husbands Parents
foreach ($husb->getChildFamilies() as $pfamily) {
- $phusb = $pfamily->getHusband();
- $pwife = $pfamily->getWife();
+ $phusb = $pfamily->getHusband();
+ $pwife = $pfamily->getWife();
if ($phusb) { $pHusbFBP = $phusb->getBirthPlace(); }
if ($pwife) { $pHusbMBP = $pwife->getBirthPlace(); }
}
//-- Step Husband Details ------------------------------
$person_step = 'Yes';
- $nam = $husb->getAllNames();
- $fulln = strip_tags($nam[0]['full']);
- $fulmn = $fulln;
+ $nam = $husb->getAllNames();
+ $fulln = strip_tags($nam[0]['full']);
+ $fulmn = $fulln;
foreach ($nam as $n) {
if ($n['type'] === '_MARNM') {
$fulmn = strip_tags($n['full']);
@@ -1199,16 +1197,16 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
if ($wife) {
// Step Wifes Parents
foreach ($wife->getChildFamilies() as $pfamily) {
- $pwhusb = $pfamily->getHusband();
- $pwwife = $pfamily->getWife();
+ $pwhusb = $pfamily->getHusband();
+ $pwwife = $pfamily->getWife();
if ($pwhusb) { $pWifeFBP = $pwhusb->getBirthPlace(); }
if ($pwwife) { $pWifeMBP = $pwwife->getBirthPlace(); }
}
// Step Wife Details
$person_step = 'Yes';
- $nam = $wife->getAllNames();
- $fulln = strip_tags($nam[0]['full']);
- $fulmn = $fulln;
+ $nam = $wife->getAllNames();
+ $fulln = strip_tags($nam[0]['full']);
+ $fulmn = $fulln;
foreach ($nam as $n) {
if ($n['type'] === '_MARNM') {
$fulmn = strip_tags($n['full']);
@@ -1263,7 +1261,7 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
// Spouse Families
foreach ($person->getSpouseFamilies() as $family) {
- $spouse = $family->getSpouse($person);
+ $spouse = $family->getSpouse($person);
$children = $family->getChildren();
//-- Get Spouse’s Children’s Name, DOB, DOD --------------------------
@@ -1286,14 +1284,14 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
// Spouse Parents
foreach ($spouse->getChildFamilies() as $pfamily) {
- $phusb = $pfamily->getHusband();
- $pwife = $pfamily->getWife();
+ $phusb = $pfamily->getHusband();
+ $pwife = $pfamily->getWife();
if ($phusb) { $pSpouseFBP = $phusb->getBirthPlace(); }
if ($pwife) { $pSpouseMBP = $pwife->getBirthPlace(); }
}
// Spouse Details
- $nam = $spouse->getAllNames();
+ $nam = $spouse->getAllNames();
$fulln = strip_tags($nam[0]['full']);
$fulmn = $fulln;
foreach ($nam as $n) {
@@ -1364,8 +1362,8 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
// Child’s Parents
foreach ($child->getChildFamilies() as $family) {
- $husb = $family->getHusband();
- $wife = $family->getWife();
+ $husb = $family->getHusband();
+ $wife = $family->getWife();
if ($husb) { $ChildFBP = $husb->getBirthPlace(); }
if ($wife) { $ChildMBP = $wife->getBirthPlace(); }
}
@@ -1385,7 +1383,7 @@ function print_pedigree_person_nav_cens($pid, $currpid, $censyear) {
}
// Child’s marriage status
- $marrdate = '';
+ $marrdate = '';
$chhusbnam = null;
foreach ($child->getSpouseFamilies() as $childfamily) {
$marrdate = $childfamily->getMarriageDate();
diff --git a/note.php b/note.php
index 376938173e..57d867a9b1 100644
--- a/note.php
+++ b/note.php
@@ -64,7 +64,7 @@ if ($controller->record && $controller->record->canShow()) {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This note does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
diff --git a/pedigree.php b/pedigree.php
index cfb3d0f135..1be56afa09 100644
--- a/pedigree.php
+++ b/pedigree.php
@@ -189,6 +189,7 @@ $controller
<?php
if ($controller->error_message) {
echo '<p class="ui-state-error">', $controller->error_message, '</p>';
+
return;
}
diff --git a/placelist.php b/placelist.php
index 58e760658d..2fbdf4e143 100644
--- a/placelist.php
+++ b/placelist.php
@@ -62,7 +62,7 @@ case 'list':
echo ' colspan="', $num_places > 20 ? 3 : 2, '"><i class="icon-place"></i> ';
echo I18N::translate('Place list');
echo '</td></tr><tr><td class="list_value_wrap"><ul>';
- foreach ($list_places as $n=>$list_place) {
+ foreach ($list_places as $n => $list_place) {
echo '<li><a href="', $list_place->getURL(), '">', $list_place->getReverseName(), '</a></li>';
if ($num_places > 20) {
if ($n == (int) ($num_places / 3)) {
@@ -84,7 +84,7 @@ case 'hierarchy':
$gm_module = Module::getModuleByName('googlemap');
// Find this place and its ID
- $place = new Place(implode(', ', array_reverse($parent)), $WT_TREE);
+ $place = new Place(implode(', ', array_reverse($parent)), $WT_TREE);
$place_id = $place->getPlaceId();
$child_places = $place->getChildPlaces();
@@ -109,7 +109,7 @@ case 'hierarchy':
echo '</h2>';
if ($gm_module && $gm_module->getSetting('GM_PLACE_HIERARCHY')) {
- $linklevels = '';
+ $linklevels = '';
$placelevels = '';
$place_names = array();
for ($j = 0; $j < $level; $j++) {
@@ -146,7 +146,7 @@ case 'hierarchy':
echo '<li><a href="', $child_place->getURL(), '" class="list_item">', $child_place->getPlaceName(), '</a></li>';
if ($gm_module && $gm_module->getSetting('GM_PLACE_HIERARCHY')) {
- list($tmp) = explode(', ', $child_place->getGedcomName(), 2);
+ list($tmp) = explode(', ', $child_place->getGedcomName(), 2);
$place_names[$n] = $tmp;
}
$n++;
@@ -188,7 +188,7 @@ case 'hierarchy':
if ($place_id && $action == 'show') {
// -- array of names
$myindilist = array();
- $myfamlist = array();
+ $myfamlist = array();
$positions =
Database::prepare("SELECT DISTINCT pl_gid FROM `##placelinks` WHERE pl_p_id=? AND pl_file=?")
diff --git a/relationship.php b/relationship.php
index 2a503061c8..da4febc130 100644
--- a/relationship.php
+++ b/relationship.php
@@ -105,12 +105,12 @@ if ($person1 && $person2) {
if ($person1 && $person2) {
if (I18N::direction() === 'ltr') {
$horizontal_arrow = '<br><i class="icon-rarrow"></i>';
- $diagonal1 = Theme::theme()->parameter('image-dline');
- $diagonal2 = Theme::theme()->parameter('image-dline2');
+ $diagonal1 = Theme::theme()->parameter('image-dline');
+ $diagonal2 = Theme::theme()->parameter('image-dline2');
} else {
$horizontal_arrow = '<br><i class="icon-larrow"></i>';
- $diagonal1 = Theme::theme()->parameter('image-dline2');
- $diagonal2 = Theme::theme()->parameter('image-dline');
+ $diagonal1 = Theme::theme()->parameter('image-dline2');
+ $diagonal2 = Theme::theme()->parameter('image-dline');
}
$up_arrow = ' <i class="icon-uarrow"></i>';
$down_arrow = ' <i class="icon-darrow"></i>';
diff --git a/repo.php b/repo.php
index af329f1ce1..59a28ae382 100644
--- a/repo.php
+++ b/repo.php
@@ -64,7 +64,7 @@ if ($controller->record && $controller->record->canShow()) {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This repository does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
@@ -108,6 +108,7 @@ echo '<div id="repo-tabs">
'_UID' => 6,
'CHAN' => 7,
);
+
return
(array_key_exists($x->getTag(), $order) ? $order[$x->getTag()] : PHP_INT_MAX)
-
@@ -127,7 +128,6 @@ echo '<div id="repo-tabs">
echo '</table>
</div>';
-
// Sources linked to this repository
if ($linked_sour) {
echo '<div id="source-repo">';
diff --git a/reportengine.php b/reportengine.php
index 1d891e42e8..1898a3985f 100644
--- a/reportengine.php
+++ b/reportengine.php
@@ -28,14 +28,14 @@ require './includes/session.php';
$controller = new PageController;
-$famid = Filter::get('famid', WT_REGEX_XREF);
-$pid = Filter::get('pid', WT_REGEX_XREF);
-$action = Filter::get('action', 'choose|setup|run', 'choose');
-$report = Filter::get('report');
-$output = Filter::get('output', 'HTML|PDF', 'PDF');
-$vars = Filter::get('vars');
+$famid = Filter::get('famid', WT_REGEX_XREF);
+$pid = Filter::get('pid', WT_REGEX_XREF);
+$action = Filter::get('action', 'choose|setup|run', 'choose');
+$report = Filter::get('report');
+$output = Filter::get('output', 'HTML|PDF', 'PDF');
+$vars = Filter::get('vars');
$varnames = Filter::get('varnames');
-$type = Filter::get('type');
+$type = Filter::get('type');
if (!is_array($vars)) {
$vars = array();
}
@@ -230,7 +230,7 @@ case 'setup':
echo '<select name="vars[', Filter::escapeHtml($input['name']), ']" id="', Filter::escapeHtml($input['name']), '_var">';
$options = preg_split('/[|]+/', $input['options']);
foreach ($options as $option) {
- $opt = explode('=>', $option);
+ $opt = explode('=>', $option);
list($value, $display) = $opt;
if (preg_match('/^I18N::number\((.+)\)$/', $display, $match)) {
$display = I18N::number($match[1]);
@@ -285,7 +285,7 @@ case 'setup':
case 'run':
if (strstr($report, 'report_singlepage.xml') !== false) {
- $DEBUG = false;
+ $DEBUG = false;
$pedigree = new \ReportPedigree;
return;
@@ -294,11 +294,11 @@ case 'run':
switch ($output) {
case 'HTML':
header('Content-type: text/html; charset=UTF-8');
- $wt_report = new ReportHtml;
+ $wt_report = new ReportHtml;
$ReportRoot = $wt_report;
break;
case 'PDF':
- $wt_report = new ReportPdf;
+ $wt_report = new ReportPdf;
$ReportRoot = $wt_report;
break;
}
@@ -310,60 +310,60 @@ case 'run':
*
* @global array $elementHandler
*/
- $elementHandler = array();
- $elementHandler['AgeAtDeath']['start'] = __NAMESPACE__ . '\\ageAtDeathStartHandler';
- $elementHandler['br']['start'] = __NAMESPACE__ . '\\brStartHandler';
- $elementHandler['Body']['start'] = __NAMESPACE__ . '\\bodyStartHandler';
- $elementHandler['Cell']['end'] = __NAMESPACE__ . '\\cellEndHandler';
- $elementHandler['Cell']['start'] = __NAMESPACE__ . '\\cellStartHandler';
- $elementHandler['Description']['end'] = __NAMESPACE__ . '\\descriptionEndHandler';
- $elementHandler['Description']['start'] = __NAMESPACE__ . '\\descriptionStartHandler';
- $elementHandler['Doc']['end'] = __NAMESPACE__ . '\\docEndHandler';
- $elementHandler['Doc']['start'] = __NAMESPACE__ . '\\docStartHandler';
- $elementHandler['Report']['end'] = '';
- $elementHandler['Report']['start'] = '';
- $elementHandler['Facts']['end'] = __NAMESPACE__ . '\\factsEndHandler';
- $elementHandler['Facts']['start'] = __NAMESPACE__ . '\\factsStartHandler';
- $elementHandler['Footer']['start'] = __NAMESPACE__ . '\\footerStartHandler';
- $elementHandler['Footnote']['end'] = __NAMESPACE__ . '\\footnoteEndHandler';
- $elementHandler['Footnote']['start'] = __NAMESPACE__ . '\\footnoteStartHandler';
- $elementHandler['FootnoteTexts']['start'] = __NAMESPACE__ . '\\footnoteTextsStartHandler';
- $elementHandler['Gedcom']['end'] = __NAMESPACE__ . '\\gedcomEndHandler';
- $elementHandler['Gedcom']['start'] = __NAMESPACE__ . '\\gedcomStartHandler';
- $elementHandler['GedcomValue']['start'] = __NAMESPACE__ . '\\gedcomValueStartHandler';
- $elementHandler['Generation']['start'] = __NAMESPACE__ . '\\generationStartHandler';
- $elementHandler['GetPersonName']['start'] = __NAMESPACE__ . '\\getPersonNameStartHandler';
- $elementHandler['Header']['start'] = __NAMESPACE__ . '\\headerStartHandler';
+ $elementHandler = array();
+ $elementHandler['AgeAtDeath']['start'] = __NAMESPACE__ . '\\ageAtDeathStartHandler';
+ $elementHandler['br']['start'] = __NAMESPACE__ . '\\brStartHandler';
+ $elementHandler['Body']['start'] = __NAMESPACE__ . '\\bodyStartHandler';
+ $elementHandler['Cell']['end'] = __NAMESPACE__ . '\\cellEndHandler';
+ $elementHandler['Cell']['start'] = __NAMESPACE__ . '\\cellStartHandler';
+ $elementHandler['Description']['end'] = __NAMESPACE__ . '\\descriptionEndHandler';
+ $elementHandler['Description']['start'] = __NAMESPACE__ . '\\descriptionStartHandler';
+ $elementHandler['Doc']['end'] = __NAMESPACE__ . '\\docEndHandler';
+ $elementHandler['Doc']['start'] = __NAMESPACE__ . '\\docStartHandler';
+ $elementHandler['Report']['end'] = '';
+ $elementHandler['Report']['start'] = '';
+ $elementHandler['Facts']['end'] = __NAMESPACE__ . '\\factsEndHandler';
+ $elementHandler['Facts']['start'] = __NAMESPACE__ . '\\factsStartHandler';
+ $elementHandler['Footer']['start'] = __NAMESPACE__ . '\\footerStartHandler';
+ $elementHandler['Footnote']['end'] = __NAMESPACE__ . '\\footnoteEndHandler';
+ $elementHandler['Footnote']['start'] = __NAMESPACE__ . '\\footnoteStartHandler';
+ $elementHandler['FootnoteTexts']['start'] = __NAMESPACE__ . '\\footnoteTextsStartHandler';
+ $elementHandler['Gedcom']['end'] = __NAMESPACE__ . '\\gedcomEndHandler';
+ $elementHandler['Gedcom']['start'] = __NAMESPACE__ . '\\gedcomStartHandler';
+ $elementHandler['GedcomValue']['start'] = __NAMESPACE__ . '\\gedcomValueStartHandler';
+ $elementHandler['Generation']['start'] = __NAMESPACE__ . '\\generationStartHandler';
+ $elementHandler['GetPersonName']['start'] = __NAMESPACE__ . '\\getPersonNameStartHandler';
+ $elementHandler['Header']['start'] = __NAMESPACE__ . '\\headerStartHandler';
$elementHandler['HighlightedImage']['start'] = __NAMESPACE__ . '\\highlightedImageStartHandler';
- $elementHandler['if']['end'] = __NAMESPACE__ . '\\ifEndHandler';
- $elementHandler['if']['start'] = __NAMESPACE__ . '\\ifStartHandler';
- $elementHandler['Image']['start'] = __NAMESPACE__ . '\\imageStartHandler';
- $elementHandler['Input']['end'] = '';
- $elementHandler['Input']['start'] = '';
- $elementHandler['Line']['start'] = __NAMESPACE__ . '\\lineStartHandler';
- $elementHandler['List']['end'] = __NAMESPACE__ . '\\listEndHandler';
- $elementHandler['List']['start'] = __NAMESPACE__ . '\\listStartHandler';
- $elementHandler['ListTotal']['start'] = __NAMESPACE__ . '\\listTotalStartHandler';
- $elementHandler['NewPage']['start'] = __NAMESPACE__ . '\\newPageStartHandler';
- $elementHandler['Now']['start'] = __NAMESPACE__ . '\\nowStartHandler';
- $elementHandler['PageHeader']['end'] = __NAMESPACE__ . '\\pageHeaderEndHandler';
- $elementHandler['PageHeader']['start'] = __NAMESPACE__ . '\\pageHeaderStartHandler';
- $elementHandler['PageNum']['start'] = __NAMESPACE__ . '\\pageNumStartHandler';
- $elementHandler['Relatives']['end'] = __NAMESPACE__ . '\\relativesEndHandler';
- $elementHandler['Relatives']['start'] = __NAMESPACE__ . '\\relativesStartHandler';
- $elementHandler['RepeatTag']['end'] = __NAMESPACE__ . '\\repeatTagEndHandler';
- $elementHandler['RepeatTag']['start'] = __NAMESPACE__ . '\\repeatTagStartHandler';
- $elementHandler['SetVar']['start'] = __NAMESPACE__ . '\\setVarStartHandler';
- $elementHandler['Style']['start'] = __NAMESPACE__ . '\\styleStartHandler';
- $elementHandler['Text']['end'] = __NAMESPACE__ . '\\textEndHandler';
- $elementHandler['Text']['start'] = __NAMESPACE__ . '\\textStartHandler';
- $elementHandler['TextBox']['end'] = __NAMESPACE__ . '\\textBoxEndHandler';
- $elementHandler['TextBox']['start'] = __NAMESPACE__ . '\\textBoxStartHandler';
- $elementHandler['Title']['end'] = __NAMESPACE__ . '\\titleEndHandler';
- $elementHandler['Title']['start'] = __NAMESPACE__ . '\\titleStartHandler';
- $elementHandler['TotalPages']['start'] = __NAMESPACE__ . '\\totalPagesStartHandler';
- $elementHandler['var']['start'] = __NAMESPACE__ . '\\varStartHandler';
- $elementHandler['sp']['start'] = __NAMESPACE__ . '\\spStartHandler';
+ $elementHandler['if']['end'] = __NAMESPACE__ . '\\ifEndHandler';
+ $elementHandler['if']['start'] = __NAMESPACE__ . '\\ifStartHandler';
+ $elementHandler['Image']['start'] = __NAMESPACE__ . '\\imageStartHandler';
+ $elementHandler['Input']['end'] = '';
+ $elementHandler['Input']['start'] = '';
+ $elementHandler['Line']['start'] = __NAMESPACE__ . '\\lineStartHandler';
+ $elementHandler['List']['end'] = __NAMESPACE__ . '\\listEndHandler';
+ $elementHandler['List']['start'] = __NAMESPACE__ . '\\listStartHandler';
+ $elementHandler['ListTotal']['start'] = __NAMESPACE__ . '\\listTotalStartHandler';
+ $elementHandler['NewPage']['start'] = __NAMESPACE__ . '\\newPageStartHandler';
+ $elementHandler['Now']['start'] = __NAMESPACE__ . '\\nowStartHandler';
+ $elementHandler['PageHeader']['end'] = __NAMESPACE__ . '\\pageHeaderEndHandler';
+ $elementHandler['PageHeader']['start'] = __NAMESPACE__ . '\\pageHeaderStartHandler';
+ $elementHandler['PageNum']['start'] = __NAMESPACE__ . '\\pageNumStartHandler';
+ $elementHandler['Relatives']['end'] = __NAMESPACE__ . '\\relativesEndHandler';
+ $elementHandler['Relatives']['start'] = __NAMESPACE__ . '\\relativesStartHandler';
+ $elementHandler['RepeatTag']['end'] = __NAMESPACE__ . '\\repeatTagEndHandler';
+ $elementHandler['RepeatTag']['start'] = __NAMESPACE__ . '\\repeatTagStartHandler';
+ $elementHandler['SetVar']['start'] = __NAMESPACE__ . '\\setVarStartHandler';
+ $elementHandler['Style']['start'] = __NAMESPACE__ . '\\styleStartHandler';
+ $elementHandler['Text']['end'] = __NAMESPACE__ . '\\textEndHandler';
+ $elementHandler['Text']['start'] = __NAMESPACE__ . '\\textStartHandler';
+ $elementHandler['TextBox']['end'] = __NAMESPACE__ . '\\textBoxEndHandler';
+ $elementHandler['TextBox']['start'] = __NAMESPACE__ . '\\textBoxStartHandler';
+ $elementHandler['Title']['end'] = __NAMESPACE__ . '\\titleEndHandler';
+ $elementHandler['Title']['start'] = __NAMESPACE__ . '\\titleStartHandler';
+ $elementHandler['TotalPages']['start'] = __NAMESPACE__ . '\\totalPagesStartHandler';
+ $elementHandler['var']['start'] = __NAMESPACE__ . '\\varStartHandler';
+ $elementHandler['sp']['start'] = __NAMESPACE__ . '\\spStartHandler';
/**
* A new object of the currently used element class
diff --git a/search_advanced.php b/search_advanced.php
index 6e4d285c80..0860a625f9 100644
--- a/search_advanced.php
+++ b/search_advanced.php
@@ -54,7 +54,7 @@ echo '<script>';
};
// all of the field options
- <?php foreach ($controller->getOtherFields() as $field=>$label) { ?>
+ <?php foreach ($controller->getOtherFields() as $field => $label) { ?>
opt = document.createElement('option');
opt.value='<?php echo $field; ?>';
opt.text='<?php echo Filter::escapeJs($label); ?>';
@@ -145,7 +145,7 @@ echo '</script>';
<td id="vcell<?php echo $i; ?>" class="list_value">
<?php
$currentFieldSearch = $controller->getField($i); // Get this field’s name and the search criterion
- $currentField = substr($currentFieldSearch, 0, strrpos($currentFieldSearch, ':')); // Get the actual field name
+ $currentField = substr($currentFieldSearch, 0, strrpos($currentFieldSearch, ':')); // Get the actual field name
?>
<input type="text" id="value<?php echo $i; ?>" name="values[<?php echo $i; ?>]" value="<?php echo Filter::escapeHtml($controller->getValue($i)); ?>"<?php echo substr($controller->getField($i), -4) == 'PLAC' ? 'data-autocomplete-type="PLAC"' : ''; ?>>
<?php if (preg_match("/^NAME:/", $currentFieldSearch) > 0) { ?>
@@ -178,7 +178,7 @@ echo '</script>';
$motherGivnOption = 'SDX';
$motherSurnOption = 'SDX';
for ($k = 0; $k < $fct; $k++) {
- $searchField = $controller->getField($k);
+ $searchField = $controller->getField($k);
$searchOption = substr($searchField, 20); // Assume we have something like "FAMC:HUSB:NAME:GIVN:foo"
switch (substr($searchField, 0, 20)) {
case 'FAMC:HUSB:NAME:GIVN:':
diff --git a/setup.php b/setup.php
index 7628bef311..055de17443 100644
--- a/setup.php
+++ b/setup.php
@@ -107,7 +107,7 @@ if (!isset($_POST['lang'])) {
'</p>',
'<h2>', I18N::translate('Checking server configuration'), '</h2>';
$warnings = false;
- $errors = false;
+ $errors = false;
// Mandatory functions
$disable_functions = preg_split('/ *, */', ini_get('disable_functions'));
@@ -129,7 +129,7 @@ if (!isset($_POST['lang'])) {
'gd' => /* I18N: a program feature */ I18N::translate('creating thumbnails of images'),
'xml' => /* I18N: a program feature */ I18N::translate('reporting'),
'simplexml' => /* I18N: a program feature */ I18N::translate('reporting'),
- ) as $extension=>$features) {
+ ) as $extension => $features) {
if (!extension_loaded($extension)) {
echo '<p class="bad">', I18N::translate('PHP extension “%1$s” is disabled. Without it, the following features will not work: %2$s. Please ask your server’s administrator to enable it.', $extension, $features), '</p>';
$warnings = true;
@@ -137,8 +137,8 @@ if (!isset($_POST['lang'])) {
}
// Settings
foreach (array(
- 'file_uploads'=>/* I18N: a program feature */ I18N::translate('file upload capability'),
- ) as $setting=>$features) {
+ 'file_uploads' => /* I18N: a program feature */ I18N::translate('file upload capability'),
+ ) as $setting => $features) {
if (!ini_get($setting)) {
echo '<p class="bad">', I18N::translate('PHP setting “%1$s” is disabled. Without it, the following features will not work: %2$s. Please ask your server’s administrator to enable it.', $setting, $features), '</p>';
$warnings = true;
@@ -311,7 +311,7 @@ if (empty($_POST['dbuser']) || !Database::isConnected() || !$db_version_ok) {
//
// Other characters may be invalid (objects must be valid filenames on the
// MySQL server’s filesystem), so block the usual ones.
-$DBNAME = str_replace(array('`', '"', '\'', ':', '/', '\\', '\r', '\n', '\t', '\0'), '', $_POST['dbname']);
+$DBNAME = str_replace(array('`', '"', '\'', ':', '/', '\\', '\r', '\n', '\t', '\0'), '', $_POST['dbname']);
$TBLPREFIX = str_replace(array('`', '"', '\'', ':', '/', '\\', '\r', '\n', '\t', '\0'), '', $_POST['tblpfx']);
// If we have specified a database, and we have not used invalid characters,
@@ -406,10 +406,10 @@ if (!isset($_POST['wtemail'])) {
$_POST['wtemail'] = '';
}
-if (empty($_POST['wtname']) || empty($_POST['wtuser']) || strlen($_POST['wtpass']) < 6 || strlen($_POST['wtpass2']) < 6 || empty($_POST['wtemail']) || $_POST['wtpass'] <> $_POST['wtpass2']) {
+if (empty($_POST['wtname']) || empty($_POST['wtuser']) || strlen($_POST['wtpass']) < 6 || strlen($_POST['wtpass2']) < 6 || empty($_POST['wtemail']) || $_POST['wtpass'] != $_POST['wtpass2']) {
if (strlen($_POST['wtpass']) > 0 && strlen($_POST['wtpass']) < 6) {
echo '<p class="bad">', I18N::translate('The password needs to be at least six characters long.'), '</p>';
- } elseif ($_POST['wtpass'] <> $_POST['wtpass2']) {
+ } elseif ($_POST['wtpass'] != $_POST['wtpass2']) {
echo '<p class="bad">', I18N::translate('The passwords do not match.'), '</p>';
} elseif ((empty($_POST['wtname']) || empty($_POST['wtuser']) || empty($_POST['wtpass']) || empty($_POST['wtemail'])) && $_POST['wtname'] . $_POST['wtuser'] . $_POST['wtpass'] . $_POST['wtemail'] != '') {
echo '<p class="bad">', I18N::translate('You must enter all the administrator account fields.'), '</p>';
@@ -852,7 +852,7 @@ try {
"INSERT IGNORE INTO `##user` (user_id, user_name, real_name, email, password) VALUES " .
" (-1, 'DEFAULT_USER', 'DEFAULT_USER', 'DEFAULT_USER', 'DEFAULT_USER'), (1, ?, ?, ?, ?)"
)->execute(array(
- $_POST['wtuser'], $_POST['wtname'], $_POST['wtemail'], password_hash($_POST['wtpass'], PASSWORD_DEFAULT)
+ $_POST['wtuser'], $_POST['wtname'], $_POST['wtemail'], password_hash($_POST['wtpass'], PASSWORD_DEFAULT),
));
Database::prepare(
@@ -864,7 +864,7 @@ try {
" (1, 'auto_accept', ?)," .
" (1, 'visibleonline', ?)"
)->execute(array(
- 1, WT_LOCALE, 1, 1, 0, 1
+ 1, WT_LOCALE, 1, 1, 0, 1,
));
Database::prepare(
@@ -885,7 +885,7 @@ try {
"('SMTP_HELO', ?)," .
"('SMTP_FROM_NAME', ?)"
)->execute(array(
- $_SERVER['SERVER_NAME'], $_SERVER['SERVER_NAME']
+ $_SERVER['SERVER_NAME'], $_SERVER['SERVER_NAME'],
));
// Search for all installed modules, and enable them.
@@ -906,7 +906,6 @@ try {
" WHERE user_id=-1"
)->execute();
-
// Write the config file. We already checked that this would work.
$config_ini_php =
'; <' . '?php exit; ?' . '> DO NOT DELETE THIS LINE' . PHP_EOL .
diff --git a/site-offline.php b/site-offline.php
index 4154f05446..0d6ff2710a 100644
--- a/site-offline.php
+++ b/site-offline.php
@@ -40,7 +40,7 @@ if (file_exists(WT_DATA_DIR . 'offline.txt')) {
} else {
// offline.txt has gone - we're back online!
header('Location: index.php');
-
+
return;
}
diff --git a/site-unavailable.php b/site-unavailable.php
index bf2ae2894f..5adf8cf9fd 100644
--- a/site-unavailable.php
+++ b/site-unavailable.php
@@ -61,7 +61,7 @@ foreach (FlashMessages::getMessages() as $message) {
$config_ini_php = parse_ini_file('data/config.ini.php');
if (is_array($config_ini_php) && array_key_exists('dbhost', $config_ini_php) && array_key_exists('dbport', $config_ini_php) && array_key_exists('dbuser', $config_ini_php) && array_key_exists('dbpass', $config_ini_php) && array_key_exists('dbname', $config_ini_php)) {
try {
- new PDO('mysql:host=' . $config_ini_php['dbhost'] . ';port=' . $config_ini_php['dbport'] . ';dbname=' . $config_ini_php['dbname'], $config_ini_php['dbuser'], $config_ini_php['dbpass'], array(PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_OBJ, PDO::ATTR_CASE=>PDO::CASE_LOWER, PDO::ATTR_AUTOCOMMIT=>true));
+ new PDO('mysql:host=' . $config_ini_php['dbhost'] . ';port=' . $config_ini_php['dbport'] . ';dbname=' . $config_ini_php['dbname'], $config_ini_php['dbuser'], $config_ini_php['dbpass'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_CASE => PDO::CASE_LOWER, PDO::ATTR_AUTOCOMMIT => true));
} catch (PDOException $ex) {
$messages .= '<p>' . I18N::translate('The database reported the following error message:') . '</p>';
$messages .= '<blockquote>' . $ex->getMessage() . '</blockquote>';
diff --git a/source.php b/source.php
index 6cd9dbf762..c2fdcc49a7 100644
--- a/source.php
+++ b/source.php
@@ -71,7 +71,7 @@ if ($controller->record && $controller->record->canShow()) {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This source does not exist or you do not have permission to view it.'), '</p>';
-
+
return;
}
@@ -132,6 +132,7 @@ echo '<div id="source-tabs">
'_UID' => 10,
'CHAN' => 11,
);
+
return
(array_key_exists($x->getTag(), $order) ? $order[$x->getTag()] : PHP_INT_MAX)
-
diff --git a/statisticsplot.php b/statisticsplot.php
index 8ec9c43c25..ed68807e0b 100644
--- a/statisticsplot.php
+++ b/statisticsplot.php
@@ -29,7 +29,7 @@ require './includes/session.php';
/**
* Month of birth
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -85,7 +85,7 @@ function month_of_birth($z_axis, array $z_boundaries, Stats $stats) {
/**
* Month of birth of first child in a relation
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -94,7 +94,6 @@ function month_of_birth($z_axis, array $z_boundaries, Stats $stats) {
function month_of_birth_of_first_child($z_axis, array $z_boundaries, Stats $stats) {
$total = 0;
-
if ($z_axis === 300) {
$num = $stats->monthFirstChildQuery(false);
foreach ($num as $values) {
@@ -142,7 +141,7 @@ function month_of_birth_of_first_child($z_axis, array $z_boundaries, Stats $stat
/**
* Month of death
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -151,7 +150,6 @@ function month_of_birth_of_first_child($z_axis, array $z_boundaries, Stats $stat
function month_of_death($z_axis, array $z_boundaries, Stats $stats) {
$total = 0;
-
if ($z_axis === 300) {
$num = $stats->statsDeathQuery(false);
foreach ($num as $values) {
@@ -199,7 +197,7 @@ function month_of_death($z_axis, array $z_boundaries, Stats $stats) {
/**
* Month of marriage
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -208,7 +206,6 @@ function month_of_death($z_axis, array $z_boundaries, Stats $stats) {
function month_of_marriage($z_axis, array $z_boundaries, Stats $stats) {
$total = 0;
-
if ($z_axis === 300) {
$num = $stats->statsMarrQuery(false, false);
foreach ($num as $values) {
@@ -241,7 +238,7 @@ function month_of_marriage($z_axis, array $z_boundaries, Stats $stats) {
/**
* Month of first marriage
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -294,7 +291,7 @@ function month_of_first_marriage($z_axis, array $z_boundaries, Stats $stats) {
/**
* Age related to birth year
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -346,7 +343,7 @@ function lifespan_by_birth_year($z_axis, array $z_boundaries, Stats $stats) {
/**
* Age related to death year
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -398,7 +395,7 @@ function lifespan_by_death_year($z_axis, array $z_boundaries, Stats $stats) {
/**
* Age in year of marriage
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -452,7 +449,7 @@ function age_at_marriage($z_axis, array $z_boundaries, Stats $stats) {
/**
* Age in year of first marriage
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -529,7 +526,7 @@ function age_at_first_marriage($z_axis, array $z_boundaries, Stats $stats) {
/**
* Number of children
*
- * @param integer $z_axis
+ * @param int $z_axis
* @param integer[] $z_boundaries
* @param Stats $stats
*
@@ -571,9 +568,9 @@ function number_of_children($z_axis, array $z_boundaries, Stats $stats) {
}
/**
- * @param integer $z
- * @param integer $x
- * @param integer $val
+ * @param int $z
+ * @param int $x
+ * @param int $val
*/
function fill_y_data($z, $x, $val) {
global $ydata, $xmax, $x_boundaries, $zmax, $z_boundaries, $xgiven, $zgiven;
@@ -810,8 +807,8 @@ function calculate_legend($boundaries_z_axis) {
global $legend, $zmax, $z_boundaries;
// calculate the legend values
- $hulpar = explode(',', $boundaries_z_axis);
- $i = 1;
+ $hulpar = explode(',', $boundaries_z_axis);
+ $i = 1;
$date = new Date('BEF ' . $hulpar[0]);
$legend[0] = strip_tags($date->display());
$z_boundaries[0] = $hulpar[0] - 1;
@@ -822,8 +819,8 @@ function calculate_legend($boundaries_z_axis) {
$z_boundaries[$i] = $hulpar[$i] - 1;
$i++;
}
- $zmax = $i;
- $zmax1 = $zmax - 1;
+ $zmax = $i;
+ $zmax1 = $zmax - 1;
$date = new Date('AFT ' . $hulpar[$zmax1]);
$legend[$zmax] = strip_tags($date->display());
$z_boundaries[$zmax] = 10000;
@@ -866,15 +863,15 @@ case '11':
$xtitle = I18N::translate('month');
$ytitle = I18N::translate('numbers');
$boundaries_z_axis = Filter::get('z-axis-boundaries-periods', null, '0');
- $xdata = $monthdata;
- $xmax = 12;
+ $xdata = $monthdata;
+ $xmax = 12;
if ($z_axis !== 300 && $z_axis !== 301) {
calculate_legend($boundaries_z_axis);
}
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -902,7 +899,7 @@ case '11':
}
}
$total = month_of_birth($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '12':
@@ -916,15 +913,15 @@ case '12':
$xtitle = I18N::translate('month');
$ytitle = I18N::translate('numbers');
$boundaries_z_axis = Filter::get('z-axis-boundaries-periods', null, '0');
- $xdata = $monthdata;
- $xmax = 12;
+ $xdata = $monthdata;
+ $xmax = 12;
if ($z_axis !== 300 && $z_axis !== 301) {
calculate_legend($boundaries_z_axis);
}
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -952,7 +949,7 @@ case '12':
}
}
$total = month_of_death($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '13':
@@ -970,15 +967,15 @@ case '13':
$xtitle = I18N::translate('month');
$ytitle = I18N::translate('numbers');
$boundaries_z_axis = Filter::get('z-axis-boundaries-periods', null, '0');
- $xdata = $monthdata;
- $xmax = 12;
+ $xdata = $monthdata;
+ $xmax = 12;
if ($z_axis !== 300 && $z_axis !== 301) {
calculate_legend($boundaries_z_axis);
}
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Families');
+ $ytitle = I18N::translate('Families');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1006,7 +1003,7 @@ case '13':
}
}
$total = month_of_marriage($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '14':
@@ -1020,15 +1017,15 @@ case '14':
$xtitle = I18N::translate('month');
$ytitle = I18N::translate('numbers');
$boundaries_z_axis = Filter::get('z-axis-boundaries-periods', null, '0');
- $xdata = $monthdata;
- $xmax = 12;
+ $xdata = $monthdata;
+ $xmax = 12;
if ($z_axis !== 300 && $z_axis !== 301) {
calculate_legend($boundaries_z_axis);
}
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Children');
+ $ytitle = I18N::translate('Children');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1056,7 +1053,7 @@ case '14':
}
}
$total = month_of_birth_of_first_child($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '15':
@@ -1074,15 +1071,15 @@ case '15':
$xtitle = I18N::translate('month');
$ytitle = I18N::translate('numbers');
$boundaries_z_axis = Filter::get('z-axis-boundaries-periods', null, '0');
- $xdata = $monthdata;
- $xmax = 12;
+ $xdata = $monthdata;
+ $xmax = 12;
if ($z_axis !== 300 && $z_axis !== 301) {
calculate_legend($boundaries_z_axis);
}
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Families');
+ $ytitle = I18N::translate('Families');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1110,7 +1107,7 @@ case '15':
}
}
$total = month_of_first_marriage($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalFamilies();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '17':
@@ -1132,7 +1129,7 @@ case '17':
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1160,7 +1157,7 @@ case '17':
}
}
$total = lifespan_by_birth_year($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '18':
@@ -1182,7 +1179,7 @@ case '18':
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1210,7 +1207,7 @@ case '18':
}
}
$total = lifespan_by_death_year($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '19':
@@ -1232,12 +1229,12 @@ case '19':
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
}
- $male_female = false;
+ $male_female = false;
$z_boundaries[0] = 100000;
if ($z_axis === 300) {
$zgiven = false;
@@ -1260,7 +1257,7 @@ case '19':
}
}
$total = age_at_marriage($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '20':
@@ -1282,7 +1279,7 @@ case '20':
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Individuals');
+ $ytitle = I18N::translate('Individuals');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1310,7 +1307,7 @@ case '20':
}
}
$total = age_at_first_marriage($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalIndividuals();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
case '21':
@@ -1332,7 +1329,7 @@ case '21':
$percentage = false;
if ($y_axis === 201) {
$percentage = false;
- $ytitle = I18N::translate('Families');
+ $ytitle = I18N::translate('Families');
} elseif ($y_axis === 202) {
$percentage = true;
$ytitle = I18N::translate('percentage');
@@ -1360,7 +1357,7 @@ case '21':
}
}
$total = number_of_children($z_axis, $z_boundaries, $stats);
- $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalChildren();
+ $hstr = $title . '|' . I18N::translate('Counts ') . ' ' . I18N::number($total) . ' ' . I18N::translate('of') . ' ' . $stats->totalChildren();
my_plot($hstr, $xdata, $xtitle, $ydata, $ytitle, $legend);
break;
default:
diff --git a/tests/app/AuthTest.php b/tests/app/AuthTest.php
index 72f7c2a72e..c82c4ec1d9 100644
--- a/tests/app/AuthTest.php
+++ b/tests/app/AuthTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AuthTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Auth'));
diff --git a/tests/app/Controller/AdvancedSearchControllerTest.php b/tests/app/Controller/AdvancedSearchControllerTest.php
index 61860de792..ba8b7e55eb 100644
--- a/tests/app/Controller/AdvancedSearchControllerTest.php
+++ b/tests/app/Controller/AdvancedSearchControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AdvancedSearchControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\AdvancedSearchController'));
diff --git a/tests/app/Controller/AjaxControllerTest.php b/tests/app/Controller/AjaxControllerTest.php
index c3cfb90545..f981a6271d 100644
--- a/tests/app/Controller/AjaxControllerTest.php
+++ b/tests/app/Controller/AjaxControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AjaxControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\AjaxController'));
diff --git a/tests/app/Controller/AncestryControllerTest.php b/tests/app/Controller/AncestryControllerTest.php
index f3664b2d64..76d24b05bd 100644
--- a/tests/app/Controller/AncestryControllerTest.php
+++ b/tests/app/Controller/AncestryControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AncestryControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\AncestryController'));
diff --git a/tests/app/Controller/BaseControllerTest.php b/tests/app/Controller/BaseControllerTest.php
index dd3970551b..9eb444e19a 100644
--- a/tests/app/Controller/BaseControllerTest.php
+++ b/tests/app/Controller/BaseControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BaseControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BaseController'));
diff --git a/tests/app/Controller/BranchesControllerTest.php b/tests/app/Controller/BranchesControllerTest.php
index cb5cc82ed4..896636f86b 100644
--- a/tests/app/Controller/BranchesControllerTest.php
+++ b/tests/app/Controller/BranchesControllerTest.php
@@ -24,15 +24,11 @@ use PHPUnit_Framework_TestCase;
class BranchesControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BranchesController'));
diff --git a/tests/app/Controller/ChartControllerTest.php b/tests/app/Controller/ChartControllerTest.php
index 1dd05fdf2e..c8d2bebd12 100644
--- a/tests/app/Controller/ChartControllerTest.php
+++ b/tests/app/Controller/ChartControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ChartControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ChartController'));
diff --git a/tests/app/Controller/CompactControllerTest.php b/tests/app/Controller/CompactControllerTest.php
index c3c7b496ac..f8fc202a1c 100644
--- a/tests/app/Controller/CompactControllerTest.php
+++ b/tests/app/Controller/CompactControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class CompactControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\CompactController'));
diff --git a/tests/app/Controller/DescendancyControllerTest.php b/tests/app/Controller/DescendancyControllerTest.php
index b90985513a..7446b7a33b 100644
--- a/tests/app/Controller/DescendancyControllerTest.php
+++ b/tests/app/Controller/DescendancyControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DescendancyControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\DescendancyController'));
diff --git a/tests/app/Controller/FamilyControllerTest.php b/tests/app/Controller/FamilyControllerTest.php
index 0788e1f328..19f7cba48f 100644
--- a/tests/app/Controller/FamilyControllerTest.php
+++ b/tests/app/Controller/FamilyControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class FamilyControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class FamilyControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyController'));
diff --git a/tests/app/Controller/FamilybookControllerTest.php b/tests/app/Controller/FamilybookControllerTest.php
index f0a4858184..f5c7326ddd 100644
--- a/tests/app/Controller/FamilybookControllerTest.php
+++ b/tests/app/Controller/FamilybookControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilybookControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyBookController'));
diff --git a/tests/app/Controller/FanchartControllerTest.php b/tests/app/Controller/FanchartControllerTest.php
index 4602672207..e6561a4bb0 100644
--- a/tests/app/Controller/FanchartControllerTest.php
+++ b/tests/app/Controller/FanchartControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FanchartControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FanchartController'));
diff --git a/tests/app/Controller/GedcomRecordControllerTest.php b/tests/app/Controller/GedcomRecordControllerTest.php
index 513055d133..121764d280 100644
--- a/tests/app/Controller/GedcomRecordControllerTest.php
+++ b/tests/app/Controller/GedcomRecordControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomRecordControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomRecordController'));
diff --git a/tests/app/Controller/HourglassControllerTest.php b/tests/app/Controller/HourglassControllerTest.php
index 1504cbaee0..345d85b4ff 100644
--- a/tests/app/Controller/HourglassControllerTest.php
+++ b/tests/app/Controller/HourglassControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class HourglassControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\HourglassController'));
diff --git a/tests/app/Controller/IndividualControllerTest.php b/tests/app/Controller/IndividualControllerTest.php
index 9d3f2fbbcd..3d9144e3cf 100644
--- a/tests/app/Controller/IndividualControllerTest.php
+++ b/tests/app/Controller/IndividualControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class IndividualControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class IndividualControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\IndividualController'));
diff --git a/tests/app/Controller/LifespanControllerTest.php b/tests/app/Controller/LifespanControllerTest.php
index e1980c69c1..24d9b63b49 100644
--- a/tests/app/Controller/LifespanControllerTest.php
+++ b/tests/app/Controller/LifespanControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class LifespanControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\LifespanController'));
diff --git a/tests/app/Controller/MediaControllerTest.php b/tests/app/Controller/MediaControllerTest.php
index f4ab5df797..e1528b2ae0 100644
--- a/tests/app/Controller/MediaControllerTest.php
+++ b/tests/app/Controller/MediaControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class MediaControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class MediaControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\MediaController'));
diff --git a/tests/app/Controller/NoteControllerTest.php b/tests/app/Controller/NoteControllerTest.php
index c515829b7e..e0bb7250eb 100644
--- a/tests/app/Controller/NoteControllerTest.php
+++ b/tests/app/Controller/NoteControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class NoteControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class NoteControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\NoteController'));
diff --git a/tests/app/Controller/PageControllerTest.php b/tests/app/Controller/PageControllerTest.php
index bc978f5018..8e1918fd3c 100644
--- a/tests/app/Controller/PageControllerTest.php
+++ b/tests/app/Controller/PageControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class PageControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\PageController'));
diff --git a/tests/app/Controller/PedigreeControllerTest.php b/tests/app/Controller/PedigreeControllerTest.php
index b95c08b9f1..180c76d329 100644
--- a/tests/app/Controller/PedigreeControllerTest.php
+++ b/tests/app/Controller/PedigreeControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class PedigreeControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\PedigreeController'));
diff --git a/tests/app/Controller/RepositoryControllerTest.php b/tests/app/Controller/RepositoryControllerTest.php
index e7a337eea2..2074f81d47 100644
--- a/tests/app/Controller/RepositoryControllerTest.php
+++ b/tests/app/Controller/RepositoryControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class RepositoryControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class RepositoryControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\RepositoryController'));
diff --git a/tests/app/Controller/SearchControllerTest.php b/tests/app/Controller/SearchControllerTest.php
index b690f6544e..bfda39b93e 100644
--- a/tests/app/Controller/SearchControllerTest.php
+++ b/tests/app/Controller/SearchControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SearchControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SearchController'));
diff --git a/tests/app/Controller/SimpleControllerTest.php b/tests/app/Controller/SimpleControllerTest.php
index b476d46306..6f45efc449 100644
--- a/tests/app/Controller/SimpleControllerTest.php
+++ b/tests/app/Controller/SimpleControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SimpleControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SimpleController'));
diff --git a/tests/app/Controller/SourceControllerTest.php b/tests/app/Controller/SourceControllerTest.php
index aa53eb56f9..6f8680e621 100644
--- a/tests/app/Controller/SourceControllerTest.php
+++ b/tests/app/Controller/SourceControllerTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class SourceControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class SourceControllerTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SourceController'));
diff --git a/tests/app/Controller/TimelineControllerTest.php b/tests/app/Controller/TimelineControllerTest.php
index b340615f03..e112c6dd19 100644
--- a/tests/app/Controller/TimelineControllerTest.php
+++ b/tests/app/Controller/TimelineControllerTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TimelineControllerTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\TimelineController'));
diff --git a/tests/app/DatabaseTest.php b/tests/app/DatabaseTest.php
index 22a05109cf..9b89c08828 100644
--- a/tests/app/DatabaseTest.php
+++ b/tests/app/DatabaseTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DatabaseTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Database'));
diff --git a/tests/app/Date/CalendarDateTest.php b/tests/app/Date/CalendarDateTest.php
index efb2a1184f..754d090717 100644
--- a/tests/app/Date/CalendarDateTest.php
+++ b/tests/app/Date/CalendarDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class CalendarDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\CalendarDate'));
diff --git a/tests/app/Date/FrenchDateTest.php b/tests/app/Date/FrenchDateTest.php
index 7ea38188b8..935decbeff 100644
--- a/tests/app/Date/FrenchDateTest.php
+++ b/tests/app/Date/FrenchDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FrenchDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FrenchDate'));
diff --git a/tests/app/Date/GregorianDateTest.php b/tests/app/Date/GregorianDateTest.php
index 397e4b381b..ffeecbfc40 100644
--- a/tests/app/Date/GregorianDateTest.php
+++ b/tests/app/Date/GregorianDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GregorianDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GregorianDate'));
diff --git a/tests/app/Date/HijriDateTest.php b/tests/app/Date/HijriDateTest.php
index c81988f014..b8836f1507 100644
--- a/tests/app/Date/HijriDateTest.php
+++ b/tests/app/Date/HijriDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class HijriDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\HijriDate'));
diff --git a/tests/app/Date/JalaliDateTest.php b/tests/app/Date/JalaliDateTest.php
index 532d3b6f77..56f6c927c4 100644
--- a/tests/app/Date/JalaliDateTest.php
+++ b/tests/app/Date/JalaliDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class JalaliDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\JalaliDate'));
diff --git a/tests/app/Date/JewishDateTest.php b/tests/app/Date/JewishDateTest.php
index a27e61612a..655b3c3770 100644
--- a/tests/app/Date/JewishDateTest.php
+++ b/tests/app/Date/JewishDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class JewishDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\JewishDate'));
diff --git a/tests/app/Date/JulianDateTest.php b/tests/app/Date/JulianDateTest.php
index 8ebc5538ca..6de50652ce 100644
--- a/tests/app/Date/JulianDateTest.php
+++ b/tests/app/Date/JulianDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class JulianDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\JulianDate'));
diff --git a/tests/app/Date/RomanDateTest.php b/tests/app/Date/RomanDateTest.php
index 0801c4ff65..a883f647c5 100644
--- a/tests/app/Date/RomanDateTest.php
+++ b/tests/app/Date/RomanDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class RomanDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\RomanDate'));
diff --git a/tests/app/DateTest.php b/tests/app/DateTest.php
index 158bc5fa67..e15599bbbd 100644
--- a/tests/app/DateTest.php
+++ b/tests/app/DateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Date'));
diff --git a/tests/app/FactTest.php b/tests/app/FactTest.php
index a928efcb39..481a2e1308 100644
--- a/tests/app/FactTest.php
+++ b/tests/app/FactTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FactTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Fact'));
diff --git a/tests/app/FamilyTest.php b/tests/app/FamilyTest.php
index e247315a6a..42b31dfd12 100644
--- a/tests/app/FamilyTest.php
+++ b/tests/app/FamilyTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Family'));
diff --git a/tests/app/FileTest.php b/tests/app/FileTest.php
index c94adaa912..23c3b684da 100644
--- a/tests/app/FileTest.php
+++ b/tests/app/FileTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FileTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\File'));
diff --git a/tests/app/FilterTest.php b/tests/app/FilterTest.php
index c055afd512..a5f67dae0f 100644
--- a/tests/app/FilterTest.php
+++ b/tests/app/FilterTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FilterTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Filter'));
diff --git a/tests/app/FlashMessagesTest.php b/tests/app/FlashMessagesTest.php
index 7165c13e0c..434a2f5603 100644
--- a/tests/app/FlashMessagesTest.php
+++ b/tests/app/FlashMessagesTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FlashMessagesTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FlashMessages'));
diff --git a/tests/app/Gedcom/GedcomCodeAdopTest.php b/tests/app/Gedcom/GedcomCodeAdopTest.php
index eb3f4d91e9..068614ee23 100644
--- a/tests/app/Gedcom/GedcomCodeAdopTest.php
+++ b/tests/app/Gedcom/GedcomCodeAdopTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeAdopTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodeAdop'));
diff --git a/tests/app/Gedcom/GedcomCodeNameTest.php b/tests/app/Gedcom/GedcomCodeNameTest.php
index 07f3e98efe..18f45a1363 100644
--- a/tests/app/Gedcom/GedcomCodeNameTest.php
+++ b/tests/app/Gedcom/GedcomCodeNameTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeNameTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodePedi'));
diff --git a/tests/app/Gedcom/GedcomCodePediTest.php b/tests/app/Gedcom/GedcomCodePediTest.php
index e4e4541d8f..a6d51e9c34 100644
--- a/tests/app/Gedcom/GedcomCodePediTest.php
+++ b/tests/app/Gedcom/GedcomCodePediTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodePediTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodePedi'));
diff --git a/tests/app/Gedcom/GedcomCodeQuayTest.php b/tests/app/Gedcom/GedcomCodeQuayTest.php
index 55d9062bb2..e3790f6dfb 100644
--- a/tests/app/Gedcom/GedcomCodeQuayTest.php
+++ b/tests/app/Gedcom/GedcomCodeQuayTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeQuayTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodeQuay'));
diff --git a/tests/app/Gedcom/GedcomCodeRelaTest.php b/tests/app/Gedcom/GedcomCodeRelaTest.php
index 759cb68778..d41cfa05fd 100644
--- a/tests/app/Gedcom/GedcomCodeRelaTest.php
+++ b/tests/app/Gedcom/GedcomCodeRelaTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeRelaTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodeRela'));
diff --git a/tests/app/Gedcom/GedcomCodeStatTest.php b/tests/app/Gedcom/GedcomCodeStatTest.php
index 8248a447ae..b55dafc6d1 100644
--- a/tests/app/Gedcom/GedcomCodeStatTest.php
+++ b/tests/app/Gedcom/GedcomCodeStatTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeStatTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodeStat'));
diff --git a/tests/app/Gedcom/GedcomCodeTempTest.php b/tests/app/Gedcom/GedcomCodeTempTest.php
index 8ec0990b99..a76c57341d 100644
--- a/tests/app/Gedcom/GedcomCodeTempTest.php
+++ b/tests/app/Gedcom/GedcomCodeTempTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomCodeTempTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomCodeTemp'));
diff --git a/tests/app/Gedcom/GedcomTagTest.php b/tests/app/Gedcom/GedcomTagTest.php
index b37a3589cf..80f6443863 100644
--- a/tests/app/Gedcom/GedcomTagTest.php
+++ b/tests/app/Gedcom/GedcomTagTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GedcomTagTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomTag'));
diff --git a/tests/app/GedcomRecordTest.php b/tests/app/GedcomRecordTest.php
index 8b216590cd..63bb057a1d 100644
--- a/tests/app/GedcomRecordTest.php
+++ b/tests/app/GedcomRecordTest.php
@@ -24,17 +24,13 @@ use PHPUnit_Framework_TestCase;
class GedcomRecordTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
- /**
+ /**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GedcomRecord'));
diff --git a/tests/app/I18NTest.php b/tests/app/I18NTest.php
index e4ee0f11af..ba99484c3a 100644
--- a/tests/app/I18NTest.php
+++ b/tests/app/I18NTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class I18NTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
\Patchwork\Utf8\Bootup::initAll();
@@ -41,8 +39,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
* Test I18N::strtoupper()
*
* @todo test all locales
- *
- * @return void
*/
public function testStrtoupper() {
$this->assertSame(I18N::strtoupper(''), '');
@@ -53,8 +49,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
* Test I18N::strtolower()
*
* @todo test all locales
- *
- * @return void
*/
public function testStrtolower() {
$this->assertSame(I18N::strtolower(''), '');
@@ -65,8 +59,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
* Test I18N::strcasecmp()
*
* @todo test all locales
- *
- * @return void
*/
public function testStrcasecmp() {
$this->assertSame(I18N::strcasecmp('', ''), 0);
@@ -79,8 +71,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
/**
* Test I18N::reverseText()
- *
- * @return void
*/
public function testReverseText() {
// Create these strings carefully, as text editors can display them in confusing ways.
@@ -103,8 +93,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
/**
* Test I18N::languageName()
- *
- * @return void
*/
public function testKnownLanguageName() {
$this->assertSame('العربية', I18N::languageName('ar'));
@@ -116,8 +104,6 @@ class I18NTest extends PHPUnit_Framework_TestCase {
/**
* Test I18N::languageScript()
- *
- * @return void
*/
public function testLanguageScript() {
$this->assertSame('Arab', I18N::languageScript('ar'));
diff --git a/tests/app/IndividualTest.php b/tests/app/IndividualTest.php
index a8bdc132eb..9e5439a580 100644
--- a/tests/app/IndividualTest.php
+++ b/tests/app/IndividualTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class IndividualTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Individual'));
diff --git a/tests/app/LogTest.php b/tests/app/LogTest.php
index e9228efa12..b7cbeb97bd 100644
--- a/tests/app/LogTest.php
+++ b/tests/app/LogTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class LogTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Log'));
diff --git a/tests/app/MailTest.php b/tests/app/MailTest.php
index 9f37e5eba1..aa70712d14 100644
--- a/tests/app/MailTest.php
+++ b/tests/app/MailTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MailTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Mail'));
diff --git a/tests/app/MediaTest.php b/tests/app/MediaTest.php
index 230f1c1658..c6696e2fb7 100644
--- a/tests/app/MediaTest.php
+++ b/tests/app/MediaTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MediaTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Media'));
diff --git a/tests/app/MenuTest.php b/tests/app/MenuTest.php
index 8b069768d8..e85510bd9b 100644
--- a/tests/app/MenuTest.php
+++ b/tests/app/MenuTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests.
- *
- * @return void
*/
public function setUp() {
}
/**
* Test the constructor with default parameters.
- *
- * @return void
*/
public function testConstructorDefaults() {
$menu = new Menu('Test!');
@@ -47,12 +43,10 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the constructor with non-default parameters.
- *
- * @return void
*/
public function testConstructorNonDefaults() {
$submenus = array(new Menu('Submenu'));
- $menu = new Menu('Test!', 'link.html', 'link-class', 'test();', $submenus);
+ $menu = new Menu('Test!', 'link.html', 'link-class', 'test();', $submenus);
$this->assertSame('Test!', $menu->getLabel());
$this->assertSame('link.html', $menu->getLink());
@@ -63,8 +57,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the getter/setter for the label.
- *
- * @return void
*/
public function testGetterSetterLabel() {
$menu = new Menu('Test!');
@@ -77,8 +69,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the getter/setter for the link.
- *
- * @return void
*/
public function testGetterSetterLink() {
$menu = new Menu('Test!');
@@ -91,8 +81,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the getter/setter for the ID.
- *
- * @return void
*/
public function testGetterSetterId() {
$menu = new Menu('Test!');
@@ -105,8 +93,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the getter/setter for the Onclick event.
- *
- * @return void
*/
public function testGetterSetterOnclick() {
$menu = new Menu('Test!');
@@ -119,11 +105,9 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the getter/setter for the submenus.
- *
- * @return void
*/
public function testGetterSetterSubmenus() {
- $menu = new Menu('Test!');
+ $menu = new Menu('Test!');
$submenus = array(
new Menu('Sub1'),
new Menu('Sub2'),
@@ -137,19 +121,15 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the string cast.
- *
- * @return void
*/
public function testStringCast() {
$menu = new Menu('Test!');
- $this->assertSame((string)$menu, $menu->getMenuAsList());
+ $this->assertSame((string) $menu, $menu->getMenuAsList());
}
/**
* Test the list rendering for a simple link.
- *
- * @return void
*/
public function testFormatAsList() {
$menu = new Menu('Test!', 'link.html');
@@ -159,8 +139,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the list rendering for a simple link with a CSS ID.
- *
- * @return void
*/
public function testFormatAsListWithClass() {
$menu = new Menu('Test!', 'link.html', 'link-class');
@@ -170,8 +148,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the list rendering for an empty target.
- *
- * @return void
*/
public function testFormatAsListWithNoTarget() {
$menu = new Menu('Test!', '');
@@ -181,8 +157,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the list rendering for a default (hash) target.
- *
- * @return void
*/
public function testFormatAsListWithHashTarget() {
$menu = new Menu('Test!');
@@ -192,8 +166,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the list rendering for an onclick link.
- *
- * @return void
*/
public function testFormatAsListWithOnclick() {
$menu = new Menu('Test!', '#', '', 'return test();');
@@ -203,8 +175,6 @@ class MenuTest extends PHPUnit_Framework_TestCase {
/**
* Test the list rendering for an onclick link.
- *
- * @return void
*/
public function testFormatAsListWithOnclickAndId() {
$menu = new Menu('Test!', '#', 'link-class', 'return test();');
diff --git a/tests/app/Module/AhnentafelReportModuleTest.php b/tests/app/Module/AhnentafelReportModuleTest.php
index eefefbe681..bef6c09695 100644
--- a/tests/app/Module/AhnentafelReportModuleTest.php
+++ b/tests/app/Module/AhnentafelReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AhnentafelReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\AhnentafelReportModule'));
diff --git a/tests/app/Module/AlbumModuleTest.php b/tests/app/Module/AlbumModuleTest.php
index aeabd9102b..b16f19ff55 100644
--- a/tests/app/Module/AlbumModuleTest.php
+++ b/tests/app/Module/AlbumModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class AlbumModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\AlbumModule'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateBasePluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateBasePluginTest.php
index a80e16cd99..dd5b9aaf95 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateBasePluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateBasePluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateBasePluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateBasePlugin'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPluginTest.php
index 0f280f8739..3091bd4bb8 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateDuplicateLinksPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateDuplicateLinksPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateDuplicateLinksPlugin'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateMarriedNamesPluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateMarriedNamesPluginTest.php
index 5ffec16929..33dfb56456 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateMarriedNamesPluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateMarriedNamesPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateMarriedNamesPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateMarriedNamesPlugin'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateMissingDeathPluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateMissingDeathPluginTest.php
index 7d25e97bda..8420878b2c 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateMissingDeathPluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateMissingDeathPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateMissingDeathPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateMissingDeathPlugin'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateNameFormatPluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateNameFormatPluginTest.php
index 9facdc6747..6d72099493 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateNameFormatPluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateNameFormatPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateNameFormatPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateNameFormatPlugin'));
diff --git a/tests/app/Module/BatchUpdate/BatchUpdateSearchReplacePluginTest.php b/tests/app/Module/BatchUpdate/BatchUpdateSearchReplacePluginTest.php
index 5a65583507..3c11cae7f8 100644
--- a/tests/app/Module/BatchUpdate/BatchUpdateSearchReplacePluginTest.php
+++ b/tests/app/Module/BatchUpdate/BatchUpdateSearchReplacePluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateSearchReplacePluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateSearchReplacePlugin'));
diff --git a/tests/app/Module/BatchUpdate/BirthDeathMarriageReportModuleTest.php b/tests/app/Module/BatchUpdate/BirthDeathMarriageReportModuleTest.php
index 3c65558caf..15032f702c 100644
--- a/tests/app/Module/BatchUpdate/BirthDeathMarriageReportModuleTest.php
+++ b/tests/app/Module/BatchUpdate/BirthDeathMarriageReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BirthDeathMarriageReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BirthDeathMarriageReportModule'));
diff --git a/tests/app/Module/BatchUpdateModuleTest.php b/tests/app/Module/BatchUpdateModuleTest.php
index 8a1027ea2a..eef26f0109 100644
--- a/tests/app/Module/BatchUpdateModuleTest.php
+++ b/tests/app/Module/BatchUpdateModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BatchUpdateModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BatchUpdateModule'));
diff --git a/tests/app/Module/BirthReportModuleTest.php b/tests/app/Module/BirthReportModuleTest.php
index 8def207a58..d89b10680a 100644
--- a/tests/app/Module/BirthReportModuleTest.php
+++ b/tests/app/Module/BirthReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class BirthReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\BirthReportModule'));
diff --git a/tests/app/Module/CemeteryReportModuleTest.php b/tests/app/Module/CemeteryReportModuleTest.php
index 288e3e0258..f817f4fe62 100644
--- a/tests/app/Module/CemeteryReportModuleTest.php
+++ b/tests/app/Module/CemeteryReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class CemeteryReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\CemeteryReportModule'));
diff --git a/tests/app/Module/CensusAssistantModuleTest.php b/tests/app/Module/CensusAssistantModuleTest.php
index 6a86f42ec0..3fe6469a36 100644
--- a/tests/app/Module/CensusAssistantModuleTest.php
+++ b/tests/app/Module/CensusAssistantModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class CensusAssistantModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\CensusAssistantModule'));
diff --git a/tests/app/Module/ChangeReportModuleTest.php b/tests/app/Module/ChangeReportModuleTest.php
index c26b590527..d1c58aa56e 100644
--- a/tests/app/Module/ChangeReportModuleTest.php
+++ b/tests/app/Module/ChangeReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ChangeReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ChangeReportModule'));
diff --git a/tests/app/Module/ChartsBlockModuleTest.php b/tests/app/Module/ChartsBlockModuleTest.php
index e121a9c9e2..ca80a438c1 100644
--- a/tests/app/Module/ChartsBlockModuleTest.php
+++ b/tests/app/Module/ChartsBlockModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ChartsBlockModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ChartsBlockModule'));
diff --git a/tests/app/Module/CkeditorModuleTest.php b/tests/app/Module/CkeditorModuleTest.php
index 18ee5cee3d..1cef3402f4 100644
--- a/tests/app/Module/CkeditorModuleTest.php
+++ b/tests/app/Module/CkeditorModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class CkeditorModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\CkeditorModule'));
diff --git a/tests/app/Module/ClippingsCart/ClippingsCartTest.php b/tests/app/Module/ClippingsCart/ClippingsCartTest.php
index 6052b892e5..83835a3146 100644
--- a/tests/app/Module/ClippingsCart/ClippingsCartTest.php
+++ b/tests/app/Module/ClippingsCart/ClippingsCartTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ClippingsCartTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ClippingsCart'));
diff --git a/tests/app/Module/ClippingsCartModuleTest.php b/tests/app/Module/ClippingsCartModuleTest.php
index 6c0cdbb7cd..316427827a 100644
--- a/tests/app/Module/ClippingsCartModuleTest.php
+++ b/tests/app/Module/ClippingsCartModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ClippingsCartModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ClippingsCartModule'));
diff --git a/tests/app/Module/DeathReportModuleTest.php b/tests/app/Module/DeathReportModuleTest.php
index 6306ad188c..e04eff93a4 100644
--- a/tests/app/Module/DeathReportModuleTest.php
+++ b/tests/app/Module/DeathReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DeathReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\DeathReportModule'));
diff --git a/tests/app/Module/DescendancyModuleTest.php b/tests/app/Module/DescendancyModuleTest.php
index 5d6cadb9fd..252f4a3617 100644
--- a/tests/app/Module/DescendancyModuleTest.php
+++ b/tests/app/Module/DescendancyModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DescendancyModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\DescendancyModule'));
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php
index 6449740efc..58b68ab758 100644
--- a/tests/app/Module/DescendancyReportModuleTest.php
+++ b/tests/app/Module/DescendancyReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DescendancyReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\DescendancyReportModule'));
diff --git a/tests/app/Module/ExtraInformationModuleTest.php b/tests/app/Module/ExtraInformationModuleTest.php
index b062422a2d..533825d9a2 100644
--- a/tests/app/Module/ExtraInformationModuleTest.php
+++ b/tests/app/Module/ExtraInformationModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ExtraInformationModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ExtraInformationModule'));
diff --git a/tests/app/Module/FactSourcesReportModuleTest.php b/tests/app/Module/FactSourcesReportModuleTest.php
index 044d6c4c07..4d87f901a2 100644
--- a/tests/app/Module/FactSourcesReportModuleTest.php
+++ b/tests/app/Module/FactSourcesReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FactSourcesReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FactSourcesReportModule'));
diff --git a/tests/app/Module/FamiliesSidebarModuleTest.php b/tests/app/Module/FamiliesSidebarModuleTest.php
index d70676a204..2c163a2b8e 100644
--- a/tests/app/Module/FamiliesSidebarModuleTest.php
+++ b/tests/app/Module/FamiliesSidebarModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamiliesSidebarModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamiliesSidebarModule'));
diff --git a/tests/app/Module/FamilyGroupReportModuleTest.php b/tests/app/Module/FamilyGroupReportModuleTest.php
index 6ad7184a77..bde467a611 100644
--- a/tests/app/Module/FamilyGroupReportModuleTest.php
+++ b/tests/app/Module/FamilyGroupReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyGroupReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyGroupReportModule'));
diff --git a/tests/app/Module/FamilyNavigatorModuleTest.php b/tests/app/Module/FamilyNavigatorModuleTest.php
index 0f234fd8fa..5ba0073386 100644
--- a/tests/app/Module/FamilyNavigatorModuleTest.php
+++ b/tests/app/Module/FamilyNavigatorModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyNavigatorModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyNavigatorModule'));
diff --git a/tests/app/Module/FamilyTreeFavoritesModuleTest.php b/tests/app/Module/FamilyTreeFavoritesModuleTest.php
index 20da27f783..27c128b121 100644
--- a/tests/app/Module/FamilyTreeFavoritesModuleTest.php
+++ b/tests/app/Module/FamilyTreeFavoritesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyTreeFavoritesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyTreeFavoritesModule'));
diff --git a/tests/app/Module/FamilyTreeNewsModuleTest.php b/tests/app/Module/FamilyTreeNewsModuleTest.php
index 9f4999b69e..bf60846801 100644
--- a/tests/app/Module/FamilyTreeNewsModuleTest.php
+++ b/tests/app/Module/FamilyTreeNewsModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyTreeNewsModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyTreeNewsModule'));
diff --git a/tests/app/Module/FamilyTreeStatisticsModuleTest.php b/tests/app/Module/FamilyTreeStatisticsModuleTest.php
index bf180a4b09..5efd0c1d43 100644
--- a/tests/app/Module/FamilyTreeStatisticsModuleTest.php
+++ b/tests/app/Module/FamilyTreeStatisticsModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FamilyTreeStatisticsModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FamilyTreeStatisticsModule'));
diff --git a/tests/app/Module/FrequentlyAskedQuestionsModuleTest.php b/tests/app/Module/FrequentlyAskedQuestionsModuleTest.php
index 39d8061c5a..0aa0b97cfb 100644
--- a/tests/app/Module/FrequentlyAskedQuestionsModuleTest.php
+++ b/tests/app/Module/FrequentlyAskedQuestionsModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FrequentlyAskedQuestionsModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\FrequentlyAskedQuestionsModule'));
diff --git a/tests/app/Module/GoogleMapsModuleTest.php b/tests/app/Module/GoogleMapsModuleTest.php
index 8db17eec10..acddaa3f72 100644
--- a/tests/app/Module/GoogleMapsModuleTest.php
+++ b/tests/app/Module/GoogleMapsModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class GoogleMapsModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\GoogleMapsModule'));
diff --git a/tests/app/Module/HtmlBlockModuleTest.php b/tests/app/Module/HtmlBlockModuleTest.php
index e10784d00e..37af7e5d71 100644
--- a/tests/app/Module/HtmlBlockModuleTest.php
+++ b/tests/app/Module/HtmlBlockModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class HtmlBlockModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\HtmlBlockModule'));
diff --git a/tests/app/Module/IndividualFactsTabModuleTest.php b/tests/app/Module/IndividualFactsTabModuleTest.php
index 87829c257e..7f11370cfb 100644
--- a/tests/app/Module/IndividualFactsTabModuleTest.php
+++ b/tests/app/Module/IndividualFactsTabModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class IndividualFactsTabModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\IndividualFactsTabModule'));
diff --git a/tests/app/Module/IndividualFamiliesReportModuleTest.php b/tests/app/Module/IndividualFamiliesReportModuleTest.php
index 4ac33fb0b5..ed1f62ac32 100644
--- a/tests/app/Module/IndividualFamiliesReportModuleTest.php
+++ b/tests/app/Module/IndividualFamiliesReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class IndividualFamiliesReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\IndividualFamiliesReportModule'));
diff --git a/tests/app/Module/IndividualReportModuleTest.php b/tests/app/Module/IndividualReportModuleTest.php
index e83ec6e07a..5200140c80 100644
--- a/tests/app/Module/IndividualReportModuleTest.php
+++ b/tests/app/Module/IndividualReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class IndividualReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\IndividualReportModule'));
diff --git a/tests/app/Module/IndividualSidebarModuleTest.php b/tests/app/Module/IndividualSidebarModuleTest.php
index 3420804355..eb20862f7f 100644
--- a/tests/app/Module/IndividualSidebarModuleTest.php
+++ b/tests/app/Module/IndividualSidebarModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class IndividualSidebarModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\IndividualSidebarModule'));
diff --git a/tests/app/Module/InteractiveTree/TreeViewTest.php b/tests/app/Module/InteractiveTree/TreeViewTest.php
index e96af436e2..6dd11d085c 100644
--- a/tests/app/Module/InteractiveTree/TreeViewTest.php
+++ b/tests/app/Module/InteractiveTree/TreeViewTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TreeViewTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\TreeView'));
diff --git a/tests/app/Module/InteractiveTreeModuleTest.php b/tests/app/Module/InteractiveTreeModuleTest.php
index f58a114260..d978928479 100644
--- a/tests/app/Module/InteractiveTreeModuleTest.php
+++ b/tests/app/Module/InteractiveTreeModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class InteractiveTreeModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\InteractiveTreeModule'));
diff --git a/tests/app/Module/LoggedInUsersModuleTest.php b/tests/app/Module/LoggedInUsersModuleTest.php
index 63d484220b..e378c5c754 100644
--- a/tests/app/Module/LoggedInUsersModuleTest.php
+++ b/tests/app/Module/LoggedInUsersModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class LoggedInUsersModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\LoggedInUsersModule'));
diff --git a/tests/app/Module/MarriageReportModuleTest.php b/tests/app/Module/MarriageReportModuleTest.php
index f7118c3d1a..c50ab3d8d0 100644
--- a/tests/app/Module/MarriageReportModuleTest.php
+++ b/tests/app/Module/MarriageReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MarriageReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\MarriageReportModule'));
diff --git a/tests/app/Module/MediaTabModuleTest.php b/tests/app/Module/MediaTabModuleTest.php
index d92859edb8..2d28e7877b 100644
--- a/tests/app/Module/MediaTabModuleTest.php
+++ b/tests/app/Module/MediaTabModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MediaTabModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\MediaTabModule'));
diff --git a/tests/app/Module/MissingFactsReportModuleTest.php b/tests/app/Module/MissingFactsReportModuleTest.php
index 1829a6b106..98d7067b82 100644
--- a/tests/app/Module/MissingFactsReportModuleTest.php
+++ b/tests/app/Module/MissingFactsReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MissingFactsReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\MissingFactsReportModule'));
diff --git a/tests/app/Module/ModuleBlockInterfaceTest.php b/tests/app/Module/ModuleBlockInterfaceTest.php
index ad98d992d0..bff2d7a7f3 100644
--- a/tests/app/Module/ModuleBlockInterfaceTest.php
+++ b/tests/app/Module/ModuleBlockInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleBlockInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleBlockInterface'));
diff --git a/tests/app/Module/ModuleChartInterfaceTest.php b/tests/app/Module/ModuleChartInterfaceTest.php
index 7e9efd007d..fafba3d7c0 100644
--- a/tests/app/Module/ModuleChartInterfaceTest.php
+++ b/tests/app/Module/ModuleChartInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleChartInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleChartInterface'));
diff --git a/tests/app/Module/ModuleConfigInterfaceTest.php b/tests/app/Module/ModuleConfigInterfaceTest.php
index 3303062a32..2f9e84e09b 100644
--- a/tests/app/Module/ModuleConfigInterfaceTest.php
+++ b/tests/app/Module/ModuleConfigInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleConfigInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleConfigInterface'));
diff --git a/tests/app/Module/ModuleMenuInterfaceTest.php b/tests/app/Module/ModuleMenuInterfaceTest.php
index 8713e99d1d..28dc37393e 100644
--- a/tests/app/Module/ModuleMenuInterfaceTest.php
+++ b/tests/app/Module/ModuleMenuInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleMenuInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleMenuInterface'));
diff --git a/tests/app/Module/ModuleReportInterfaceTest.php b/tests/app/Module/ModuleReportInterfaceTest.php
index 43ee8128f2..eb0655d0b9 100644
--- a/tests/app/Module/ModuleReportInterfaceTest.php
+++ b/tests/app/Module/ModuleReportInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleReportInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleReportInterface'));
diff --git a/tests/app/Module/ModuleSidebarInterfaceTest.php b/tests/app/Module/ModuleSidebarInterfaceTest.php
index 92cfb55fb7..49fc8e9179 100644
--- a/tests/app/Module/ModuleSidebarInterfaceTest.php
+++ b/tests/app/Module/ModuleSidebarInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleSidebarInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleSidebarInterface'));
diff --git a/tests/app/Module/ModuleTabInterfaceTest.php b/tests/app/Module/ModuleTabInterfaceTest.php
index a49085def0..d6ed2d3cc4 100644
--- a/tests/app/Module/ModuleTabInterfaceTest.php
+++ b/tests/app/Module/ModuleTabInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleTabInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleTabInterface'));
diff --git a/tests/app/Module/ModuleThemeInterfaceTest.php b/tests/app/Module/ModuleThemeInterfaceTest.php
index 8afd0eeda2..ff9861136e 100644
--- a/tests/app/Module/ModuleThemeInterfaceTest.php
+++ b/tests/app/Module/ModuleThemeInterfaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleThemeInterfaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(interface_exists(__NAMESPACE__ . '\ModuleThemeInterface'));
diff --git a/tests/app/Module/NotesTabModuleTest.php b/tests/app/Module/NotesTabModuleTest.php
index dd7824ba4e..d063480d0b 100644
--- a/tests/app/Module/NotesTabModuleTest.php
+++ b/tests/app/Module/NotesTabModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class NotesTabModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\NotesTabModule'));
diff --git a/tests/app/Module/OccupationReportModuleTest.php b/tests/app/Module/OccupationReportModuleTest.php
index bf83baa238..e4a9300051 100644
--- a/tests/app/Module/OccupationReportModuleTest.php
+++ b/tests/app/Module/OccupationReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class OccupationReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\OccupationReportModule'));
diff --git a/tests/app/Module/OnThisDayModuleTest.php b/tests/app/Module/OnThisDayModuleTest.php
index 59997717db..a00c66653c 100644
--- a/tests/app/Module/OnThisDayModuleTest.php
+++ b/tests/app/Module/OnThisDayModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class OnThisDayModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\OnThisDayModule'));
diff --git a/tests/app/Module/PageMenuModuleTest.php b/tests/app/Module/PageMenuModuleTest.php
index c977507cd2..86635d9e4d 100644
--- a/tests/app/Module/PageMenuModuleTest.php
+++ b/tests/app/Module/PageMenuModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class PageMenuModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\PageMenuModule'));
diff --git a/tests/app/Module/PedigreeReportModuleTest.php b/tests/app/Module/PedigreeReportModuleTest.php
index df6df2bd77..7c44440217 100644
--- a/tests/app/Module/PedigreeReportModuleTest.php
+++ b/tests/app/Module/PedigreeReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class PedigreeReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\PedigreeReportModule'));
diff --git a/tests/app/Module/RecentChangesModuleTest.php b/tests/app/Module/RecentChangesModuleTest.php
index d8eeeab64c..bb49446d66 100644
--- a/tests/app/Module/RecentChangesModuleTest.php
+++ b/tests/app/Module/RecentChangesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class RecentChangesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\RecentChangesModule'));
diff --git a/tests/app/Module/RelatedIndividualsReportModuleTest.php b/tests/app/Module/RelatedIndividualsReportModuleTest.php
index a4d4f9f8fc..a6a491e8ff 100644
--- a/tests/app/Module/RelatedIndividualsReportModuleTest.php
+++ b/tests/app/Module/RelatedIndividualsReportModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class RelatedIndividualsReportModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\RelatedIndividualsReportModule'));
diff --git a/tests/app/Module/RelativesTabModuleTest.php b/tests/app/Module/RelativesTabModuleTest.php
index f3523dd48b..b3acc47727 100644
--- a/tests/app/Module/RelativesTabModuleTest.php
+++ b/tests/app/Module/RelativesTabModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class RelativesTabModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\RelativesTabModule'));
diff --git a/tests/app/Module/ResearchTaskModuleTest.php b/tests/app/Module/ResearchTaskModuleTest.php
index 59628192de..f66d670479 100644
--- a/tests/app/Module/ResearchTaskModuleTest.php
+++ b/tests/app/Module/ResearchTaskModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ResearchTaskModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ResearchTaskModule'));
diff --git a/tests/app/Module/ReviewChangesModuleTest.php b/tests/app/Module/ReviewChangesModuleTest.php
index 1dc0a0109a..f9b05b648c 100644
--- a/tests/app/Module/ReviewChangesModuleTest.php
+++ b/tests/app/Module/ReviewChangesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ReviewChangesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ReviewChangesModule'));
diff --git a/tests/app/Module/SiteMapModuleTest.php b/tests/app/Module/SiteMapModuleTest.php
index 9eaf1de328..2429948548 100644
--- a/tests/app/Module/SiteMapModuleTest.php
+++ b/tests/app/Module/SiteMapModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SiteMapModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SiteMapModule'));
diff --git a/tests/app/Module/SlideShowModuleTest.php b/tests/app/Module/SlideShowModuleTest.php
index 66037e6a6e..fd136eb0bb 100644
--- a/tests/app/Module/SlideShowModuleTest.php
+++ b/tests/app/Module/SlideShowModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SlideShowModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SlideShowModule'));
diff --git a/tests/app/Module/SourcesTabModuleTest.php b/tests/app/Module/SourcesTabModuleTest.php
index 6711de28fb..e785af9449 100644
--- a/tests/app/Module/SourcesTabModuleTest.php
+++ b/tests/app/Module/SourcesTabModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SourcesTabModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\SourcesTabModule'));
diff --git a/tests/app/Module/StoriesModuleTest.php b/tests/app/Module/StoriesModuleTest.php
index 4a73015ab3..ffcccc48d1 100644
--- a/tests/app/Module/StoriesModuleTest.php
+++ b/tests/app/Module/StoriesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class StoriesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\StoriesModule'));
diff --git a/tests/app/Module/ThemeSelectModuleTest.php b/tests/app/Module/ThemeSelectModuleTest.php
index 50de7784a7..581a15a7ba 100644
--- a/tests/app/Module/ThemeSelectModuleTest.php
+++ b/tests/app/Module/ThemeSelectModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ThemeSelectModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ThemeSelectModule'));
diff --git a/tests/app/Module/TopGivenNamesModuleTest.php b/tests/app/Module/TopGivenNamesModuleTest.php
index 8d042c2d74..1bd8b75030 100644
--- a/tests/app/Module/TopGivenNamesModuleTest.php
+++ b/tests/app/Module/TopGivenNamesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TopGivenNamesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\TopGivenNamesModule'));
diff --git a/tests/app/Module/TopPageViewsModuleTest.php b/tests/app/Module/TopPageViewsModuleTest.php
index b85c368f0e..df192aea03 100644
--- a/tests/app/Module/TopPageViewsModuleTest.php
+++ b/tests/app/Module/TopPageViewsModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TopPageViewsModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\TopPageViewsModule'));
diff --git a/tests/app/Module/TopSurnamesModuleTest.php b/tests/app/Module/TopSurnamesModuleTest.php
index dd8203625e..0d29310d11 100644
--- a/tests/app/Module/TopSurnamesModuleTest.php
+++ b/tests/app/Module/TopSurnamesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TopSurnamesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\TopSurnamesModule'));
diff --git a/tests/app/Module/UpcomingAnniversariesModuleTest.php b/tests/app/Module/UpcomingAnniversariesModuleTest.php
index cb134407d3..1594979d33 100644
--- a/tests/app/Module/UpcomingAnniversariesModuleTest.php
+++ b/tests/app/Module/UpcomingAnniversariesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UpcomingAnniversariesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\UpcomingAnniversariesModule'));
diff --git a/tests/app/Module/UserFavoritesModuleTest.php b/tests/app/Module/UserFavoritesModuleTest.php
index 5fc8c5bee3..dcd690fdc2 100644
--- a/tests/app/Module/UserFavoritesModuleTest.php
+++ b/tests/app/Module/UserFavoritesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UserFavoritesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\UserFavoritesModule'));
diff --git a/tests/app/Module/UserJournalModuleTest.php b/tests/app/Module/UserJournalModuleTest.php
index 231f0540f2..3704c0d581 100644
--- a/tests/app/Module/UserJournalModuleTest.php
+++ b/tests/app/Module/UserJournalModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UserJournalModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\UserJournalModule'));
diff --git a/tests/app/Module/UserMessagesModuleTest.php b/tests/app/Module/UserMessagesModuleTest.php
index a2fb556fb9..57f7b99511 100644
--- a/tests/app/Module/UserMessagesModuleTest.php
+++ b/tests/app/Module/UserMessagesModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UserMessagesModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\UserMessagesModule'));
diff --git a/tests/app/Module/UserWelcomeModuleTest.php b/tests/app/Module/UserWelcomeModuleTest.php
index f92e8ac0ac..527ed296a7 100644
--- a/tests/app/Module/UserWelcomeModuleTest.php
+++ b/tests/app/Module/UserWelcomeModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UserWelcomeModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\UserWelcomeModule'));
diff --git a/tests/app/Module/WelcomeBlockModuleTest.php b/tests/app/Module/WelcomeBlockModuleTest.php
index f917c5cc88..9790ea1aff 100644
--- a/tests/app/Module/WelcomeBlockModuleTest.php
+++ b/tests/app/Module/WelcomeBlockModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class WelcomeBlockModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\WelcomeBlockModule'));
diff --git a/tests/app/Module/YahrzeitModuleTest.php b/tests/app/Module/YahrzeitModuleTest.php
index 48f64acabc..e31c89b597 100644
--- a/tests/app/Module/YahrzeitModuleTest.php
+++ b/tests/app/Module/YahrzeitModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class YahrzeitModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\YahrzeitModule'));
diff --git a/tests/app/ModuleTest.php b/tests/app/ModuleTest.php
index 315b6c74ef..87766e11a5 100644
--- a/tests/app/ModuleTest.php
+++ b/tests/app/ModuleTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ModuleTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Module'));
diff --git a/tests/app/NoteTest.php b/tests/app/NoteTest.php
index b780a67ad5..5eff0ea80a 100644
--- a/tests/app/NoteTest.php
+++ b/tests/app/NoteTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class NoteTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Note'));
diff --git a/tests/app/PlaceTest.php b/tests/app/PlaceTest.php
index c2d5535706..94460a006c 100644
--- a/tests/app/PlaceTest.php
+++ b/tests/app/PlaceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class PlaceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Place'));
diff --git a/tests/app/Query/QueryMediaTest.php b/tests/app/Query/QueryMediaTest.php
index 43c9c8258f..b8307435f1 100644
--- a/tests/app/Query/QueryMediaTest.php
+++ b/tests/app/Query/QueryMediaTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class QueryMediaTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\QueryMedia'));
diff --git a/tests/app/Query/QueryNameTest.php b/tests/app/Query/QueryNameTest.php
index 6361c98c21..87eeaccb90 100644
--- a/tests/app/Query/QueryNameTest.php
+++ b/tests/app/Query/QueryNameTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class QueryNameTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\QueryName'));
diff --git a/tests/app/Report/ReportBaseTest.php b/tests/app/Report/ReportBaseTest.php
index f590dde55a..d07cb3a242 100644
--- a/tests/app/Report/ReportBaseTest.php
+++ b/tests/app/Report/ReportBaseTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ReportBaseTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ReportBase'));
diff --git a/tests/app/Report/ReportHTMLTest.php b/tests/app/Report/ReportHTMLTest.php
index e60852026c..6c16e02d48 100644
--- a/tests/app/Report/ReportHTMLTest.php
+++ b/tests/app/Report/ReportHTMLTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ReportHTMLTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ReportHtml'));
diff --git a/tests/app/Report/ReportPDFTest.php b/tests/app/Report/ReportPDFTest.php
index 3b915caf4f..7784bd7e71 100644
--- a/tests/app/Report/ReportPDFTest.php
+++ b/tests/app/Report/ReportPDFTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class ReportPDFTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\ReportPdf'));
diff --git a/tests/app/RepositoryTest.php b/tests/app/RepositoryTest.php
index fe3ab2c826..79d5abcbf1 100644
--- a/tests/app/RepositoryTest.php
+++ b/tests/app/RepositoryTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class RepositoryTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Repository'));
diff --git a/tests/app/SiteTest.php b/tests/app/SiteTest.php
index dcc117785c..c6aa4294d8 100644
--- a/tests/app/SiteTest.php
+++ b/tests/app/SiteTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SiteTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Site'));
diff --git a/tests/app/SoundexTest.php b/tests/app/SoundexTest.php
index 4c21653af9..640537578e 100644
--- a/tests/app/SoundexTest.php
+++ b/tests/app/SoundexTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SoundexTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Soundex'));
diff --git a/tests/app/SourceTest.php b/tests/app/SourceTest.php
index eb3a8f0a70..724917464d 100644
--- a/tests/app/SourceTest.php
+++ b/tests/app/SourceTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SourceTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Source'));
diff --git a/tests/app/StatementTest.php b/tests/app/StatementTest.php
index 64305ea22d..7068603d35 100644
--- a/tests/app/StatementTest.php
+++ b/tests/app/StatementTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class StatementTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Statement'));
diff --git a/tests/app/StatsTest.php b/tests/app/StatsTest.php
index 4b79684dcd..727aee3cc8 100644
--- a/tests/app/StatsTest.php
+++ b/tests/app/StatsTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class StatsTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class StatsTest extends PHPUnit_Framework_TestCase {
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Stats'));
diff --git a/tests/app/TreeTest.php b/tests/app/TreeTest.php
index 821cdb2fda..edd3008dbd 100644
--- a/tests/app/TreeTest.php
+++ b/tests/app/TreeTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class TreeTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\Tree'));
diff --git a/tests/app/UserTest.php b/tests/app/UserTest.php
index 7c4a8251cd..dda4841244 100644
--- a/tests/app/UserTest.php
+++ b/tests/app/UserTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class UserTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists
- *
- * @return void
*/
public function testClassExists() {
$this->assertTrue(class_exists(__NAMESPACE__ . '\User'));
diff --git a/tests/includes/functions/FunctionsChartsTest.php b/tests/includes/functions/FunctionsChartsTest.php
index 03f6572390..32c7d82e5f 100644
--- a/tests/includes/functions/FunctionsChartsTest.php
+++ b/tests/includes/functions/FunctionsChartsTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function print_sosa_number() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintSosaNumberExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_sosa_number'), true);
@@ -41,8 +37,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_family_children() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFamilyParentsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_family_children'), true);
@@ -50,8 +44,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_family_children() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFamilyChildrenExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_family_children'), true);
@@ -59,8 +51,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_sosa_family() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintSosaFamilyExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_sosa_family'), true);
@@ -68,8 +58,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_url_arrow() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintUrlArrowExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_url_arrow'), true);
@@ -77,8 +65,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_sosa_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetSosaNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_sosa_name'), true);
@@ -86,8 +72,6 @@ class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_cousins() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintCousinsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_cousins'), true);
diff --git a/tests/includes/functions/FunctionsDateTest.php b/tests/includes/functions/FunctionsDateTest.php
index 5efbc49768..e6ea8761e4 100644
--- a/tests/includes/functions/FunctionsDateTest.php
+++ b/tests/includes/functions/FunctionsDateTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsDateTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function get_age_at_event() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetAgeAtEventExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_age_at_event'), true);
@@ -41,8 +37,6 @@ class FunctionsDateTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_timestamp() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatTimestampExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_timestamp'), true);
@@ -50,8 +44,6 @@ class FunctionsDateTest extends PHPUnit_Framework_TestCase {
/**
* Test that function timestamp_to_gedcom_date() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionTimestampToGedcomDateExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\timestamp_to_gedcom_date'), true);
diff --git a/tests/includes/functions/FunctionsDbTest.php b/tests/includes/functions/FunctionsDbTest.php
index 54468023bf..e29ef2a096 100644
--- a/tests/includes/functions/FunctionsDbTest.php
+++ b/tests/includes/functions/FunctionsDbTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function fetch_all_links() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFetchAllLinksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\fetch_all_links'), true);
@@ -41,8 +37,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_source_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetSourceListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_source_list'), true);
@@ -50,8 +44,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_repo_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetRepoListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_repo_list'), true);
@@ -59,8 +51,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_note_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetNoteListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_note_list'), true);
@@ -68,8 +58,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_indis() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchIndisExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_indis'), true);
@@ -77,8 +65,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_indis_names() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchIndisNamesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_indis_names'), true);
@@ -86,8 +72,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_indis_soundex() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchIndisSoundexExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_indis_soundex'), true);
@@ -95,8 +79,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_recent_changes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetRecentChangesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_recent_changes'), true);
@@ -104,8 +86,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_fams() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchFamsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_fams'), true);
@@ -113,8 +93,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_fams_names() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchFamsNamesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_fams_names'), true);
@@ -122,8 +100,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_sources() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchSourcesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_sources'), true);
@@ -131,8 +107,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_notes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchNotesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_notes'), true);
@@ -140,8 +114,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function search_repos() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSearchReposExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\search_repos'), true);
@@ -149,8 +121,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function find_rin_id() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFindRinIdExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\find_rin_id'), true);
@@ -158,8 +128,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_common_surnames() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetCommonSurnamesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_common_surnames'), true);
@@ -167,8 +135,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_top_surnames() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetTopSurnamesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_top_surnames'), true);
@@ -176,8 +142,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_anniversary_events() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetAnniversaryEventsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_anniversary_events'), true);
@@ -185,8 +149,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_calendar_events() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetCalendarEventsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_calendar_events'), true);
@@ -194,8 +156,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function is_media_used_in_other_gedcom() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionIsMediaUsedInOtherGedcomExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\is_media_used_in_other_gedcom'), true);
@@ -203,8 +163,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_user_blocks() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetUserBlocksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_user_blocks'), true);
@@ -212,8 +170,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_gedcom_blocks() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetGedcomBlocksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_gedcom_blocks'), true);
@@ -221,8 +177,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function update_favorites() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateFavoritesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\update_favorites'), true);
@@ -230,8 +184,6 @@ class FunctionsDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_events_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetEventsListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_events_list'), true);
diff --git a/tests/includes/functions/FunctionsEditTest.php b/tests/includes/functions/FunctionsEditTest.php
index d67e23afb0..8782a3b9d8 100644
--- a/tests/includes/functions/FunctionsEditTest.php
+++ b/tests/includes/functions/FunctionsEditTest.php
@@ -24,8 +24,6 @@ use PHPUnit_Framework_TestCase;
class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
defined('WT_ROOT') || define('WT_ROOT', '');
@@ -33,8 +31,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function select_edit_control() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSelectEditControlExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\select_edit_control'), true);
@@ -42,9 +38,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function radio_buttons() exists in the correct namespace.
- * @return void
- *
- * @return void
*/
public function testFunctionRadioButtonsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\radio_buttons'), true);
@@ -52,8 +45,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_yes_no() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldYesNoExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_yes_no'), true);
@@ -61,8 +52,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function checkbox() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCheckboxExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\checkbox'), true);
@@ -70,8 +59,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function two_state_checkbox() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionTwoStateCheckboxExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\two_state_checkbox'), true);
@@ -79,8 +66,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_language_checkboxes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditLanguageCheckboxesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_language_checkboxes'), true);
@@ -88,8 +73,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_access_level() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldAccessLevelExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_access_level'), true);
@@ -97,8 +80,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_resn() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldResnExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_resn'), true);
@@ -106,8 +87,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_contact() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldContactExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_contact'), true);
@@ -115,8 +94,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_language() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldLangaugeExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_language'), true);
@@ -124,8 +101,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_integers() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldIntegersExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_integers'), true);
@@ -133,8 +108,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_username() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldUsernameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_username'), true);
@@ -142,8 +115,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_adop() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldAdopExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_adop'), true);
@@ -151,8 +122,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_pedi() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldPediExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_pedi'), true);
@@ -160,8 +129,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_name_type() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldNameTypeExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_name_type'), true);
@@ -169,8 +136,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function edit_field_rela() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEditFieldRelaExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\edit_field_rela'), true);
@@ -178,8 +143,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function remove_links() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionRemoveLinksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\remove_links'), true);
@@ -187,8 +150,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_calendar_popup() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintCalendarPopupExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_calendar_popup'), true);
@@ -196,8 +157,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_addnewmedia_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddnewmediaLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_addnewmedia_link'), true);
@@ -205,8 +164,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_addnewrepository_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddnewrepositoryLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_addnewrepository_link'), true);
@@ -214,8 +171,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_addnewnote_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddnewnoteLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_addnewnote_link'), true);
@@ -223,8 +178,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_editnote_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintEditnoteLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_editnote_link'), true);
@@ -232,8 +185,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_addnewsource_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddnewsourceLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_addnewsource_link'), true);
@@ -241,8 +192,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function add_simple_tag() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAddSimpleTagExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\add_simple_tag'), true);
@@ -250,8 +199,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_add_layer() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddLayerExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_add_layer'), true);
@@ -259,8 +206,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function addSimpleTags() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAddSimpleTagsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\addSimpleTags'), true);
@@ -268,8 +213,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function addNewName() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAddNewNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\addNewName'), true);
@@ -277,8 +220,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function addNewSex() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAddNewSexExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\addNewSex'), true);
@@ -286,8 +227,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function addNewFact() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAddNewFactExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\addNewFact'), true);
@@ -295,8 +234,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function splitSOUR() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSplitSourExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\splitSOUR'), true);
@@ -304,8 +241,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function updateSOUR() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateSourExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\updateSOUR'), true);
@@ -313,8 +248,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function updateRest() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateRestExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\updateRest'), true);
@@ -322,8 +255,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function handle_updates() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionHandleUpdatesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\handle_updates'), true);
@@ -331,8 +262,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function create_add_form() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCreateAddFromExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\create_add_form'), true);
@@ -340,8 +269,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function create_edit_form() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCreateEditFromExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\create_edit_form'), true);
@@ -349,8 +276,6 @@ class FunctionsEditTest extends PHPUnit_Framework_TestCase {
/**
* Test that function insert_missing_subtags() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionInsertMissingSubtagsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\insert_missing_subtags'), true);
diff --git a/tests/includes/functions/FunctionsExportTest.php b/tests/includes/functions/FunctionsExportTest.php
index abff27e0cf..21447e0e45 100644
--- a/tests/includes/functions/FunctionsExportTest.php
+++ b/tests/includes/functions/FunctionsExportTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsExportTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function reformat_record_export() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionReformatRecordExportExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\reformat_record_export'), true);
@@ -41,8 +37,6 @@ class FunctionsExportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function gedcom_header() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGedcomHeaderExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\gedcom_header'), true);
@@ -50,8 +44,6 @@ class FunctionsExportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function convert_media_path() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionConvertMediaPathExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\convert_media_path'), true);
@@ -59,8 +51,6 @@ class FunctionsExportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function export_gedcom() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionExportGedcomExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\export_gedcom'), true);
diff --git a/tests/includes/functions/FunctionsImportTest.php b/tests/includes/functions/FunctionsImportTest.php
index 1cce8140ad..f1a653574a 100644
--- a/tests/includes/functions/FunctionsImportTest.php
+++ b/tests/includes/functions/FunctionsImportTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function reformat_record_import() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionReformatRecordImportExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\reformat_record_import'), true);
@@ -41,8 +37,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function update_dates() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateDatesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\update_dates'), true);
@@ -50,8 +44,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function update_links() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateLinksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\update_links'), true);
@@ -59,8 +51,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function update_names() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateNamesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\update_names'), true);
@@ -68,8 +58,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function convert_inline_media() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionConvertInlineMediaExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\convert_inline_media'), true);
@@ -77,8 +65,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function create_media_object() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCreateMediaObjectExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\create_media_object'), true);
@@ -86,8 +72,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function accept_all_changes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionAcceptAllChangesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\accept_all_changes'), true);
@@ -95,8 +79,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function reject_all_changes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionRejectAllChangesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\reject_all_changes'), true);
@@ -104,8 +86,6 @@ class FunctionsImportTest extends PHPUnit_Framework_TestCase {
/**
* Test that function update_record() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUpdateRecordExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\update_record'), true);
diff --git a/tests/includes/functions/FunctionsMediaDbTest.php b/tests/includes/functions/FunctionsMediaDbTest.php
index 2f44bd753d..95c9e0b9d6 100644
--- a/tests/includes/functions/FunctionsMediaDbTest.php
+++ b/tests/includes/functions/FunctionsMediaDbTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsMediaDbTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test the function return_bytes().
- *
- * @return void
*/
public function testFunctionReturnBytes() {
$this->assertSame(-1, return_bytes(''));
@@ -51,8 +47,6 @@ class FunctionsMediaDbTest extends PHPUnit_Framework_TestCase {
/**
* Test that function hasMemoryForImage() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionHasMemoryForImageExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\hasMemoryForImage'), true);
diff --git a/tests/includes/functions/FunctionsPrintFactsTest.php b/tests/includes/functions/FunctionsPrintFactsTest.php
index bed10e413d..51cf08cefc 100644
--- a/tests/includes/functions/FunctionsPrintFactsTest.php
+++ b/tests/includes/functions/FunctionsPrintFactsTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function print_fact() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFactExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_fact'), true);
@@ -41,8 +37,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_repository_record() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintRepositoryRecordExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_repository_record'), true);
@@ -50,8 +44,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_fact_sources() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFactSourcesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_fact_sources'), true);
@@ -59,8 +51,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_media_links() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintMediaLinksExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_media_links'), true);
@@ -68,8 +58,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_main_sources() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintMainSourcesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_main_sources'), true);
@@ -77,8 +65,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function printSourceStructure() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintSourceStructureExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\printSourceStructure'), true);
@@ -86,8 +72,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function getSourceStructure() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetSourceStructureExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\getSourceStructure'), true);
@@ -95,8 +79,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_main_notes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintMainNotesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_main_notes'), true);
@@ -104,8 +86,6 @@ class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_main_media() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintMainMediaExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_main_media'), true);
diff --git a/tests/includes/functions/FunctionsPrintListsTest.php b/tests/includes/functions/FunctionsPrintListsTest.php
index 959c7d1c7f..164f0979c6 100644
--- a/tests/includes/functions/FunctionsPrintListsTest.php
+++ b/tests/includes/functions/FunctionsPrintListsTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function format_indi_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatIndiTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_indi_table'), true);
@@ -41,8 +37,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_fam_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatFamTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_fam_table'), true);
@@ -50,8 +44,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_sour_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatSourTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_sour_table'), true);
@@ -59,8 +51,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_note_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatNoteTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_note_table'), true);
@@ -68,8 +58,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_repo_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatRepoTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_repo_table'), true);
@@ -77,8 +65,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_media_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatMediaTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_media_table'), true);
@@ -86,8 +72,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_surname_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatSurnameTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_surname_table'), true);
@@ -95,8 +79,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_surname_tagcloud() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatSurnameTagcloudExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_surname_tagcloud'), true);
@@ -104,8 +86,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_surname_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatSurnameListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_surname_list'), true);
@@ -113,8 +93,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_changes_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintChangesListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_changes_list'), true);
@@ -122,8 +100,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_changes_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintChangesTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_changes_table'), true);
@@ -131,8 +107,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_events_table() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintEventsTableExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_events_table'), true);
@@ -140,8 +114,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_events_list() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintEventsListExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_events_list'), true);
@@ -149,8 +121,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_chart_by_age() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintChartByAgeExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_chart_by_age'), true);
@@ -158,8 +128,6 @@ class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_chart_by_decade() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintChartByDecadeExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_chart_by_decade'), true);
diff --git a/tests/includes/functions/FunctionsPrintTest.php b/tests/includes/functions/FunctionsPrintTest.php
index 49751c69a8..ec14b2dde5 100644
--- a/tests/includes/functions/FunctionsPrintTest.php
+++ b/tests/includes/functions/FunctionsPrintTest.php
@@ -24,27 +24,20 @@ use PHPUnit_Framework_TestCase;
class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function print_pedigree_person() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintPedigreePersonExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_pedigree_person'), true);
}
/**
-
- /**
+ /**
* Test that function print_note_record() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintNoteRecordExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_note_record'), true);
@@ -52,8 +45,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_fact_notes() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFactNotesExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_fact_notes'), true);
@@ -61,8 +52,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function help_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionHelpLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\help_link'), true);
@@ -70,8 +59,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function wiki_help_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionWikiHelpLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\wiki_help_link'), true);
@@ -79,8 +66,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function highlight_search_hits() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionHighlightSearchHitsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\highlight_search_hits'), true);
@@ -88,8 +73,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_asso_rela_record() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatAssoRelaRecordExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_asso_rela_record'), true);
@@ -97,8 +80,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_parents_age() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatParentsAgeExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_parents_age'), true);
@@ -106,8 +87,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_fact_date() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatFactDateExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_fact_date'), true);
@@ -115,8 +94,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function format_fact_place() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFormatFactPlaceExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\format_fact_place'), true);
@@ -124,8 +101,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function CheckFactUnique() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCheckFactUniqueExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\CheckFactUnique'), true);
@@ -133,8 +108,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_add_new_fact() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAddNewFactExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_add_new_fact'), true);
@@ -142,8 +115,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function init_calendar_popup() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionInitCalendarPopupExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\init_calendar_popup'), true);
@@ -151,8 +122,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findindi_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindindiLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findindi_link'), true);
@@ -160,8 +129,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findplace_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindplaceLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findplace_link'), true);
@@ -169,8 +136,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findfamily_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindfamilyLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findfamily_link'), true);
@@ -178,8 +143,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_specialchar_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintSpecialcharLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_specialchar_link'), true);
@@ -187,8 +150,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_autopaste_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintAutopasteLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_autopaste_link'), true);
@@ -196,8 +157,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findsource_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindsourceLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findsource_link'), true);
@@ -205,8 +164,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findnote_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindnoteLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findnote_link'), true);
@@ -214,8 +171,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findrepository_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindrepositoryLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findrepository_link'), true);
@@ -223,8 +178,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findmedia_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindmediaLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findmedia_link'), true);
@@ -232,8 +185,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function print_findfact_link() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionPrintFindfactLinkExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\print_findfact_link'), true);
@@ -241,8 +192,6 @@ class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_lds_glance() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetLdsGlanceExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_lds_glance'), true);
diff --git a/tests/includes/functions/FunctionsRtlTest.php b/tests/includes/functions/FunctionsRtlTest.php
index c505aeca40..152cc9c132 100644
--- a/tests/includes/functions/FunctionsRtlTest.php
+++ b/tests/includes/functions/FunctionsRtlTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function stripLRMRLM() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionStripLRMRLMExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\stripLRMRLM'), true);
@@ -41,8 +37,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function spanLTRRTL() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSpanLTRRTLExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\spanLTRRTL'), true);
@@ -50,8 +44,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function starredName() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionStarredNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\starredName'), true);
@@ -59,8 +51,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function getChar() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetCharExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\getChar'), true);
@@ -68,8 +58,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function breakCurrentSpan() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionBreakCurrentSpanExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\breakCurrentSpan'), true);
@@ -77,8 +65,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function beginCurrentSpan() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionBeginCurrentSpanExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\beginCurrentSpan'), true);
@@ -86,8 +72,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function finishCurrentSpan() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFinishCurrentSpanExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\finishCurrentSpan'), true);
@@ -95,8 +79,6 @@ class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
/**
* Test that function utf8_wordwrap() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionUtf8WordwrapExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\utf8_wordwrap'), true);
diff --git a/tests/includes/functions/FunctionsTest.php b/tests/includes/functions/FunctionsTest.php
index f8677b641e..1a66a4ef6c 100644
--- a/tests/includes/functions/FunctionsTest.php
+++ b/tests/includes/functions/FunctionsTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that function fetch_latest_version() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFetchLatestVersionExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\fetch_latest_version'), true);
@@ -41,8 +37,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function file_upload_error_text() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionFileUploadErrorTextExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\file_upload_error_text'), true);
@@ -50,8 +44,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_sub_record() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetSubRecordExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_sub_record'), true);
@@ -59,8 +51,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_cont() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetContExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_cont'), true);
@@ -68,8 +58,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function event_sort() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEventSortExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\event_sort'), true);
@@ -77,8 +65,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function event_sort_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionEventSortNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\event_sort_name'), true);
@@ -86,8 +72,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function sort_facts() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionSortFactsExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\sort_facts'), true);
@@ -95,8 +79,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_close_relationship_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetCloseRelationshipNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_close_relationship_name'), true);
@@ -104,8 +86,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_associate_relationship_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetAssociateRelationshipNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_associate_relationship_name'), true);
@@ -113,8 +93,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_relationship() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetRelationshipExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_relationship'), true);
@@ -122,8 +100,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_relationship_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetRelationshipNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_relationship_name'), true);
@@ -131,8 +107,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function cousin_name() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCousinNameExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\cousin_name'), true);
@@ -140,8 +114,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function cousin_name2() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionCousinName2Exists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\cousin_name2'), true);
@@ -149,8 +121,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_relationship_name_from_path() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetRelationshipNameFromPathExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_relationship_name_from_path'), true);
@@ -158,8 +128,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function get_query_url() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionGetQueryUrlExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\get_query_url'), true);
@@ -167,8 +135,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Test that function isFileExternal() exists in the correct namespace.
- *
- * @return void
*/
public function testFunctionIsFileExternalExists() {
$this->assertEquals(function_exists(__NAMESPACE__ . '\\isFileExternal'), true);
@@ -176,8 +142,6 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
/**
* Tests for function isFileExternal()
- *
- * @return void
*/
public function testFunctionIsFileExternal() {
$this->assertEquals(isFileExternal('http://www.example.com/file.txt'), true);
diff --git a/tests/modules_v3/batch_update/plugins/DeathYBuPluginTest.php b/tests/modules_v3/batch_update/plugins/DeathYBuPluginTest.php
index 70747b315a..b830d36bab 100644
--- a/tests/modules_v3/batch_update/plugins/DeathYBuPluginTest.php
+++ b/tests/modules_v3/batch_update/plugins/DeathYBuPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DeathYBuPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists.
- *
- * @return void
*/
public function testFunctionGetUserFullNameExists() {
$this->assertEquals(true, class_exists(__NAMESPACE__ . '\\BatchUpdateMissingDeathPlugin'));
diff --git a/tests/modules_v3/batch_update/plugins/DuplicateLinksBuPluginTest.php b/tests/modules_v3/batch_update/plugins/DuplicateLinksBuPluginTest.php
index 82be342071..ddbc91e4e1 100644
--- a/tests/modules_v3/batch_update/plugins/DuplicateLinksBuPluginTest.php
+++ b/tests/modules_v3/batch_update/plugins/DuplicateLinksBuPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class DuplicateLinksBuPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists.
- *
- * @return void
*/
public function testFunctionGetUserFullNameExists() {
$this->assertEquals(true, class_exists(__NAMESPACE__ . '\\BatchUpdateDuplicateLinksPlugin'));
diff --git a/tests/modules_v3/batch_update/plugins/MarriedNamesBuPluginTest.php b/tests/modules_v3/batch_update/plugins/MarriedNamesBuPluginTest.php
index 277d0bbe66..214866c134 100644
--- a/tests/modules_v3/batch_update/plugins/MarriedNamesBuPluginTest.php
+++ b/tests/modules_v3/batch_update/plugins/MarriedNamesBuPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class MarriedNamesBuPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists.
- *
- * @return void
*/
public function testFunctionGetUserFullNameExists() {
$this->assertEquals(true, class_exists(__NAMESPACE__ . '\\BatchUpdateMarriedNamesPlugin'));
diff --git a/tests/modules_v3/batch_update/plugins/NameFormatBuPluginTest.php b/tests/modules_v3/batch_update/plugins/NameFormatBuPluginTest.php
index d377689a1f..e9a854434b 100644
--- a/tests/modules_v3/batch_update/plugins/NameFormatBuPluginTest.php
+++ b/tests/modules_v3/batch_update/plugins/NameFormatBuPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class NameFormatBuPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists.
- *
- * @return void
*/
public function testFunctionGetUserFullNameExists() {
$this->assertEquals(true, class_exists(__NAMESPACE__ . '\\BatchUpdateNameFormatPlugin'));
diff --git a/tests/modules_v3/batch_update/plugins/SearchReplaceBuPluginTest.php b/tests/modules_v3/batch_update/plugins/SearchReplaceBuPluginTest.php
index c8725924df..e7631d3cd3 100644
--- a/tests/modules_v3/batch_update/plugins/SearchReplaceBuPluginTest.php
+++ b/tests/modules_v3/batch_update/plugins/SearchReplaceBuPluginTest.php
@@ -24,16 +24,12 @@ use PHPUnit_Framework_TestCase;
class SearchReplaceBuPluginTest extends PHPUnit_Framework_TestCase {
/**
* Prepare the environment for these tests
- *
- * @return void
*/
public function setUp() {
}
/**
* Test that the class exists.
- *
- * @return void
*/
public function testFunctionGetUserFullNameExists() {
$this->assertEquals(true, class_exists(__NAMESPACE__ . '\\BatchUpdateSearchReplacePlugin'));
diff --git a/timeline.php b/timeline.php
index b24ec65542..f137fab1ff 100644
--- a/timeline.php
+++ b/timeline.php
@@ -317,10 +317,10 @@ if (count($controller->people) > 0) {
<div id="timeline_chart">
<!-- print the timeline line image -->
<div id="line" style="position:absolute; <?php echo I18N::direction() === 'ltr' ? 'left: ' . ($basexoffset + 22) : "right: " . ($basexoffset + 22); ?>px; top: <?php echo $baseyoffset; ?>px;">
- <img src="<?php echo Theme::theme()->parameter('image-vline'); ?>" width="3" height="<?php echo ($baseyoffset + (($controller->topyear - $controller->baseyear) * $controller->scale)); ?>" alt="">
+ <img src="<?php echo Theme::theme()->parameter('image-vline'); ?>" width="3" height="<?php echo $baseyoffset + ($controller->topyear - $controller->baseyear) * $controller->scale; ?>" alt="">
</div>
<!-- print divs for the grid -->
- <div id="scale<?php echo $controller->baseyear; ?>" style="position:absolute; <?php echo (I18N::direction() === 'ltr' ? "left: $basexoffset" : "right: $basexoffset"); ?>px; top: <?php echo ($baseyoffset - 5); ?>px; font-size: 7pt; text-align: <?php echo (I18N::direction() === 'ltr' ? 'left' : 'right'); ?>;">
+ <div id="scale<?php echo $controller->baseyear; ?>" style="position:absolute; <?php echo I18N::direction() === 'ltr' ? "left: $basexoffset" : "right: $basexoffset"; ?>px; top: <?php echo $baseyoffset - 5; ?>px; font-size: 7pt; text-align: <?php echo I18N::direction() === 'ltr' ? 'left' : 'right'; ?>;">
<?php echo $controller->baseyear . '—'; ?>
</div>
<?php
@@ -352,7 +352,7 @@ if (count($controller->people) > 0) {
$ageyoffset = $baseyoffset + ($controller->bheight * $p);
$col = $p % 6;
?>
- <div id="agebox<?php echo $p; ?>" style="cursor:move; position:absolute; <?php echo (I18N::direction() === 'ltr' ? 'left: ' . ($basexoffset + 20) : 'right: ' . ($basexoffset + 20)); ?>px; top:<?php echo $ageyoffset; ?>px; height:<?php echo $controller->bheight; ?>px; display:none;" onmousedown="ageCursorMouseDown(this, <?php echo $p; ?>);">
+ <div id="agebox<?php echo $p; ?>" style="cursor:move; position:absolute; <?php echo I18N::direction() === 'ltr' ? 'left: ' . ($basexoffset + 20) : 'right: ' . ($basexoffset + 20); ?>px; top:<?php echo $ageyoffset; ?>px; height:<?php echo $controller->bheight; ?>px; display:none;" onmousedown="ageCursorMouseDown(this, <?php echo $p; ?>);">
<table cellspacing="0" cellpadding="0">
<tr>
<td>
@@ -385,14 +385,14 @@ if (count($controller->people) > 0) {
<br><br><br><br>
<?php } ?>
<script>
- var bottomy = <?php echo ($baseyoffset + (($controller->topyear - $controller->baseyear) * $controller->scale)); ?>-5;
+ var bottomy = <?php echo $baseyoffset + ($controller->topyear - $controller->baseyear) * $controller->scale; ?>-5;
var topy = <?php echo $baseyoffset; ?>;
var baseyear = <?php echo $controller->baseyear - (25 / $controller->scale); ?>;
var birthyears = [];
var birthmonths = [];
var birthdays = [];
<?php
- foreach ($controller->people as $c=>$indi) {
+ foreach ($controller->people as $c => $indi) {
$pid = $indi->getXref();
if (!empty($controller->birthyears[$pid])) {
echo 'birthyears[' . $c . ']=' . $controller->birthyears[$pid] . ';';