app/Http/RequestHandlers/SetupWizard.php
File SetupWizard.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* webtrees: online genealogy
* Copyright (C) 2023 webtrees development team
Method handle
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$this->layout = 'layouts/setup';
// Some functions need a cache, but we don't have one yet.
Method connectToDatabase
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function connectToDatabase(array $data): void
{
// Try to create the database, if it does not already exist.
switch ($data['dbtype']) {
case DB::SQLITE:
Avoid too many return
statements within this method. Open
Open
return $this->step5Administrator($data);
Avoid too many return
statements within this method. Open
Open
return $this->step6Install($data);