Your project should use Doctrine migrations

More information: https://insight.symfony.com/what-we-analyse/composer.using_migrations

Use Doctrine Migrations to keep your production database synchronized

Time to fix: about 1 hour
Open Issue Permalink
Collective

Source code should not contain tasks comments 13

More information: https://insight.symfony.com/what-we-analyse/task_fixme_comment

  1. class CensusColumnReligion extends AbstractCensusColumn implements CensusColumnInterface
  2. {
  3. /**
  4. * Generate the likely value of this census column, based on available information.
  5. *
  6. * @todo Look for RELI tags (or subtags?)

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. *
  8. * @param Individual $individual
  9. * @param Individual $head
  10. *
  11. * @return string
  1. 'ged' => $tree->name(),
  2. 'query' => 'QUERY',
  3. ]),
  4. ]) . '>';
  5. /** @TODO - typeaheadjs.css doesn't work in an input-group */

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. $html .= view('edit/input-addon-coordinates', ['id' => $id]);
  7. $html .= view('edit/input-addon-help', ['fact' => 'PLAC']);
  8. $html .= '</div>';
  9. } elseif ($fact === 'QUAY') {
  10. $html .= view('components/select', ['id' => $id, 'name' => $name, 'selected' => $value, 'options' => GedcomCodeQuay::getValues()]);
  1. $relationship = null;
  2. $path1 = substr($path, 0, 3);
  3. $path2 = substr($path, 3);
  4. while ($path2) {
  5. // @TODO need the actual people

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. // I18N: A complex relationship, such as “third-cousin’s great-uncle”
  7. $tmp = I18N::translate(
  8. '%1$s’s %2$s',
  9. self::getRelationshipNameFromPath($path1),
  10. self::getRelationshipNameFromPath($path2)
  1. $user_list[$tmp_user->userName()] = $tmp_user->userName();
  2. }
  3. $action = $request->getQueryParams()['action'] ?? '';
  4. // @TODO This ought to be a POST action

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. if ($action === 'delete') {
  6. $this->changesQuery($request)->delete();
  7. }
  8. // First and last change in the database.
  1. 'n_soundex_surn_dm',
  2. ])->from('name')
  3. ->where('n_file', '=', $tree1->id());
  4. });
  5. // @TODO placelinks is harder than the others...

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. (new Builder(DB::connection()))->from('dates')->insertUsing([
  7. 'd_file',
  8. 'd_gid',
  9. 'd_day',
  1. $ancestors = $this->allAncestors($self);
  2. } else {
  3. $ancestors = [];
  4. }
  5. // @TODO - convert this to use views

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. $html = view('branches-list', [
  7. 'branches' => $this->getPatriarchsHtml($tree, $individuals, $ancestors, $surname, $soundex_dm, $soundex_std),
  8. ]);
  9. return response($html);
  1. $individual = Individual::getInstance($xref, $tree);
  2. Auth::checkIndividualAccess($individual, true);
  3. // @TODO - Move the name-specific code to this function?

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  4. return app(EditGedcomRecordController::class)->updateFact($request, $tree);
  5. }
  6. /**
  7. * Add a new name record.
  1. $individual = Individual::getInstance($xref, $tree);
  2. Auth::checkIndividualAccess($individual, true);
  3. // @TODO - Move the name-specific code to this function?

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  4. return app(EditGedcomRecordController::class)->updateFact($request, $tree);
  5. }
  6. /**
  1. </div>
  2. <?php
  3. $html = ob_get_clean();
  4. // @TODO convert this to use views

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. return $this->viewResponse('individual-list-page', [
  6. 'content' => $html,
  7. 'title' => $title,
  8. ]);
  9. }
  1. if (!$media->canShow()) {
  2. return $this->httpStatusAsImage(StatusCodeInterface::STATUS_FORBIDDEN);
  3. }
  4. // @TODO handle SVG files

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. foreach ($media->mediaFiles() as $media_file) {
  6. if ($media_file->factId() === $fact_id) {
  7. if ($media_file->isExternal()) {
  8. return redirect($media_file->filename());
  9. }
  1. }
  2. /**
  3. * Display an icon for this fact.
  4. *
  5. * @TODO use CSS for this

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. *
  7. * @param Fact $fact
  8. *
  9. * @return string
  10. */
  1. $recursion = min($recursion, $max_recursion);
  2. $paths = $this->calculateRelationships($individual1, $individual2, $recursion, (bool) $ancestors);
  3. // @TODO - convert to views

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  4. ob_start();
  5. if (I18N::direction() === 'ltr') {
  6. $diagonal1 = asset('css/images/dline.png');
  7. $diagonal2 = asset('css/images/dline2.png');
  8. } else {
  1. new FrenchDate($jd),
  2. new JewishDate($jd),
  3. new HijriDate($jd),
  4. ];
  5. // @TODO - there is a bug in the Persian Calendar that gives zero months for invalid dates

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. if ($jd > (new PersianCalendar())->jdStart()) {
  7. $anniversaries[] = new JalaliDate($jd);
  8. }
  9. foreach ($anniversaries as $anniv) {

Code should not be duplicated 27

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. ->select(['f_id AS xref', 'f_gedcom AS gedcom', 'd_type', 'd_day', 'd_month', 'd_year', 'd_fact', 'd_type']);
  2. // Now fetch these events
  3. $found_facts = [];
  4. foreach (['INDI' => $ind_query, 'FAM' => $fam_query] as $type => $query) {

    The next 13 lines appear both in app/Services/CalendarService.php:139 and app/Services/CalendarService.php:308.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. foreach ($query->get() as $row) {
  6. if ($type === 'INDI') {
  7. $record = Individual::getInstance($row->xref, $tree, $row->gedcom);
  8. } else {
  9. $record = Family::getInstance($row->xref, $tree, $row->gedcom);
  1. /**
  2. * The columns of the census.
  3. *
  4. * @return CensusColumnInterface[]
  5. */
  6. public function columns(): array

    The next 16 lines appear in app/Census/CensusOfCzechRepublic1880.php:40, app/Census/CensusOfCzechRepublic1890.php:40 and app/Census/CensusOfCzechRepublic1900.php:40.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. return [
  9. new CensusColumnFullName($this, 'Jméno', ''),
  10. new CensusColumnRelationToHead($this, 'Vztah', ''),
  11. new CensusColumnSexMZ($this, 'Pohlaví', ''),
  1. /**
  2. * The columns of the census.
  3. *
  4. * @return CensusColumnInterface[]
  5. */
  6. public function columns(): array

    The next 16 lines appear in app/Census/CensusOfDenmark1870.php:40, app/Census/CensusOfDenmark1880.php:40 and app/Census/CensusOfDenmark1885.php:50.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. return [
  9. new CensusColumnFullName($this, 'Navn', ''),
  10. new CensusColumnSexMK($this, 'Køn', ''),
  11. new CensusColumnAge($this, 'Alder', ''),
  1. /**
  2. * The columns of the census.
  3. *
  4. * @return CensusColumnInterface[]
  5. */
  6. public function columns(): array

    The next 17 lines appear both in app/Census/CensusOfDenmark1906.php:40 and app/Census/CensusOfDenmark1911.php:40.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. return [
  9. new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'),
  10. new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'),
  11. new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'),
  1. namespace Fisharebest\Webtrees\Census;
  2. /**
  3. * Definitions for a census
  4. */
  5. class CensusOfEngland1911 extends CensusOfEngland implements CensusInterface

    The next 36 lines appear both in app/Census/CensusOfEngland1911.php:23 and app/Census/CensusOfWales1911.php:23.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. {
  7. /**
  8. * When did this census occur.
  9. *
  10. * @return string
  1. /**
  2. * The columns of the census.
  3. *
  4. * @return CensusColumnInterface[]
  5. */
  6. public function columns(): array

    The next 17 lines appear both in app/Census/CensusOfUnitedStates1800.php:40 and app/Census/CensusOfUnitedStates1810.php:40.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. return [
  9. new CensusColumnFullName($this, 'Name', 'Name of head of family'),
  10. new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
  11. new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
  1. /**
  2. * The columns of the census.
  3. *
  4. * @return CensusColumnInterface[]
  5. */
  6. public function columns(): array

    The next 31 lines appear both in app/Census/CensusOfUnitedStates1830.php:40 and app/Census/CensusOfUnitedStates1840.php:40.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. return [
  9. new CensusColumnFullName($this, 'Name', 'Name of head of family'),
  10. new CensusColumnNull($this, 'M0', 'Free white males 0-5 years'),
  11. new CensusColumnNull($this, 'M5', 'Free white males 5-10 years'),
  1. new CensusColumnFullName($this, 'Name', 'Name'),
  2. new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
  3. new CensusColumnNull($this, 'Home', 'Home owned or rented'),
  4. new CensusColumnNull($this, 'V/R', 'Value of house, if owned, or monthly rental if rented'),
  5. new CensusColumnNull($this, 'Radio', 'Radio set'),
  6. new CensusColumnNull($this, 'Farm', 'Does this family live on a farm'),

    The next 23 lines appear both in app/Census/CensusOfUnitedStates1930.php:48 and app/Census/CensusOfUnitedStates1940.php:47.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. new CensusColumnSexMF($this, 'Sex', 'Sex'),
  8. new CensusColumnNull($this, 'Race', 'Color or race'),
  9. new CensusColumnAge($this, 'Age', 'Age at last birthday'),
  10. new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
  11. new CensusColumnAgeMarried($this, 'AM', 'Age at first marriage'),
  1. if (self::$currentState === 'LTR') {
  2. // Move trailing numeric strings to the following RTL text. Include any blanks preceding or following the numeric text too.
  3. if (I18N::direction() === 'rtl' && self::$previousState === 'RTL' && !$theEnd) {
  4. $trailingString = '';
  5. $savedSpan = $textSpan;
  6. while ($textSpan !== '') {

    The next 43 lines appear both in app/Functions/FunctionsRtl.php:726 and app/Functions/FunctionsRtl.php:993.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. // Look for trailing spaces and tentatively move them
  8. if (substr($textSpan, -1) === ' ') {
  9. $trailingString = ' ' . $trailingString;
  10. $textSpan = substr($textSpan, 0, -1);
  11. continue;
  1. *
  2. * @return string[]
  3. */
  4. private function tagsForPrivacy(Tree $tree): array
  5. {
  6. $tags = array_unique(array_merge(

    The next 22 lines appear both in app/Http/Controllers/AdminController.php:420 and app/Http/Controllers/AdminTreesController.php:1032.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. explode(',', $tree->getPreference('INDI_FACTS_ADD')),
  8. explode(',', $tree->getPreference('INDI_FACTS_UNIQUE')),
  9. explode(',', $tree->getPreference('FAM_FACTS_ADD')),
  10. explode(',', $tree->getPreference('FAM_FACTS_UNIQUE')),
  11. explode(',', $tree->getPreference('NOTE_FACTS_ADD')),
  1. 'managers' => $user_service->managers(),
  2. 'moderators' => $user_service->moderators(),
  3. 'unapproved' => $user_service->unapproved(),
  4. 'unverified' => $user_service->unverified(),
  5. 'all_trees' => Tree::getAll(),
  6. 'changes' => $this->totalChanges(),

    The next 13 lines appear both in app/Http/Controllers/Admin/ControlPanelController.php:93 and app/Http/Controllers/Admin/ControlPanelController.php:154.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. 'individuals' => $this->totalIndividuals(),
  8. 'families' => $this->totalFamilies(),
  9. 'sources' => $this->totalSources(),
  10. 'media' => $this->totalMediaObjects(),
  11. 'repositories' => $this->totalRepositories(),
  1. *
  2. * @return ResponseInterface
  3. */
  4. public function page(ServerRequestInterface $request, Tree $tree): ResponseInterface
  5. {
  6. $cal = $request->getQueryParams()['cal'] ?? '';

    The next 18 lines appear both in app/Http/Controllers/CalendarController.php:72 and app/Http/Controllers/CalendarController.php:169.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. $day = $request->getQueryParams()['day'] ?? '';
  8. $month = $request->getQueryParams()['month'] ?? '';
  9. $year = $request->getQueryParams()['year'] ?? '';
  10. $view = $request->getQueryParams()['view'] ?? 'day';
  11. $filterev = $request->getQueryParams()['filterev'] ?? 'BIRT-MARR-DEAT';
  1. $family = Family::getInstance($xref, $tree);
  2. Auth::checkFamilyAccess($family, true);
  3. $this->glevels = $params['glevels'] ?? [];

    The next 18 lines appear both in app/Http/Controllers/EditFamilyController.php:241 and app/Http/Controllers/EditIndividualController.php:545.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  4. $this->tag = $params['tag'] ?? [];
  5. $this->text = $params['text'] ?? [];
  6. $this->islink = $params['islink'] ?? [];
  7. // Create the new spouse
  1. */
  2. private function updateUserBlocks(int $user_id, array $main_blocks, array $side_blocks): void
  3. {
  4. $existing_block_ids = DB::table('block')
  5. ->where('user_id', '=', $user_id)
  6. ->pluck('block_id');

    The next 33 lines appear both in app/Http/Controllers/HomePageController.php:827 and app/Http/Controllers/HomePageController.php:883.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. // Deleted blocks
  8. foreach ($existing_block_ids as $existing_block_id) {
  9. if (!in_array($existing_block_id, $main_blocks, false) && !in_array($existing_block_id, $side_blocks, false)) {
  10. DB::table('block_setting')
  1. {
  2. $url = $request->getQueryParams()['url'];
  3. $changes = DB::table('change')
  4. ->where('gedcom_id', '=', $tree->id())
  5. ->where('status', '=', 'pending')

    The next 35 lines appear both in app/Http/Controllers/PendingChangesController.php:59 and app/Http/Controllers/PendingChangesController.php:105.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. ->orderBy('change_id')
  7. ->get();
  8. foreach ($changes as $change) {
  9. if (empty($change->new_gedcom)) {
  1. * @return string
  2. */
  3. public function chartTitle(Individual $individual): string
  4. {
  5. /* I18N: %s is an individual’s name */
  6. return I18N::translate('Ancestors of %s', $individual->fullName());

    The next 29 lines appear both in app/Module/AncestorsChartModule.php:106 and app/Module/DescendancyChartModule.php:111.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. }
  8. /**
  9. * A form to request the chart parameters.
  10. *
  1. public function getFavorites(Tree $tree): array
  2. {
  3. return DB::table('favorite')
  4. ->where('gedcom_id', '=', $tree->id())
  5. ->whereNull('user_id')
  6. ->get()

    The next 33 lines appear both in app/Module/FamilyTreeFavoritesModule.php:141 and app/Module/UserFavoritesModule.php:142.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. ->map(static function (stdClass $row) use ($tree): stdClass {
  8. if ($row->xref !== null) {
  9. $row->record = GedcomRecord::getInstance($row->xref, $tree);
  10. } else {
  11. $row->record = null;
  1. {
  2. $statistics = app(Statistics::class);
  3. $show_last_update = $this->getBlockSetting($block_id, 'show_last_update', '1');
  4. $show_common_surnames = $this->getBlockSetting($block_id, 'show_common_surnames', '1');
  5. $number_of_surnames = (int) $this->getBlockSetting($block_id, 'number_of_surnames', self::DEFAULT_NUMBER_OF_SURNAMES);

    The next 17 lines appear both in app/Module/FamilyTreeStatisticsModule.php:79 and app/Module/FamilyTreeStatisticsModule.php:251.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. $stat_indi = $this->getBlockSetting($block_id, 'stat_indi', '1');
  7. $stat_fam = $this->getBlockSetting($block_id, 'stat_fam', '1');
  8. $stat_sour = $this->getBlockSetting($block_id, 'stat_sour', '1');
  9. $stat_media = $this->getBlockSetting($block_id, 'stat_media', '1');
  10. $stat_repo = $this->getBlockSetting($block_id, 'stat_repo', '1');
  1. 'stat_avg_chil' => $stat_avg_chil,
  2. 'stats' => $statistics,
  3. 'surnames' => $surnames,
  4. ]);
  5. if ($context !== self::CONTEXT_EMBED) {

    The next 58 lines appear both in app/Module/FamilyTreeStatisticsModule.php:160 and app/Module/YahrzeitModule.php:162.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  6. return view('modules/block-template', [
  7. 'block' => Str::kebab($this->name()),
  8. 'id' => $block_id,
  9. 'config_url' => $this->configUrl($tree, $context, $block_id),
  10. 'title' => $this->title(),
  1. $facts = $calendar_service->getEventsList($startjd, $endjd, $events_filter, $filter, $sortStyle, $tree);
  2. if (empty($facts)) {
  3. $content = view('modules/todays_events/empty');
  4. } elseif ($infoStyle === 'list') {

    The next 68 lines appear both in app/Module/OnThisDayModule.php:137 and app/Module/UpcomingAnniversariesModule.php:156.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. $content = view('lists/anniversaries-list', [
  6. 'facts' => $facts,
  7. ]);
  8. } else {
  9. $content = view('lists/anniversaries-table', [
  1. if ($num === 1) {
  2. // I18N: i.e. most popular given name.
  3. $title = I18N::translate('Top given name');
  4. } else {
  5. // I18N: Title for a list of the most common given names, %s is a number. Note that a separate translation exists when %s is 1
  6. $title = I18N::plural('Top %s given name', 'Top %s given names', $num, I18N::number($num));

    The next 79 lines appear both in app/Module/TopGivenNamesModule.php:102 and app/Module/TopSurnamesModule.php:140.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. }
  8. return view('modules/block-template', [
  9. 'block' => Str::kebab($this->name()),
  10. 'id' => $block_id,
  1. if ($lw >= $this->wrapWidthRemaining || $lfct > 1) {
  2. $newtext = '';
  3. $wrapWidthRemaining = $this->wrapWidthRemaining;
  4. $lines = explode("\n", $this->numText);
  5. // Go throught the text line by line
  6. foreach ($lines as $line) {

    The next 41 lines appear both in app/Report/ReportHtmlFootnote.php:131 and app/Report/ReportHtmlText.php:135.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. // Line width in points + a little margin
  8. $lw = $renderer->getStringWidth($line);
  9. // If the line has to be wraped
  10. if ($lw > $wrapWidthRemaining) {
  11. $words = explode(' ', $line);
  1. public function render($renderer)
  2. {
  3. // checkFootnote
  4. $newelements = [];
  5. $lastelement = [];
  6. $footnote_element = [];

    The next 27 lines appear both in app/Report/ReportHtmlTextbox.php:37 and app/Report/ReportPdfTextbox.php:36.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. // Element counter
  8. $cE = count($this->elements);
  9. //-- collapse duplicate elements
  10. for ($i = 0; $i < $cE; $i++) {
  11. $element = $this->elements[$i];
  1. $newelements[] = $lastelement;
  2. $lastelement = [];
  3. }
  4. // Save the Footnote with it’s link number as key for sorting later
  5. $footnote_element[$element->num] = $element;
  6. } elseif (!($element instanceof ReportBaseFootnote) || trim($element->getValue()) != '') {

    The next 41 lines appear both in app/Report/ReportHtmlTextbox.php:73 and app/Report/ReportPdfTextbox.php:72.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  7. // Do not keep empty footnotes
  8. if (!empty($footnote_element)) {
  9. ksort($footnote_element);
  10. foreach ($footnote_element as $links) {
  11. $newelements[] = $links;
  1. $height = (float) ($attrs['height'] ?? 0.0);
  2. $person = Individual::getInstance($id, $this->tree);
  3. $media_file = $person->findHighlightedMediaFile();
  4. if ($media_file !== null && $media_file->fileExists()) {

    The next 17 lines appear both in app/Report/ReportParserGenerate.php:1686 and app/Report/ReportParserGenerate.php:1739.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Greg Roach
  5. $attributes = getimagesize($media_file->getServerFilename()) ?: [
  6. 0,
  7. 0,
  8. ];
  9. if ($width > 0 && $height == 0) {
  1. * @param string|null $color_from
  2. * @param string|null $color_to
  3. *
  4. * @return string
  5. */
  6. public function chartBirth(string $color_from = null, string $color_to = null): string

    The next 27 lines appear in app/Statistics/Google/ChartBirth.php:95, app/Statistics/Google/ChartDeath.php:95, app/Statistics/Google/ChartDivorce.php:95 and app/Statistics/Google/ChartMarriage.php:95.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  7. {
  8. $chart_color1 = (string) $this->theme->parameter('distribution-chart-no-values');
  9. $chart_color2 = (string) $this->theme->parameter('distribution-chart-high-values');
  10. $color_from = $color_from ?? $chart_color1;
  11. $color_to = $color_to ?? $chart_color2;
  1. 'NAME' => $match['NAME'],
  2. 'SURN' => $match['SURN'],
  3. ]);
  4. }
  5. return [

    The next 41 lines appear both in app/SurnameTradition/LithuanianSurnameTradition.php:76 and app/SurnameTradition/PolishSurnameTradition.php:66.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Rico Sonntag
  6. 'NAME' => '//',
  7. ];
  8. }
  9. /**

Unused method, property, variable or parameter 3

More information: https://insight.symfony.com/what-we-analyse/php.unused_local_variable_or_private_member

in app/Fact.php, line 163
  1. /** @var Place The place of this fact, from the “2 PLAC …” attribute */
  2. private $place;
  3. /** @var int Used by Functions::sortFacts() */
  4. private $sortOrder;

    This sortOrder attribute is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Greg Roach
  5. /**
  6. * Create an event object from a gedcom fragment.
  7. * We need the parent object (to check privacy) and a (pseudo) fact ID to
  8. * identify the fact within the record.
in app/GedcomRecord.php, line 575
  1. * @param string $value
  2. * @param string $gedcom
  3. *
  4. * @return void
  5. */
  6. protected function addName(string $type, string $value, string $gedcom): void

    This gedcom argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Greg Roach
  7. {
  8. $this->getAllNames[] = [
  9. 'type' => $type,
  10. 'sort' => preg_replace_callback('/([0-9]+)/', static function (array $matches): string {
  11. return str_pad($matches[0], 10, '0', STR_PAD_LEFT);
  1. class AccountController extends AbstractBaseController
  2. {
  3. /**
  4. * @var ModuleService
  5. */
  6. private $module_service;

    This module_service attribute is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Greg Roach
  7. /**
  8. * @var UserService
  9. */
  10. private $user_service;

Web applications should contain a site.webmanifest file

More information: https://insight.symfony.com/what-we-analyse/web.missing_web_manifest

in public

The web root doesn't contain a site.webmanifest file. The web app manifest provides information about a web application in a JSON text file, necessary for be presented to the user similarly to a native app

Time to fix: about 1 hour
Open Issue Permalink
Collective
  • public
    • ckeditor-4.11.2-custom
    • css
    • js
    • webfonts
    • browserconfig.xml
    • favicon-120.png
    • favicon-128.png
    • favicon-144.png
    • favicon-152.png
    • favicon-167.png
    • favicon-180.png
    • favicon-192.png
    • favicon-196.png
    • favicon-32.png
    • favicon-57.png
    • favicon-76.png
    • favicon-96.png
    • favicon.ico