Showing 22 of 22 total issues
PropertiesByLevels
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class PropertiesByLevels extends StrictObject implements BaseProperties
{
/** @var FirstLevelProperties */
private $firstLevelProperties;
FirstLevelProperties
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class FirstLevelProperties extends StrictObject
{
const INITIAL_PROPERTY_INCREASE_LIMIT = 3;
/** @var PropertiesByFate */
Method I_can_create_properties_for_any_combination
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function I_can_create_properties_for_any_combination(
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
Method I_can_get_every_property_both_limited_and_unlimited
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function I_can_get_every_property_both_limited_and_unlimited(
int $strength,
int $agility,
int $knack,
int $will,
Method __construct
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
File PropertiesByLevelsTest.php
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\Tests\PropertiesByLevels;
use DrdPlus\Codes\GenderCode;
Method createProfessionLevels
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createProfessionLevels()
{
$professionLevels = \Mockery::mock(ProfessionLevels::class);
$professionLevels->shouldReceive('getFirstLevelPropertyModifier')
->with(PropertyCode::STRENGTH)
File FirstLevelProperties.php
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace DrdPlus\PropertiesByLevels;
use DrdPlus\Codes\GenderCode;
Method I_can_create_properties_for_any_combination
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
Tables $tables,
Method createPropertiesByFate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createPropertiesByFate()
{
$propertiesByFate = \Mockery::mock(PropertiesByFate::class);
$propertiesByFate->shouldReceive('getProperty')
->with(PropertyCode::getIt(PropertyCode::STRENGTH))
Method createPropertiesByFate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createPropertiesByFate(
int $strength,
int $agility,
int $knack,
int $will,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
BodyWeightInKg $weightInKgAdjustment,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
BodyWeightInKg $weightInKgAdjustment,
Method createPropertiesByFate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int $strength,
int $agility,
int $knack,
int $will,
int $intelligence,
Method calculateFirstLevelBaseProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PropertyCode $propertyCode,
Race $race,
GenderCode $genderCode,
Tables $tables,
PropertiesByFate $propertiesByFate,
Method createProfessionLevels
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function createProfessionLevels($strength, $agility, $knack, $will, $intelligence, $charisma)
Method I_can_get_every_property_both_limited_and_unlimited
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int $strength,
int $agility,
int $knack,
int $will,
int $intelligence,
Method setUpBaseProperties
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Race $race,
GenderCode $genderCode,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels,
Tables $tables
Method createFirstLevelSize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Race $race,
GenderCode $genderCode,
Tables $tables,
PropertiesByFate $propertiesByFate,
ProfessionLevels $professionLevels
Avoid too many return
statements within this method. Open
Open
return $propertiesByFate;