classes/Gems/Condition/Track/AgeCondition.php
Method getModelFields
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getModelFields($context, $new)
{
$compareOptions = [
'NOW' => $this->_('Now (actual current time)'),
'TS' => $this->_('At track start data'),
Avoid unused local variables such as '$maxAge'. Open
Open
$maxAge = $this->_data['gcon_condition_text4'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$fieldData'. Open
Open
public function isTrackValid(\Gems_Tracker_RespondentTrack $respTrack, array $fieldData = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$minAge'. Open
Open
$minAge = $this->_data['gcon_condition_text2'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}