Showing 1,726 of 2,403 total issues
Method doLogin
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function doLogin(string $username, #[\SensitiveParameter] string $password): void
{
if ($_COOKIE === []) {
Log::addAuthenticationLog('Login failed (no session cookies): ' . $username);
throw new Exception(I18N::translate('You cannot sign in because your browser does not accept cookies.'));
Method handle
has 27 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 27 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 spouseFacts
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function spouseFacts(Individual $individual, Individual $spouse, Date $min_date, Date $max_date): Collection
{
$SHOW_RELATIVES_EVENTS = $individual->tree()->getPreference('SHOW_RELATIVES_EVENTS');
$death_of_a_spouse = [
Method handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$recipients = $this->message_service->recipientTypes();
$user = Validator::attributes($request)->user();
Method handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/administration';
$tree = Validator::attributes($request)->tree();
Method values
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function values(string $sex = 'U'): array
{
$values = [
'M' => [
'' => '',
Method values
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function values(): array
{
$values = [
'' => '',
'ADOP' => Registry::elementFactory()->make('INDI:ADOP')->label(),
Method canShowRecord
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function canShowRecord(int $access_level): bool
{
// This setting would better be called "$ENABLE_PRIVACY"
if (!$this->tree->getPreference('HIDE_LIVE_PEOPLE')) {
return true;
Method canShow
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function canShow(int|null $access_level = null): bool
{
$access_level ??= Auth::accessLevel($this->record->tree());
// Does this record have an explicit restriction notice?
Function compact
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
TreeViewHandler.prototype.compact = function () {
var tv = this;
var b = $('#tvbCompact', tv.toolbox);
tv.setLoading();
if (tv.auto_box_width) {
Function reformatLatLong
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reformatLatLong (field, pos, neg) {
// valid LATI or LONG according to Gedcom standard
// pos (+) : N or E
// neg (-) : S or W
let txt = field.value.toUpperCase();
Method historicEventsAll
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function historicEventsAll(): Collection
{
switch (I18N::languageTag()) {
case 'en-AU':
case 'en-GB':
Method leafletJsTileLayers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function leafletJsTileLayers(): array
{
return [
(object) [
'attribution' => 'Tiles ©Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012',
Method tags
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tags(): array
{
return [
'FAM:CHAN:_PGVU' => new WebtreesUser(I18N::translate('Author of last change')),
'FAM:COMM' => new CustomElement(I18N::translate('Comment')),
Method tags
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tags(): array
{
return [
'FAM:*:SOUR:_TMPLT' => new EmptyElement(I18N::translate('Template')),
'FAM:*:SOUR:_TMPLT:FIELD' => /* I18N: Data entry field */ new EmptyElement(I18N::translate('Field')),
Method associateFacts
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function associateFacts(Individual $individual): Collection
{
$facts = [];
$asso1 = $this->linked_record_service->linkedIndividuals($individual, 'ASSO');
Method handle
has 26 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 databaseDriverErrors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function databaseDriverErrors(string $driver): Collection
{
switch ($driver) {
case DB::MYSQL:
return Collection::make([
Method handle
has 26 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');
$fact_id = Validator::attributes($request)->string('fact_id');