jon48/webtrees-lib

View on GitHub

Showing 758 of 758 total issues

Avoid too many return statements within this method.
Open

            return I18N::translate('%s not sourced', $context_label);
Severity: Major
Found in app/Module/IsSourced/Data/FactSourceStatus.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return $indi;
    Severity: Major
    Found in app/Module/PatronymicLineage/Model/LineageBuilder.php - About 30 mins to fix

      The method recordNamePrepend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function recordNamePrepend(GedcomRecord $record, bool $use_long = false, string $size = ''): string;

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method all has a boolean flag argument $include_disabled, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function all(bool $include_disabled = false): Collection

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method recordNamePrepend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function recordNamePrepend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method __construct has a boolean flag argument $strict_depth, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function __construct(Tree $tree, ?Place $place, int $depth, bool $strict_depth = false)

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method include has a boolean flag argument $include, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function include(bool $include = true): self

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      Avoid too many return statements within this method.
      Open

              return str_replace(
                  array_map(fn($tag) => '{' . $tag . '}', $columns_select[1]),
                  array_map(fn($tag) => $mapping[$this->columnName($tag)] ?? '', $columns_select[1]),
                  $target_format
              );
      Severity: Major
      Found in app/Module/GeoDispersion/Services/PlacesReferenceTableService.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return null;
        Severity: Major
        Found in app/Module/GeoDispersion/PlaceMappers/CoordinatesPlaceMapper.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return $this->viewResponse($this->module->name() . '::list-missing-page', [
                      'module_name'       =>  $this->module->name(),
                      'title'             =>  I18N::translate('Missing Ancestors'),
                      'tree'              =>  $tree,
                      'root_indi'         =>  $sosa_stats_service->rootIndividual(),
          Severity: Major
          Found in app/Module/Sosa/Http/RequestHandlers/MissingAncestorsList.php - About 30 mins to fix

            The method recordNameAppend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNameAppend(GedcomRecord $record, bool $use_long = false, string $size = ''): string;

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method recordNamePrepend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNamePrepend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method all has a boolean flag argument $include_disabled, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function all(bool $sync_available = false, bool $include_disabled = true): Collection

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method recordNameAppend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNameAppend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method __construct has a boolean flag argument $use_flags, which is a certain sign of a Single Responsibility Principle violation.
            Open

                    bool $use_flags = false

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method all has a boolean flag argument $include_disabled, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function all(Tree $tree, bool $include_disabled = false): Collection

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method recordNameAppend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNameAppend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method recordNamePrepend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNamePrepend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method recordNameAppend has a boolean flag argument $use_long, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function recordNameAppend(GedcomRecord $record, bool $use_long = false, string $size = ''): string

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            The method flushTmpSosaTable has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation.
            Open

                private function flushTmpSosaTable($force = false): void

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

            Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

            Severity
            Category
            Status
            Source
            Language