Coverage verbessert.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user