improved code styles #158 (#172)

* use php-cs-fixer instead of phpcodesniffer
* updated scrutinizer config
* adjusted code yules to all files
* updated CONTRIBUTING guidelines
This commit is contained in:
Kevin Papst
2018-06-22 21:09:10 +02:00
committed by GitHub
parent 773d27bb0e
commit cd7cbeae88
142 changed files with 775 additions and 467 deletions

View File

@@ -20,7 +20,6 @@ use App\Model\InvoiceModel;
*/
class DefaultCalculator implements CalculatorInterface
{
/**
* @var string
*/
@@ -56,6 +55,7 @@ class DefaultCalculator implements CalculatorInterface
foreach ($this->model->getEntries() as $entry) {
$amount += $entry->getRate();
}
return round($amount, 2);
}
@@ -73,11 +73,12 @@ class DefaultCalculator implements CalculatorInterface
public function getTax(): float
{
$vat = $this->getVat();
if ($vat == 0) {
if (0 == $vat) {
return 0;
}
$percent = $vat / 100.00;
return round($this->getSubtotal() * $percent, 2);
}