Showing 1,726 of 2,403 total issues
Method handle
has 43 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 42 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 getPlaceListLocation
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPlaceListLocation(int|null $parent_id): Collection
{
$prefix = DB::prefix();
$expression =
Method sanitize
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sanitize(string $html): string
{
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.DefinitionImpl', null);
Method process
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// Fatal errors. We may be out of memory, so do not create any variables.
register_shutdown_function(static function (): void {
if (error_get_last() !== null && error_get_last()['type'] & E_ERROR) {
Method logsQuery
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function logsQuery(ServerRequestInterface $request): Builder
{
$tree = Validator::queryParams($request)->string('tree');
$from = Validator::queryParams($request)->string('from');
$to = Validator::queryParams($request)->string('to');
Method handle
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/administration';
$location_id = Validator::attributes($request)->integer('location_id');
Method webtreesTags
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function webtreesTags(): array
{
return [
'FAM:CHAN:_WT_USER' => new WebtreesUser(I18N::translate('Author of last change')),
'FAM:*:_ASSO' => new XrefAssociate(I18N::translate('Associate')),
Method lineStartHandler
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function lineStartHandler(array $attrs): void
{
// Start horizontal position, current position (default)
$x1 = ReportBaseElement::CURRENT_POSITION;
if (isset($attrs['x1'])) {
Consider simplifying this complex logical expression. Open
Open
if (($rel1 === 'HUSB' || $rel1 === 'WIFE') && ($rel2 === 'HUSB' || $rel2 === 'WIFE')) {
$relationships[$i] = $spouse_codes[$next->sex()] ?? $spouse_codes['U'];
} elseif (($rel1 === 'HUSB' || $rel1 === 'WIFE') && $rel2 === 'CHIL') {
$relationships[$i] = $child_codes[$next->sex()] ?? $child_codes['U'];
} elseif ($rel1 === 'CHIL' && ($rel2 === 'HUSB' || $rel2 === 'WIFE')) {
Method handle
has 41 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');
$user = Validator::attributes($request)->user();
Method handle
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$user = Validator::attributes($request)->user();
$active = Validator::parsedBody($request)->string('SMTP_ACTIVE');
$disp_name = Validator::parsedBody($request)->string('SMTP_DISP_NAME');
Method columns
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function columns(): array
{
return [
new CensusColumnFullName($this, 'Name', 'Name of head of family'),
new CensusColumnNull($this, 'M0', 'Free white males 0-5 years'),
Method compare
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function compare(Date $a, Date $b): int
{
// Get min/max JD for each date.
switch ($a->qual1) {
case 'BEF':
Method getBlock
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBlock(Tree $tree, int $block_id, string $context, array $config = []): string
{
$show_other = $this->getBlockSetting($block_id, 'show_other', self::DEFAULT_SHOW_OTHER);
$show_unassigned = $this->getBlockSetting($block_id, 'show_unassigned', self::DEFAULT_SHOW_UNASSIGNED);
$show_future = $this->getBlockSetting($block_id, 'show_future', self::DEFAULT_SHOW_FUTURE);
Method saveBlockConfiguration
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void
{
$show_last_update = Validator::parsedBody($request)->boolean('show_last_update', false);
$show_common_surnames = Validator::parsedBody($request)->boolean('show_common_surnames', false);
$number_of_surnames = Validator::parsedBody($request)->integer('number_of_surnames');
Method editBlockConfiguration
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function editBlockConfiguration(Tree $tree, int $block_id): string
{
$show_last_update = $this->getBlockSetting($block_id, 'show_last_update', '1');
$show_common_surnames = $this->getBlockSetting($block_id, 'show_common_surnames', '1');
$number_of_surnames = $this->getBlockSetting($block_id, 'number_of_surnames', self::DEFAULT_NUMBER_OF_SURNAMES);
Method duplicateXrefs
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function duplicateXrefs(Tree $tree): array
{
$subquery1 = DB::table('individuals')
->where('i_file', '=', $tree->id())
->select(['i_id AS xref', new Expression("'INDI' AS type")])
Method handle
has 40 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 insertMissingLevels
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function insertMissingLevels(Tree $tree, string $tag, string $gedcom, bool $include_hidden): string
{
$next_level = substr_count($tag, ':') + 1;
$factory = Registry::elementFactory();
$subtags = $factory->make($tag)->subtags();