Showing 213 of 2,684 total issues
File RacesTableTest.php
has 1028 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types = 1);
namespace DrdPlus\Tests\Tables\Races;
use DrdPlus\Codes\GenderCode;
File Tables.php
has 937 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\Tables;
use DrdPlus\Codes\Armaments\ArmamentCode;
File FormulaTest.php
has 802 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\Tests\Tables\Theurgist\Spells;
use DrdPlus\Codes\Theurgist\AffectionPeriodCode;
Tables
has 96 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Tables extends StrictObject implements \IteratorAggregate
{
private static ?Tables $tablesInstance = null;
public static function getIt(): Tables
File DemonTest.php
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\Tests\Tables\Theurgist\Demons;
use DrdPlus\Codes\Theurgist\AffectionPeriodCode;
Demon
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Demon extends StrictObject
{
use SanitizeMutableParameterChangesTrait;
private \DrdPlus\Codes\Theurgist\DemonCode $demonCode;
FormulaTest
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class FormulaTest extends TestWithMockery
{
private static ?string $parameterNamespace = null;
/**
RacesTableTest
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class RacesTableTest extends TableTest
{
/**
* @test
Modifier
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Modifier extends StrictObject
{
use ToFlatArrayTrait;
use SanitizeMutableParameterChangesTrait;
File Formula.php
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types = 1);
namespace DrdPlus\Tables\Theurgist\Spells;
use DrdPlus\Codes\Units\DistanceUnitCode;
Formula
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Formula extends StrictObject
{
use ToFlatArrayTrait;
use SanitizeMutableParameterChangesTrait;
RacesTable
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class RacesTable extends AbstractFileTable
{
private \DrdPlus\Tables\Races\FemaleModifiersTable $femaleModifiersTable;
public function __construct(FemaleModifiersTable $femaleModifiersTable)
File Demon.php
has 416 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\Tables\Theurgist\Demons;
use DrdPlus\Codes\Theurgist\DemonBodyCode;
File ModifiersTableTest.php
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types = 1);
namespace DrdPlus\Tests\Tables\Theurgist\Spells;
use DrdPlus\Codes\Theurgist\FormCode;
Method I_can_get_expected_values
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function I_can_get_expected_values(): void
{
$racesTable = new RacesTable(Tables::getIt()->getFemaleModifiersTable());
self::assertEquals(
[
DemonTest
has 41 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DemonTest extends TestWithMockery
{
private static ?string $demonParameterNamespace = null;
private static ?string $spellParameterNamespace = null;
Method I_can_get_all_values
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function I_can_get_all_values()
{
self::assertSame(
[
0 => [
File ModifierTest.php
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types = 1);
namespace DrdPlus\Tests\Tables\Theurgist\Spells;
use DrdPlus\Tables\Tables;
File Modifier.php
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types = 1);
namespace DrdPlus\Tables\Theurgist\Spells;
use DrdPlus\Codes\Theurgist\ModifierCode;
Function I_can_get_parent_modifiers
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
public function I_can_get_parent_modifiers()
{
$modifiersTable = new ModifiersTable(Tables::getIt());
$fromParentMatchingProfiles = [];
foreach (ModifierCode::getPossibleValues() as $modifierValue) {
- 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"