app/Services/ModuleService.php
File ModuleService.php
has 689 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* webtrees: online genealogy
* Copyright (C) 2023 webtrees development team
ModuleService
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ModuleService
{
// Components are pieces of user-facing functionality, are managed together in the control panel.
private const COMPONENTS = [
ModuleAnalyticsInterface::class,
Method all
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function all(bool $include_disabled = false): Collection
{
return Registry::cache()->array()->remember('all-modules', function (): Collection {
// Modules have a default status, order etc.
// We can override these from database settings.
Avoid too many return
statements within this method. Open
Open
return $modules;
Avoid too many return
statements within this method. Open
Open
return $modules->sort($this->moduleComparator());