Skip to content

Commit 7a56b33

Browse files
committed
move ignore coverage on before and after exit
1 parent 3636585 commit 7a56b33

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

system/Common.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,7 @@ function esc($data, string $context = 'html', string $encoding = null)
387387
* @param RequestInterface $request
388388
* @param ResponseInterface $response
389389
*
390-
* Not testable, as it will exit!
391-
*
392-
* @throws \CodeIgniter\HTTP\Exceptions\HTTPException
393-
* @codeCoverageIgnore
390+
* @throws \CodeIgniter\HTTP\Exceptions\HTTPException
394391
*/
395392
function force_https(int $duration = 31536000, RequestInterface $request = null, ResponseInterface $response = null)
396393
{
@@ -407,7 +404,7 @@ function force_https(int $duration = 31536000, RequestInterface $request = null,
407404
{
408405
return;
409406
}
410-
// @codeCoverageIgnoreStart
407+
411408
// If the session library is loaded, we should regenerate
412409
// the session ID for safety sake.
413410
if (class_exists('Session', false))
@@ -435,9 +432,10 @@ function force_https(int $duration = 31536000, RequestInterface $request = null,
435432

436433
if (ENVIRONMENT !== 'testing')
437434
{
435+
// @codeCoverageIgnoreStart
438436
exit();
437+
// @codeCoverageIgnoreEnd
439438
}
440-
// @codeCoverageIgnoreEnd
441439
}
442440
}
443441

0 commit comments

Comments
 (0)