cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:28:52 +01:00
parent 3631fd99fd
commit c8195e6df5
65 changed files with 155 additions and 139 deletions

View File

@@ -379,7 +379,7 @@ class EventController extends AbstractController
*/
protected function createAddEventParticipationByPersonForm(Person $person)
{
/* @var $builder \Symfony\Component\Form\FormBuilderInterface */
/** @var \Symfony\Component\Form\FormBuilderInterface $builder */
$builder = $this
->get('form.factory')
->createNamedBuilder(
@@ -426,7 +426,7 @@ class EventController extends AbstractController
*/
protected function createAddParticipationByPersonForm(Event $event)
{
/* @var $builder \Symfony\Component\Form\FormBuilderInterface */
/** @var \Symfony\Component\Form\FormBuilderInterface $builder */
$builder = $this
->get('form.factory')
->createNamedBuilder(

View File

@@ -298,7 +298,7 @@ class ParticipationController extends AbstractController
*/
public function editAction(int $participation_id): Response
{
/* @var $participation Participation */
/** @var Participation $participation */
$participation = $this->getDoctrine()->getManager()
->getRepository(Participation::class)
->find($participation_id);
@@ -419,7 +419,7 @@ class ParticipationController extends AbstractController
public function updateAction(int $participation_id, Request $request): Response
{
/* @var $participation Participation */
/** @var Participation $participation */
$participation = $this->getDoctrine()->getManager()
->getRepository(Participation::class)
->find($participation_id);
@@ -460,7 +460,7 @@ class ParticipationController extends AbstractController
public function updateMultipleAction($event_id, Request $request)
{
/* @var $event \Chill\EventBundle\Entity\Event */
/** @var \Chill\EventBundle\Entity\Event $event */
$event = $this->getDoctrine()->getRepository('ChillEventBundle:Event')
->find($event_id);
@@ -642,7 +642,7 @@ class ParticipationController extends AbstractController
);
// create a collection of person's id participating to the event
/* @var $peopleParticipating \Doctrine\Common\Collections\ArrayCollection */
/** @var \Doctrine\Common\Collections\ArrayCollection $peopleParticipating */
$peopleParticipating = $peopleParticipating ??
$participation->getEvent()->getParticipations()->map(
function (Participation $p) { return $p->getPerson()->getId(); }

View File

@@ -70,7 +70,7 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
->findBy(['center' => $center]);
$events = $this->createEvents($center, $manager);
/* @var $person \Chill\PersonBundle\Entity\Person */
/** @var \Chill\PersonBundle\Entity\Person $person */
foreach ($people as $person) {
$nb = rand(0, 3);

View File

@@ -40,7 +40,7 @@ class ChillEventExtension extends Extension implements PrependExtensionInterface
$loader->load('services/timeline.yaml');
}
/* (non-PHPdoc)
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
public function prepend(ContainerBuilder $container)

View File

@@ -17,11 +17,8 @@ use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
use function call_user_func;
use function in_array;
/*
* Class EventChoiceLoader
*
* @package Chill\EventBundle\Form\ChoiceLoader
* @author Mathieu Jaumotte jaum_mathieu@collectifs.net
/**
* Class EventChoiceLoader.
*/
class EventChoiceLoader implements ChoiceLoaderInterface
{

View File

@@ -37,7 +37,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
/* @var $person \Chill\PersonBundle\Entity\Person */
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'] ?? null;
if ($this->authorizationChecker->isGranted(EventVoter::SEE, $person)) {

View File

@@ -134,7 +134,7 @@ class ParticipationControllerTest extends WebTestCase
public function testEditMultipleAction()
{
/* @var $event \Chill\EventBundle\Entity\Event */
/** @var \Chill\EventBundle\Entity\Event $event */
$event = $this->getRandomEventWithMultipleParticipations();
$crawler = $this->client->request('GET', '/fr/event/participation/' . $event->getId() .

View File

@@ -68,7 +68,7 @@ class EventSearchTest extends WebTestCase
public function setUp()
{
self::bootKernel();
/* @var $kernel \Symfony\Component\HttpKernel\KernelInterface */
/** @var \Symfony\Component\HttpKernel\KernelInterface $kernel */
$kernel = self::$kernel;
$this->client = static::createClient([], [
@@ -147,7 +147,7 @@ class EventSearchTest extends WebTestCase
'q' => '@events date-from:2016-05-30 date-to:2016-06-20',
]);
/* @var $dateFrom \DateTime the date from in DateTime */
/** @var DateTime $dateFrom the date from in DateTime */
$dateFrom = DateTime::createFromFormat('Y-m-d', '2016-05-30');
$dateTo = DateTime::createFromFormat('Y-m-d', '2016-06-20');
@@ -193,7 +193,7 @@ class EventSearchTest extends WebTestCase
$crawler = $this->client->request('GET', '/fr/search', [
'q' => '@events date-from:2016-05-30',
]);
/* @var $dateFrom \DateTime the date from in DateTime */
/** @var DateTime $dateFrom the date from in DateTime */
$dateFrom = DateTime::createFromFormat('Y-m-d', '2016-05-30');
$dates = $this->iterateOnRowsToFindDate($crawler->filter('tr'));
@@ -229,7 +229,7 @@ class EventSearchTest extends WebTestCase
'q' => '@events date:2016-05-30',
]);
/* @var $dateFrom \DateTime the date from in DateTime */
/** @var DateTime $dateFrom the date from in DateTime */
$dateTo = DateTime::createFromFormat('Y-m-d', '2016-05-30');
$dates = $this->iterateOnRowsToFindDate($crawler->filter('tr'));
@@ -333,7 +333,7 @@ class EventSearchTest extends WebTestCase
$circles = $this->entityManager->getRepository('ChillMainBundle:Scope')
->findAll();
/* @var $circle \Chill\MainBundle\Entity\Scope */
/** @var \Chill\MainBundle\Entity\Scope $circle */
foreach ($circles as $circle) {
if (in_array($name, $circle->getName())) {
return $circle;