Showing 1,726 of 2,403 total issues
Method alphabet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function alphabet(): array
{
return [
'A',
'B',
Method postAdminEditAction
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function postAdminEditAction(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$block_id = Validator::queryParams($request)->integer('block_id', 0);
$xref = Validator::parsedBody($request)->string('xref');
Method leafletJsTileLayers
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function leafletJsTileLayers(): array
{
return [
(object) [
'attribution' => 'Map data ©<a href="https://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0">CC-BY-SA</a>',
Method delete
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete(Tree $tree): void
{
// If this is the default tree, then unset it
if (Site::getPreference('DEFAULT_GEDCOM') === $tree->name()) {
Site::setPreference('DEFAULT_GEDCOM', '');
Method handle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->treeOptional();
$email = Validator::parsedBody($request)->string('email');
$user = $this->user_service->findByEmail($email);
Method handle
has 29 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');
$individual = Registry::individualFactory()->make($xref, $tree);
Method handle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$name = Validator::parsedBody($request)->isNotEmpty()->string('name');
$address = Validator::parsedBody($request)->string('address');
Method gedcomDiff
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
Method handle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->treeOptional();
$user = Validator::attributes($request)->user();
Method handle
has 29 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');
$record = Registry::gedcomRecordFactory()->make($xref, $tree);
Method handle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/administration';
$custom_family_tags = explode(',', Site::getPreference('CUSTOM_FAMILY_TAGS'));
Method columns
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function columns(): array
{
return [
new CensusColumnNull($this, 'Lfd.Nr.', 'Laufende Nummer'),
new CensusColumnGivenNames($this, 'Vorname', 'Vorname'),
Method columns
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function columns(): array
{
return [
new CensusColumnNull($this, 'Č. b.', 'Radové číslo bytu'),
new CensusColumnNull($this, 'Č. os.', 'Radové číslo osôb v dome'),
Method setup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setup(): void
{
parent::setup();
$this->tcpdf = new TcpdfWrapper(
Method ageBetweenSiblingsQuery
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function ageBetweenSiblingsQuery(int $total): array
{
return DB::table('link AS link1')
->join('link AS link2', static function (JoinClause $join): void {
$join
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(string $report)
{
$this->xml_parser = xml_parser_create();
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, 0);
Method statsMarrAgeQuery
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function statsMarrAgeQuery(string $sex, int $year1 = -1, int $year2 = -1): array
{
$query = DB::table('dates AS married')
->join('families', static function (JoinClause $join): void {
$join
Function autocomplete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
webtrees.autocomplete = function (selector) {
// Use typeahead/bloodhound for autocomplete
$(selector).each(function () {
const that = this;
$(this).typeahead(null, {
Function init
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init (locale) {
if (this.loading || this.initialized) {
return;
}
Method editBlockConfiguration
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editBlockConfiguration(Tree $tree, int $block_id): string
{
$default_events = implode(',', self::DEFAULT_EVENTS);
$filter = $this->getBlockSetting($block_id, 'filter', '1');