Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
DomainException
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
2.50
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getErrorCode
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Exception;
4
5/**
6 * @author Wilhelm Zwertvaegher
7 */
8class DomainException extends \Exception
9{
10    private ErrorCode $errorCode;
11
12    public function __construct(ErrorCode $errorCode, string $message, int $code = 0, ?\Exception $previous = null)
13    {
14        parent::__construct($message, $code, $previous);
15        $this->errorCode = $errorCode;
16    }
17
18    public function getErrorCode(): ErrorCode
19    {
20        return $this->errorCode;
21    }
22}

Paths

Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once. Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.

DomainException->__construct
12    public function __construct(ErrorCode $errorCode, string $message, int $code = 0, ?\Exception $previous = null)
13    {
14        parent::__construct($message, $code, $previous);
15        $this->errorCode = $errorCode;
16    }
DomainException->getErrorCode
20        return $this->errorCode;
21    }
{main}
3namespace App\Exception;
4
5/**
6 * @author Wilhelm Zwertvaegher
7 */
8class DomainException extends \Exception
9{
10    private ErrorCode $errorCode;
11
12    public function __construct(ErrorCode $errorCode, string $message, int $code = 0, ?\Exception $previous = null)
13    {
14        parent::__construct($message, $code, $previous);
15        $this->errorCode = $errorCode;
16    }
17
18    public function getErrorCode(): ErrorCode
19    {
20        return $this->errorCode;
21    }