Passed
Push — main ( 6040c1...3e8a32 )
by Jenny
04:53
created

BookRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace App\Repository;
4
5
use App\Entity\Book;
6
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
7
use Doctrine\Persistence\ManagerRegistry;
8
9
/**
10
 * @extends ServiceEntityRepository<Book>
11
 */
12
class BookRepository extends ServiceEntityRepository
13
{
14 7
    public function __construct(ManagerRegistry $registry)
15
    {
16 7
        parent::__construct($registry, Book::class);
17
    }
18
19
    //    /**
20
    //     * @return Book[] Returns an array of Book objects
21
    //     */
22
    //    public function findByExampleField($value): array
23
    //    {
24
    //        return $this->createQueryBuilder('b')
25
    //            ->andWhere('b.exampleField = :val')
26
    //            ->setParameter('val', $value)
27
    //            ->orderBy('b.id', 'ASC')
28
    //            ->setMaxResults(10)
29
    //            ->getQuery()
30
    //            ->getResult()
31
    //        ;
32
    //    }
33
34
    //    public function findOneBySomeField($value): ?Book
35
    //    {
36
    //        return $this->createQueryBuilder('b')
37
    //            ->andWhere('b.exampleField = :val')
38
    //            ->setParameter('val', $value)
39
    //            ->getQuery()
40
    //            ->getOneOrNullResult()
41
    //        ;
42
    //    }
43
}
44