fisharebest/webtrees

View on GitHub
app/Services/DataFixService.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method gedcomDiff has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function gedcomDiff(Tree $tree, string $old_gedcom, string $new_gedcom): string
    {
        $old_lines   = explode("\n", $old_gedcom);
        $new_lines   = explode("\n", $new_gedcom);
        $algorithm   = new MyersDiff();
Severity: Minor
Found in app/Services/DataFixService.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return Registry::submitterFactory()->make($xref, $tree);
    Severity: Major
    Found in app/Services/DataFixService.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return Registry::sourceFactory()->make($xref, $tree);
      Severity: Major
      Found in app/Services/DataFixService.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return Registry::gedcomRecordFactory()->make($xref, $tree);
        Severity: Major
        Found in app/Services/DataFixService.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return Registry::repositoryFactory()->make($xref, $tree);
          Severity: Major
          Found in app/Services/DataFixService.php - About 30 mins to fix

            There are no issues that match your filters.

            Category
            Status