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

@@ -74,10 +74,11 @@ class Extensions extends \Twig_Extension
$seconds = $duration;
if ($duration instanceof Timesheet) {
$seconds = $duration->getDuration();
if ($duration->getEnd() === null) {
if (null === $duration->getEnd()) {
$seconds = time() - $duration->getBegin()->getTimestamp();
}
}
return $this->durationFormatter->format($seconds, $includeSeconds) . ' h';
}
@@ -107,9 +108,10 @@ class Extensions extends \Twig_Extension
public function money($amount, $currency = null)
{
$result = number_format(round($amount, 2), 2);
if ($currency !== null) {
if (null !== $currency) {
$result .= ' ' . Intl::getCurrencyBundle()->getCurrencySymbol($currency);
}
return $result;
}