Passed
Push — develop ( 4ec848...b3005b )
by BENARD
04:32
created

PlayerController::autocomplete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6
use Symfony\Component\HttpFoundation\Request;
7
use VideoGamesRecords\CoreBundle\Entity\Player;
8
use VideoGamesRecords\CoreBundle\Repository\PlayerRepository;
9
10
/**
11
 * Class PlayerController
12
 */
13
class PlayerController extends AbstractController
14
{
15
    /**
16
     * @param Player    $player
17
     * @return mixed
18
     */
19
    public function playerChartStatus(Player $player): mixed
20
    {
21
        return $this->getDoctrine()->getRepository('VideoGamesRecords\CoreBundle\Entity\PlayerChartStatus')
0 ignored issues
show
Deprecated Code introduced by
The function Symfony\Bundle\Framework...ntroller::getDoctrine() has been deprecated: since Symfony 5.4, inject an instance of ManagerRegistry in your controller instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

21
        return /** @scrutinizer ignore-deprecated */ $this->getDoctrine()->getRepository('VideoGamesRecords\CoreBundle\Entity\PlayerChartStatus')

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
22
            ->getStatsFromPlayer($player);
23
    }
24
}
25