Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 8890d31

Browse files
committed
Fixing code coverage
1 parent ac6e6a2 commit 8890d31

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Config/ConfigTimer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ public function setConfig($file)
3636
case 'general_holidays':
3737
$this->handleGeneralHolidays($timers, $timerKey);
3838
break;
39-
default:
40-
$this->set($timerKey, $timers);
41-
break;
4239
}
4340
}
4441
}

Tests/Config/ConfigEnvTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function testFactoryProd()
4444

4545
/**
4646
* @covers \Asm\Config\ConfigEnv::mergeEnvironments
47+
* @covers \Asm\Config\ConfigEnv::__construct
4748
* @return \Asm\Config\ConfigInterface
4849
*/
4950
public function testFactoryEnv()

Tests/Timer/TimerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public function testConstruct()
5151
* @covers \Asm\Timer\Timer::checkDays
5252
* @covers \Asm\Timer\Timer::checkTime
5353
* @covers \Asm\Timer\Timer::checkHoliday
54+
* @covers \Asm\Timer\Timer::convertDate
5455
* @covers \Asm\Timer\Timer::flush
5556
* @param Timer $timer
5657
*/

Timer/Timer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function isHoliday($date = null)
9898
/**
9999
* Returns holiday object, if set.
100100
*
101-
* @codeCoverageIgnore
102101
* @return \DateTime|null
103102
*/
104103
public function getHoliday()
@@ -176,6 +175,7 @@ private function checkHoliday($date = null)
176175
// create interval object for difference to add/subtract
177176
$intervalDiff = new \DateInterval('P' . $this->currentConf['holiday']['additional'][1] . 'D');
178177
switch ($this->currentConf['holiday']['additional'][0]) {
178+
// @codeCoverageIgnoreStart
179179
case 'add':
180180
// if days are added, date will be enddate
181181
$holidayEnd->{$this->currentConf['holiday']['additional'][0]}($intervalDiff);
@@ -184,6 +184,7 @@ private function checkHoliday($date = null)
184184
// if days are subtracted, date will be startdate
185185
$holidayStart->{$this->currentConf['holiday']['additional'][0]}($intervalDiff);
186186
break;
187+
// @codeCoverageIgnoreEnd
187188
}
188189
}
189190

0 commit comments

Comments
 (0)