Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
Total | |
100.00% |
6 / 6 |
|
100.00% |
6 / 6 |
|
100.00% |
5 / 5 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
1 / 1 |
Struct | |
100.00% |
6 / 6 |
|
100.00% |
6 / 6 |
|
100.00% |
5 / 5 |
|
100.00% |
4 / 4 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
__destruct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
__toString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
name | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Fdsn\Webservices\Contributor; |
3 | |
4 | /** |
5 | * Data structure to handle Contributor |
6 | * |
7 | * @param string $name Name of catalog |
8 | */ |
9 | class Struct { |
10 | private string $name; |
11 | |
12 | function __construct(string $name){ |
13 | |
14 | if( empty($name) ) |
15 | throw new \InvalidArgumentException("Contributor name invalid"); |
16 | |
17 | $this->name = $name; |
18 | } |
19 | |
20 | function __destruct(){ } |
21 | |
22 | function __toString(){ return sprintf("%s", $this->name); } |
23 | |
24 | /** |
25 | * Get Contributor name |
26 | * @return string Contributor name |
27 | */ |
28 | public function name():string { return $this->name;} |
29 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if
statement
always has an else
as part of its logical flow even if you didn't write one.
12 | function __construct(string $name){ |
13 | |
14 | if( empty($name) ) |
15 | throw new \InvalidArgumentException("Contributor name invalid"); |
17 | $this->name = $name; |
18 | } |
20 | function __destruct(){ } |
22 | function __toString(){ return sprintf("%s", $this->name); } |
28 | public function name():string { return $this->name;} |