<?php array_reduce(array $array, callable $callback, mixed $initial = null): mixed
<?php return 0; } return round(array_reduce($this->getIncomeClassification(), function ($carry, IncomeClassification $classification) { return $carry + $classification->getAmount(); }, 0), 2); }
<?php return 0; } return round(array_reduce($this->getExpensesClassification(), function ($carry, ExpensesClassification $classification) { return $carry + $classification->getAmount(); }, 0), 2); }
<?php return 0; } return array_reduce($this->getIncomeClassifications(), fn($c, IncomeClassification $ic) => $c + $ic->getAmount(), 0); }
<?php return 0; } return array_reduce($this->getExpensesClassifications(), fn($c, ExpensesClassification $ec) => $c + $ec->getAmount(), 0); } public function set($key, $value): static
<?php public function getTotalPaymentAmount(): float { return round(array_reduce($this->all(), fn($c, PaymentMethodDetail $pm) => $c + $pm->getAmount(), 0), 2); } }
<?php $this->assertIsArray($rows); $this->assertCount(2, $rows); $this->assertCount(1, $notVat195Rows); $this->assertEquals(50, array_reduce($notVat195Rows, fn($carry, $row) => $carry + $row->getNetValue(), 0)); for ($i = 0; $i < count($rows); $i++) { $this->assertEquals($i + 1, $rows[$i]->getLineNumber());