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 |
| WordRepository | |
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 | |||
| findBySlug | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| findById | |
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\Word; |
| 6 | use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
| 7 | use Doctrine\Persistence\ManagerRegistry; |
| 8 | |
| 9 | /** |
| 10 | * @author Wilhelm Zwertvaegher |
| 11 | * |
| 12 | * @extends ServiceEntityRepository<Word> |
| 13 | */ |
| 14 | class WordRepository extends ServiceEntityRepository implements WordRepositoryInterface |
| 15 | { |
| 16 | public function __construct(ManagerRegistry $registry) |
| 17 | { |
| 18 | parent::__construct($registry, Word::class); |
| 19 | } |
| 20 | |
| 21 | public function findBySlug(string $slug): ?Word |
| 22 | { |
| 23 | return parent::findOneBy(['slug' => $slug]); |
| 24 | } |
| 25 | |
| 26 | public function findById(int $id): ?Word |
| 27 | { |
| 28 | return parent::find($id); |
| 29 | } |
| 30 | } |
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 | public function __construct(ManagerRegistry $registry) |
| 17 | { |
| 18 | parent::__construct($registry, Word::class); |
| 19 | } |
| 26 | public function findById(int $id): ?Word |
| 27 | { |
| 28 | return parent::find($id); |
| 29 | } |
| 21 | public function findBySlug(string $slug): ?Word |
| 22 | { |
| 23 | return parent::findOneBy(['slug' => $slug]); |
| 24 | } |
| 3 | namespace App\Repository; |
| 4 | |
| 5 | use App\Entity\Word; |
| 6 | use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
| 7 | use Doctrine\Persistence\ManagerRegistry; |
| 8 | |
| 9 | /** |
| 10 | * @author Wilhelm Zwertvaegher |
| 11 | * |
| 12 | * @extends ServiceEntityRepository<Word> |
| 13 | */ |
| 14 | class WordRepository extends ServiceEntityRepository implements WordRepositoryInterface |
| 15 | { |
| 16 | public function __construct(ManagerRegistry $registry) |
| 17 | { |
| 18 | parent::__construct($registry, Word::class); |
| 19 | } |
| 20 | |
| 21 | public function findBySlug(string $slug): ?Word |
| 22 | { |
| 23 | return parent::findOneBy(['slug' => $slug]); |
| 24 | } |
| 25 | |
| 26 | public function findById(int $id): ?Word |
| 27 | { |
| 28 | return parent::find($id); |
| 29 | } |