Completed
Push — SF4 ( f28f6b...15ccd7 )
by Laurent
04:33
created

ArticleRepository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Repository\Settings;
4
5
use App\Entity\Settings\Article;
6
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
7
use Symfony\Bridge\Doctrine\RegistryInterface;
8
9
/**
10
 * @method Article|null find($id, $lockMode = null, $lockVersion = null)
11
 * @method Article|null findOneBy(array $criteria, array $orderBy = null)
12
 * @method Article[]    findAll()
13
 * @method Article[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
14
 */
15
class ArticleRepository extends ServiceEntityRepository
16
{
17
    public function __construct(RegistryInterface $registry)
18
    {
19
        parent::__construct($registry, Article::class);
20
    }
21
22
//    /**
23
//     * @return Article[] Returns an array of Article objects
24
//     */
25
    /*
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
26
    public function findByExampleField($value)
27
    {
28
        return $this->createQueryBuilder('a')
29
            ->andWhere('a.exampleField = :val')
30
            ->setParameter('val', $value)
31
            ->orderBy('a.id', 'ASC')
32
            ->setMaxResults(10)
33
            ->getQuery()
34
            ->getResult()
35
        ;
36
    }
37
    */
38
39
    /*
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
40
    public function findOneBySomeField($value): ?Article
41
    {
42
        return $this->createQueryBuilder('a')
43
            ->andWhere('a.exampleField = :val')
44
            ->setParameter('val', $value)
45
            ->getQuery()
46
            ->getOneOrNullResult()
47
        ;
48
    }
49
    */
50
}
51