Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
20.00% |
2 / 10 |
|
33.33% |
4 / 12 |
|
20.00% |
2 / 10 |
|
11.11% |
1 / 9 |
CRAP | |
0.00% |
0 / 1 |
| SondeOutput | |
20.00% |
2 / 10 |
|
33.33% |
4 / 12 |
|
20.00% |
2 / 10 |
|
22.22% |
2 / 9 |
61.20 | |
0.00% |
0 / 1 |
| top | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| bottom | |
100.00% |
1 / 1 |
|
75.00% |
3 / 4 |
|
50.00% |
1 / 2 |
|
100.00% |
1 / 1 |
2.50 | |||
| erreur | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| ko | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| output | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| title | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| line | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| ok | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| filter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Service\ApplicationInfo\Output; |
| 4 | |
| 5 | class SondeOutput implements InterfaceOutput |
| 6 | { |
| 7 | protected bool $ok; |
| 8 | |
| 9 | public function top(): void |
| 10 | { |
| 11 | $this->ok = true; |
| 12 | } |
| 13 | |
| 14 | public function bottom(): void |
| 15 | { |
| 16 | printf('%s', $this->ok ? 'OK' : 'KO'); |
| 17 | } |
| 18 | |
| 19 | public function erreur(string $str): void |
| 20 | { |
| 21 | $this->ok = false; |
| 22 | } |
| 23 | |
| 24 | public function ko(string $str): string |
| 25 | { |
| 26 | $this->ok = false; |
| 27 | |
| 28 | return $str; |
| 29 | } |
| 30 | |
| 31 | public function output(string $str): void |
| 32 | { |
| 33 | // on n'affiche pas les infos |
| 34 | } |
| 35 | |
| 36 | public function title(string $str): void |
| 37 | { |
| 38 | // on n'affiche pas les titres |
| 39 | } |
| 40 | |
| 41 | public function line(string $str): void |
| 42 | { |
| 43 | // on n'affiche de ligne |
| 44 | } |
| 45 | |
| 46 | public function ok(string $str): string |
| 47 | { |
| 48 | return $str; |
| 49 | } |
| 50 | |
| 51 | public function filter(string $str): string |
| 52 | { |
| 53 | return $str; |
| 54 | } |
| 55 | } |
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.
| 16 | printf('%s', $this->ok ? 'OK' : 'KO'); |
| 16 | printf('%s', $this->ok ? 'OK' : 'KO'); |
| 16 | printf('%s', $this->ok ? 'OK' : 'KO'); |
| 16 | printf('%s', $this->ok ? 'OK' : 'KO'); |
| 17 | } |
| 19 | public function erreur(string $str): void |
| 20 | { |
| 21 | $this->ok = false; |
| 22 | } |
| 51 | public function filter(string $str): string |
| 52 | { |
| 53 | return $str; |
| 54 | } |
| 24 | public function ko(string $str): string |
| 25 | { |
| 26 | $this->ok = false; |
| 27 | |
| 28 | return $str; |
| 29 | } |
| 41 | public function line(string $str): void |
| 42 | { |
| 43 | // on n'affiche de ligne |
| 44 | } |
| 46 | public function ok(string $str): string |
| 47 | { |
| 48 | return $str; |
| 49 | } |
| 31 | public function output(string $str): void |
| 32 | { |
| 33 | // on n'affiche pas les infos |
| 34 | } |
| 36 | public function title(string $str): void |
| 37 | { |
| 38 | // on n'affiche pas les titres |
| 39 | } |
| 11 | $this->ok = true; |
| 12 | } |