Showing 1,726 of 2,403 total issues
Function drawPieChart
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drawPieChart (elementId, data, options) {
// Default chart options
const defaults = {
title: '',
height: '100%',
Function calendarWidget
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
webtrees.calendarWidget = function (dateDivId, dateFieldId) {
let dateDiv = document.getElementById(dateDivId);
let dateField = document.getElementById(dateFieldId);
if (dateDiv.style.visibility === 'visible') {
Method summary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function summary(): string
{
$attributes = [];
$target = $this->target();
if ($target instanceof GedcomRecord) {
Method individuals
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function individuals(Tree $tree, array $surns_to_show, string $galpha, bool $marnm, bool $fams): Collection
{
$query = DB::table('individuals')
->join('name', static function (JoinClause $join): void {
$join
Method getAdminAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAdminAction(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/administration';
// This module can't run without a tree
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$user = Validator::attributes($request)->user();
$xref = Validator::attributes($request)->isXref()->string('xref');
Method getAdminEditAction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAdminEditAction(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/administration';
$tree = Validator::attributes($request)->tree();
Method make
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function make(string $name): EncodingInterface
{
switch ($name) {
case UTF8::NAME:
return new UTF8();
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$xref = Validator::attributes($request)->isXref()->string('xref');
$sex = Validator::attributes($request)->string('sex');
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$xref = Validator::attributes($request)->isXref()->string('xref');
$slug = Validator::attributes($request)->string('slug', '');
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$data_filesystem = Registry::filesystem()->data();
$gedcom_files = $this->admin_service->gedcomFiles($data_filesystem);
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$xref = Validator::attributes($request)->isXref()->string('xref');
$slug = Validator::attributes($request)->string('slug', '');
Method pendingChanges
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function pendingChanges(Tree $tree, int $n): array
{
$xrefs = $this->pendingXrefs($tree);
$rows = DB::table('change')
Method columns
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function columns(): array
{
return [
new CensusColumnSexMF($this, 'Sex', 'Sex'),
new CensusColumnNull($this, 'Num', 'Number of people in the family'),
Method chartSex
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function chartSex(
int $tot_m,
int $tot_f,
int $tot_u,
string|null $color_female = null,
Method columns
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function columns(): array
{
return [
new CensusColumnFullName($this, 'Name', 'Name'),
new CensusColumnRelationToHeadEnglish($this, 'Relation', 'Relationship of each person to the head of the family'),
Method commonSurnamesQuery
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function commonSurnamesQuery(
string $type,
bool $show_tot,
int $threshold,
int $number_of_surnames,
Method allAncestors
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function allAncestors(string $xref1, string $xref2, int $tree_id): array
{
$ancestors = [
$xref1,
$xref2,
Method process
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
if ($this->upgrade_service->isUpgradeAvailable()) {
$latest_version = $this->upgrade_service->latestVersion();
$latest_version_email = Site::getPreference('LATEST_WT_VERSION_EMAIL');
Method alphabet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function alphabet(): array
{
return [
'A',
'B',