api-erstellen #1

Merged
TorstenHettstedt merged 52 commits from api-erstellen into master 2021-04-07 13:00:46 +02:00
2 changed files with 5 additions and 7 deletions
Showing only changes of commit 5cdc11d9df - Show all commits
+4
View File
@@ -17,3 +17,7 @@ modules:
dump: tests/_data/dump.sql
cleanup: true # reload dump between tests
populate: true # load dump before all tests
coverage:
enabled: true
include:
- src/*
@@ -101,13 +101,7 @@ abstract class AbstractWorkingHoursViewRepository implements RepositoryReaderInt
$minutes = (int)$time_array[1];
$seconds = (int)$time_array[2];
$interval = new DateInterval(sprintf('PT%dH%dM%dS', abs($hours), abs($minutes), abs($seconds)));
if ($hours < 0) {
$interval->invert = 1;
}
if ($minutes < 0) {
$interval->invert = 1;
}
if ($seconds < 0) {
if (($hours < 0 || ($minutes < 0) || ($seconds < 0))) {
$interval->invert = 1;
}
return $interval;