Showing 96 of 758 total issues
Method handle
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($this->module === null) {
throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
}
Function upgrade
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
public function upgrade(): void
{
if (!DB::schema()->hasTable('maj_geodispersion')) {
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method buildLineages
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildLineages(): ?Collection
{
$indis = $this->patrolineage_module->individuals(
$this->tree,
$this->surname,
Method generationDepthStatsAtGeneration
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function generationDepthStatsAtGeneration(int $gen): Collection
{
if (!$this->isPdoSupported()) {
return collect();
}
Method individualColumns
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function individualColumns(iterable $records): array
{
$records = collect($records);
return [
'issourced' => [
Method sosaMissingColumns
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sosaMissingColumns(iterable $records): array
{
$records = collect($records);
return [
'issourced' => [
Method certificateFileResponse
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function certificateFileResponse(
Certificate $certificate,
bool $add_watermark = false,
Watermark $watermark = null
): ResponseInterface {
Method handle
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
if ($this->module === null) {
Method statisticsByGenerations
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function statisticsByGenerations(SosaStatisticsService $sosa_stats_service): array
{
$stats_by_gen = $sosa_stats_service->statisticsByGenerations();
$generation_stats = array();
Method updateGeneralSettings
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateGeneralSettings(TaskSchedule $task_schedule, ServerRequestInterface $request): bool
{
if ($this->module === null) {
return false;
}
Method handle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
if ($this->module === null) {
Method run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run(TaskSchedule $task_schedule, $force = false): void
{
/** @var TaskSchedule $task_schedule */
$task_schedule = DB::table('maj_admintasks')
->select()
Method handle
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($this->module === null) {
throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
}
Function all
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
public function all(bool $sync_available = false, bool $include_disabled = true): Collection
{
$tasks_schedules = DB::table('maj_admintasks')
->select()
->get()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
if ($this->module === null) {
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/ajax';
if ($this->module === null) {
Method convert
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function convert(GeoAnalysisResult $result): MapAdapterResult
{
$result = $result->copy();
$features = [];
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($this->module === null) {
FlashMessages::addMessage(
I18N::translate('The attached module could not be found.'),
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/ajax';
if ($this->module === null) {
Method upgrade
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function upgrade(): void
{
if (!DB::schema()->hasTable('maj_geodispersion')) {
return;
}