Showing 1,726 of 2,403 total issues
Method chartNoChildrenFamilies
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function chartNoChildrenFamilies(
int $no_child_fam,
int $year1 = -1,
int $year2 = -1
): string {
Method render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($renderer): void
{
// Set up the style
if ($renderer->getCurrentStyle() !== $this->styleName) {
$renderer->setCurrentStyle($this->styleName);
Method alphabet
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function alphabet(): array
{
return [
'A',
UTF8::LATIN_CAPITAL_LETTER_A_WITH_ACUTE,
Method changesQuery
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function changesQuery(array $params): Builder
{
$tree = $params['tree'];
$from = $params['from'] ?? '';
$to = $params['to'] ?? '';
Method handle
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$user = Validator::attributes($request)->user();
$report = Validator::attributes($request)->string('report');
Method handle
has 44 lines of code (exceeds 25 allowed). Consider refactoring. 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 getPersonNameStartHandler
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getPersonNameStartHandler(array $attrs): void
{
$id = '';
$match = [];
if (empty($attrs['id'])) {
Function previousLink
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function previousLink(Individual $individual, string $style, int $generations): string
{
$icon = view('icons/arrow-' . self::MIRROR_STYLE[$style]);
$siblings = [];
- 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
Function handle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$user = Validator::attributes($request)->user();
$xrefs = Validator::queryParams($request)->string('xrefs', '');
- 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
Function handle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$data_filesystem = Registry::filesystem()->data();
$files = Validator::queryParams($request)->isInArray(['local', 'external', 'unused'])->string('files');
- 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
Function __construct
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(array|int|AbstractCalendarDate $date)
{
// Construct from an integer (a julian day number)
if (is_int($date)) {
$this->minimum_julian_day = $date;
- 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
Function handle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$data_filesystem = Registry::filesystem()->data();
$gedcom_files = $this->admin_service->gedcomFiles($data_filesystem);
- 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
Function handle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$xref1 = Validator::parsedBody($request)->isXref()->string('xref1');
$xref2 = Validator::parsedBody($request)->isXref()->string('xref2');
- 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 createCell
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createCell(float $width, float $height, string $border, string $align, string $bgcolor, string $style, int $ln, float $top, float $left, bool $fill, int $stretch, string $bocolor, string $tcolor, bool $reseth): ReportBaseCell
Method createCell
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createCell(float $width, float $height, string $border, string $align, string $bgcolor, string $style, int $ln, float $top, float $left, bool $fill, int $stretch, string $bocolor, string $tcolor, bool $reseth): ReportBaseCell
Method __construct
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
float $width,
float $height,
string $border,
string $align,
string $bgcolor,
Function textScript
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function textScript(string $string): string
{
$string = strip_tags($string); // otherwise HTML tags show up as latin
$string = html_entity_decode($string, ENT_QUOTES, 'UTF-8'); // otherwise HTML entities show up as latin
$string = str_replace([
- 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 createCell
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
float $width,
float $height,
string $border,
string $align,
string $bgcolor,
Function expandBox
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
TreeViewHandler.prototype.expandBox = function (box, event) {
var t = $(event.target);
if (t.hasClass('tv_link')) {
return false;
}
Method handle
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$user = Validator::attributes($request)->user();
$xref = Validator::attributes($request)->isXref()->string('xref');