Avoid excessively long variable names like $additionByDifficultyNotation. Keep variable name length under 20. private function parseParts ( string $additionByDifficultyNotation ) : array
Avoid excessively long variable names like $formulaDifficultyAddition. Keep variable name length under 20. private $formulaDifficultyAddition ;
Avoid excessively long variable names like $spellTraitsDifficultyChangeSum. Keep variable name length under 20. $spellTraitsDifficultyChangeSum = 0 ;
Avoid excessively long variable names like $mutableSpellParameter. Keep variable name length under 20. foreach ( ModifierMutableSpellParameterCode:: getPossibleValues ( ) as $mutableSpellParameter ) {
Avoid excessively long variable names like $realmsChangePerAdditionStep. Keep variable name length under 20. private $realmsChangePerAdditionStep ;
Avoid excessively long variable names like $difficultyChangeValue. Keep variable name length under 20. public function createWithChange ( $difficultyChangeValue ) : FormulaDifficulty
Avoid excessively long variable names like $difficultyAdditionByRealmsNotation. Keep variable name length under 20. public function __construct ( $difficultyAdditionByRealmsNotation , int $currentAddition = null )
Avoid excessively long variable names like $additionByRealmNotation. Keep variable name length under 20. private function parseParts ( string $additionByRealmNotation ) : array
Avoid excessively long variable names like $spellTraitTrapPropertyValue. Keep variable name length under 20. int $spellTraitTrapPropertyValue = null
Avoid excessively long variable names like $byModifierRequiredRealm. Keep variable name length under 20. $byModifierRequiredRealm = $modifier -> getRequiredRealm ( ) ;
Avoid excessively long variable names like $baseNumberOfWaypoints. Keep variable name length under 20. $baseNumberOfWaypoints = $this -> getBaseNumberOfWaypoints ( ) ;
Avoid excessively long variable names like $modifiersDifficultyChangeSum. Keep variable name length under 20. $modifiersDifficultyChangeSum = 0 ;
Method getCurrentDifficulty
has 35 lines of code (exceeds 25 allowed). Consider refactoring. public function getCurrentDifficulty ( ) : FormulaDifficulty
{
$formulaParameters = [
$this -> getAttackWithAddition ( ) ,
$this -> getBrightnessWithAddition ( ) ,
Method sanitizeSpellParameterChanges
has 34 lines of code (exceeds 25 allowed). Consider refactoring. private function sanitizeSpellParameterChanges ( array $spellParameterValues ) : array
{
$sanitizedChanges = [ ] ;
foreach ( FormulaMutableSpellParameterCode:: getPossibleValues ( ) as $mutableSpellParameter ) {
if ( ! \ array_key_exists( $mutableSpellParameter , $spellParameterValues ) ) {
Method sanitizeSpellParameterChanges
has 34 lines of code (exceeds 25 allowed). Consider refactoring. private function sanitizeSpellParameterChanges ( array $spellParameterValues ) : array
{
$sanitizedChanges = [ ] ;
foreach ( ModifierMutableSpellParameterCode:: getPossibleValues ( ) as $mutableSpellParameter ) {
if ( ! array_key_exists ( $mutableSpellParameter , $spellParameterValues ) ) {
Method getDifficultyChange
has 32 lines of code (exceeds 25 allowed). Consider refactoring. public function getDifficultyChange ( ) : DifficultyChange
{
$modifierParameters = [
$this -> getAttackWithAddition ( ) ,
$this -> getNumberOfConditionsWithAddition ( ) ,
Method getParameterBonusFromModifiers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. private function getParameterBonusFromModifiers ( string $parameterName )
{
$bonusParts = [ ] ;
foreach ( $this -> modifiers as $modifier ) {
if ( $modifier -> getModifierCode ( ) -> getValue ( ) === ModifierCode:: GATE ) {
The class Modifier has 49 public methods and attributes. Consider reducing the number of public items to less than 45. class Modifier extends StrictObject
{
use ToFlatArrayTrait ;
Method __construct
has 28 lines of code (exceeds 25 allowed). Consider refactoring. public function __construct ( array $values )
{
try {
$this -> minimal = ToInteger:: toPositiveInteger ( $values [ 0 ] ?? null ) ;
} catch ( \ Granam\ Integer\ Tools\ Exceptions\ Exception $exception ) {
Method getExpectedDataHeaderNamesToTypes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. protected function getExpectedDataHeaderNamesToTypes ( ) : array
{
return [
self :: REALM => self :: POSITIVE_INTEGER ,
self :: REALMS_AFFECTION => self :: ARRAY ,