Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
8 / 8
90.91% covered (success)
90.91%
10 / 11
50.00% covered (danger)
50.00%
5 / 10
80.00% covered (warning)
80.00%
4 / 5
CRAP
0.00% covered (danger)
0.00%
0 / 1
ComposedNick
100.00% covered (success)
100.00%
8 / 8
90.91% covered (success)
90.91%
10 / 11
50.00% covered (danger)
50.00%
5 / 10
100.00% covered (success)
100.00%
5 / 5
10.50
100.00% covered (success)
100.00%
1 / 1
 __construct
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
 getTargetGender
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
 getTargetOffenseLevel
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
 getWords
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
 getFinalLabel
100.00% covered (success)
100.00%
4 / 4
85.71% covered (warning)
85.71%
6 / 7
16.67% covered (danger)
16.67%
1 / 6
100.00% covered (success)
100.00%
1 / 1
4.31
1<?php
2
3namespace App\Dto\Result;
4
5use App\Enum\OffenseLevel;
6use App\Enum\WordGender;
7
8/**
9 * @author Wilhelm Zwertvaegher
10 */
11readonly class ComposedNick
12{
13    /**
14     * @param list<FormattedNickWord> $words
15     */
16    public function __construct(
17        private WordGender $targetGender,
18        private OffenseLevel $targetOffenseLevel,
19        private array $words,
20    ) {
21    }
22
23    public function getTargetGender(): WordGender
24    {
25        return $this->targetGender;
26    }
27
28    public function getTargetOffenseLevel(): OffenseLevel
29    {
30        return $this->targetOffenseLevel;
31    }
32
33    /**
34     * @return list<FormattedNickWord>
35     */
36    public function getWords(): array
37    {
38        return $this->words;
39    }
40
41    public function getFinalLabel(): string
42    {
43        $finalLabel = '';
44        foreach ($this->words as $resultWord) {
45            $finalLabel .= $resultWord->label.$resultWord->separatorAfter;
46        }
47
48        return trim($finalLabel);
49    }
50}

Branches

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.

ComposedNick->__construct
16    public function __construct(
17        private WordGender $targetGender,
18        private OffenseLevel $targetOffenseLevel,
19        private array $words,
20    ) {
21    }
ComposedNick->getFinalLabel
43        $finalLabel = '';
44        foreach ($this->words as $resultWord) {
44        foreach ($this->words as $resultWord) {
44        foreach ($this->words as $resultWord) {
45            $finalLabel .= $resultWord->label.$resultWord->separatorAfter;
44        foreach ($this->words as $resultWord) {
45            $finalLabel .= $resultWord->label.$resultWord->separatorAfter;
46        }
47
48        return trim($finalLabel);
48        return trim($finalLabel);
48        return trim($finalLabel);
48        return trim($finalLabel);
49    }
ComposedNick->getTargetGender
25        return $this->targetGender;
26    }
ComposedNick->getTargetOffenseLevel
30        return $this->targetOffenseLevel;
31    }
ComposedNick->getWords
38        return $this->words;
39    }
{main}
3namespace App\Dto\Result;
4
5use App\Enum\OffenseLevel;
6use App\Enum\WordGender;
7
8/**
9 * @author Wilhelm Zwertvaegher
10 */
11readonly class ComposedNick
12{
13    /**
14     * @param list<FormattedNickWord> $words
15     */
16    public function __construct(
17        private WordGender $targetGender,
18        private OffenseLevel $targetOffenseLevel,
19        private array $words,
20    ) {
21    }
22
23    public function getTargetGender(): WordGender
24    {
25        return $this->targetGender;
26    }
27
28    public function getTargetOffenseLevel(): OffenseLevel
29    {
30        return $this->targetOffenseLevel;
31    }
32
33    /**
34     * @return list<FormattedNickWord>
35     */
36    public function getWords(): array
37    {
38        return $this->words;
39    }
40
41    public function getFinalLabel(): string
42    {
43        $finalLabel = '';
44        foreach ($this->words as $resultWord) {
45            $finalLabel .= $resultWord->label.$resultWord->separatorAfter;
46        }
47
48        return trim($finalLabel);
49    }