Skip to content

Commit

Permalink
Filter for arithmetic operations laminas#28
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsl committed Dec 2, 2021
1 parent 19180c7 commit bc32f4c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function filter($value)
throw new InvalidArgumentException(sprintf('%s expects argument value; received none', __METHOD__));
}

$value = (float) $value;
$operand = (float) $this->options['operand'];
$value = $value;
$operand = $this->options['operand'];
return ($value + $operand);
}
}
4 changes: 2 additions & 2 deletions src/Div.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function filter($value)
throw new InvalidArgumentException(sprintf('%s expects argument value; received none', __METHOD__));
}

$value = (float) $value;
$operand = (float) $this->options['operand'];
$value = $value;
$operand = $this->options['operand'];
return ($value / $operand);
}
}
4 changes: 2 additions & 2 deletions src/Mul.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function filter($value)
throw new InvalidArgumentException(sprintf('%s expects argument value; received none', __METHOD__));
}

$value = (float) $value;
$operand = (float) $this->options['operand'];
$value = $value;
$operand = $this->options['operand'];
return ($value * $operand);
}
}
4 changes: 2 additions & 2 deletions src/Sub.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function filter($value)
throw new InvalidArgumentException(sprintf('%s expects argument value; received none', __METHOD__));
}

$value = (float) $value;
$operand = (float) $this->options['operand'];
$value = $value;
$operand = $this->options['operand'];
return ($value - $operand);
}
}

0 comments on commit bc32f4c

Please sign in to comment.