Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| NickRepository | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getById | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getByProperties | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Repository; |
| 4 | |
| 5 | use App\Entity\Nick; |
| 6 | use App\Entity\Qualifier; |
| 7 | use App\Entity\Subject; |
| 8 | use App\Enum\WordGender; |
| 9 | use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
| 10 | use Doctrine\Persistence\ManagerRegistry; |
| 11 | |
| 12 | /** |
| 13 | * @extends ServiceEntityRepository<Nick> |
| 14 | * |
| 15 | * @author Wilhelm Zwertvaegher |
| 16 | */ |
| 17 | class NickRepository extends ServiceEntityRepository implements NickRepositoryInterface |
| 18 | { |
| 19 | public function __construct(ManagerRegistry $registry) |
| 20 | { |
| 21 | parent::__construct($registry, Nick::class); |
| 22 | } |
| 23 | |
| 24 | public function getById(int $id): ?Nick |
| 25 | { |
| 26 | return parent::find($id); |
| 27 | } |
| 28 | |
| 29 | public function getByProperties(Subject $subject, Qualifier $qualifier, WordGender $targetGender): ?Nick |
| 30 | { |
| 31 | return parent::findOneBy(['subject' => $subject, 'qualifier' => $qualifier, 'targetGender' => $targetGender]); |
| 32 | } |
| 33 | } |
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.
| 19 | public function __construct(ManagerRegistry $registry) |
| 20 | { |
| 21 | parent::__construct($registry, Nick::class); |
| 22 | } |
| 24 | public function getById(int $id): ?Nick |
| 25 | { |
| 26 | return parent::find($id); |
| 27 | } |
| 29 | public function getByProperties(Subject $subject, Qualifier $qualifier, WordGender $targetGender): ?Nick |
| 30 | { |
| 31 | return parent::findOneBy(['subject' => $subject, 'qualifier' => $qualifier, 'targetGender' => $targetGender]); |
| 32 | } |
| 3 | namespace App\Repository; |
| 4 | |
| 5 | use App\Entity\Nick; |
| 6 | use App\Entity\Qualifier; |
| 7 | use App\Entity\Subject; |
| 8 | use App\Enum\WordGender; |
| 9 | use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
| 10 | use Doctrine\Persistence\ManagerRegistry; |
| 11 | |
| 12 | /** |
| 13 | * @extends ServiceEntityRepository<Nick> |
| 14 | * |
| 15 | * @author Wilhelm Zwertvaegher |
| 16 | */ |
| 17 | class NickRepository extends ServiceEntityRepository implements NickRepositoryInterface |
| 18 | { |
| 19 | public function __construct(ManagerRegistry $registry) |
| 20 | { |
| 21 | parent::__construct($registry, Nick::class); |
| 22 | } |
| 23 | |
| 24 | public function getById(int $id): ?Nick |
| 25 | { |
| 26 | return parent::find($id); |
| 27 | } |
| 28 | |
| 29 | public function getByProperties(Subject $subject, Qualifier $qualifier, WordGender $targetGender): ?Nick |
| 30 | { |
| 31 | return parent::findOneBy(['subject' => $subject, 'qualifier' => $qualifier, 'targetGender' => $targetGender]); |
| 32 | } |