Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
DepthRange
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
2
 min
100.00% covered (success)
100.00%
1 / 1
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
 max
100.00% covered (success)
100.00%
1 / 1
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
1<?php
2namespace Fdsn\Webservices\Event\Structs;
3
4/**
5 * Data structure to handle depth range.
6 * If min > max, args are swapped
7 *
8 * @param Depth $min    Min depth
9 * @param Depth $max    Max depth
10 *
11 */
12
13class DepthRange {
14    private Depth $min;
15    private Depth $max;
16
17    function __construct( Depth $min, Depth $max) {
18        if( $min->value() <= $max->value() ){
19            $this->min = $min;
20            $this->max = $max;
21        }
22        else{
23            $this->min = $max;
24            $this->max = $min;
25        }
26    }
27
28    /**
29     * Get min depth
30     *
31     * @return Depth  Get min-Depth obj 
32     */
33    public function min():Depth { return $this->min; }
34
35    /**
36     * Get max depth
37     *
38     * @return Depth  Get max-Depth obj 
39     */
40    public function max():Depth { return $this->max; }
41} 

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.

DepthRange->__construct
17    function __construct( Depth $min, Depth $max) {
18        if( $min->value() <= $max->value() ){
 
18        if( $min->value() <= $max->value() ){
19            $this->min = $min;
 
26    }
17    function __construct( Depth $min, Depth $max) {
18        if( $min->value() <= $max->value() ){
 
23            $this->min = $max;
24            $this->max = $min;
25        }
26    }
 
26    }
DepthRange->max
40    public function max():Depth { return $this->max; }
DepthRange->min
33    public function min():Depth { return $this->min; }