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

BookRepository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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