Showing 1,726 of 2,403 total issues
Function mapData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function mapData(Place $place): array
{
$children = $place->getChildPlaces();
$features = [];
$sidebar = '';
- 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 individualBoxMenuFamilyLinks
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function individualBoxMenuFamilyLinks(Individual $individual): array
{
$menus = [];
foreach ($individual->spouseFamilies() as $family) {
- 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 isXref
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function isXref(): self
{
$this->rules[] = static function ($value) {
if (is_string($value) && preg_match('/^' . Gedcom::REGEX_XREF . '$/', $value) === 1) {
return $value;
- 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 layoutIndividuals
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function layoutIndividuals(array $individuals): array
{
$color_generators = [
'M' => new ColorGenerator(240, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE * -1),
'F' => new ColorGenerator(000, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE),
- 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 metaDescription
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function metaDescription(Individual $individual): string
{
$meta_facts = [];
$birth_date = $individual->getBirthDate();
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = Validator::attributes($request)->tree();
$keep_media = Validator::parsedBody($request)->boolean('keep_media', false);
$word_wrapped_notes = Validator::parsedBody($request)->boolean('WORD_WRAPPED_NOTES', false);
- 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 createHeader
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function createHeader(Tree $tree, string $encoding, bool $include_sub): string
{
// Force a ".ged" suffix
$filename = $tree->name();
- 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 calendarMonthsInYear
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function calendarMonthsInYear(string $calendar, int $year): array
{
$date = new Date($calendar . ' ' . $year);
$calendar_date = $date->minimumDate();
$month_numbers = range(1, $calendar_date->monthsInYear());
- 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 labelValue
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function labelValue(string $value, Tree $tree): string
{
$id = Registry::idFactory()->id();
$expanded = $tree->getPreference('EXPAND_NOTES') === '1';
- 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 boundingRectangle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function boundingRectangle(): array
{
if ($this->id() === null) {
return [[-180.0, -90.0], [180.0, 90.0]];
}
- 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 getEventCount
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function getEventCount(array $events): int
{
$query = DB::table('dates')
->where('d_file', '=', $this->tree->id());
- 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 inputStartHandler
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function inputStartHandler(array $attrs): void
{
$this->text = '';
$this->input = [
'name' => $attrs['name'] ?? '',
- 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 lastChangeTimestamp
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function lastChangeTimestamp(): TimestampInterface
{
$chan = $this->facts(['CHAN'])->first();
if ($chan instanceof Fact) {
- 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 myPlot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
string $chart_title,
array $x_axis,
string $x_axis_title,
array $ydata,
string $y_axis_title,
Method lineError
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Tree $tree,
string $type,
string $xref,
int $line_number,
string $line,
Method createImageFromObject
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
MediaFile $media_file,
float $x,
float $y,
float $w,
float $h,
Method createImageFromObject
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
MediaFile $media_file,
float $x,
float $y,
float $w,
float $h,
Method createImage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createImage(string $file, float $x, float $y, float $w, float $h, string $align, string $ln): ReportBaseImage
Method createImage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createImage(string $file, float $x, float $y, float $w, float $h, string $align, string $ln): ReportBaseImage
Method createImage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function createImage(string $file, float $x, float $y, float $w, float $h, string $align, string $ln): ReportBaseImage;