Fixes Deprication
This commit is contained in:
parent
df237473cb
commit
f7e6247427
File diff suppressed because one or more lines are too long
@ -50,16 +50,16 @@ class CalcValues
|
||||
|
||||
public function calc(): float
|
||||
{
|
||||
return $this->calcRec(0, $this->article->getOptions());
|
||||
return $this->calcRec($this->article->getOptions(), 0);
|
||||
}
|
||||
|
||||
private function calcRec($price = 0, $options): float
|
||||
private function calcRec($options, $price = 0): float
|
||||
{
|
||||
foreach ($options as $option) {
|
||||
|
||||
if ($option instanceof Row) {
|
||||
foreach($option->getColumns() as $col) {
|
||||
$price = $this->calcRec($price, $col->getOptions());
|
||||
$price = $this->calcRec($col->getOptions(), $price);
|
||||
}
|
||||
}
|
||||
if ($option instanceof Select || $option instanceof Checkbox) {
|
||||
|
||||
@ -37,15 +37,15 @@ class Valid
|
||||
|
||||
public function perform($withFormel = true): void
|
||||
{
|
||||
$this->validRec($withFormel, $this->article->getOptions());
|
||||
$this->validRec($this->article->getOptions(), $withFormel);
|
||||
}
|
||||
|
||||
private function validRec($withFormel = true, \ArrayIterator $options): void
|
||||
private function validRec(\ArrayIterator $options, $withFormel = true): void
|
||||
{
|
||||
foreach($options as $option) {
|
||||
if($option instanceof Row) {
|
||||
foreach($option->getColumns() as $col) {
|
||||
$this->validRec($withFormel, $col->getOptions());
|
||||
$this->validRec($col->getOptions(), $withFormel);
|
||||
}
|
||||
}
|
||||
if($option instanceof Input) {
|
||||
|
||||
@ -8,6 +8,7 @@ class Opt
|
||||
{
|
||||
|
||||
protected $element;
|
||||
protected \SimpleXMLElement $node;
|
||||
|
||||
public function __construct(\SimpleXMLElement $node)
|
||||
{
|
||||
@ -28,4 +29,4 @@ class Opt
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user