mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
cs: Enable more risky rules.
This commit is contained in:
@@ -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(
|
||||
|
@@ -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(); }
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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)) {
|
||||
|
@@ -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() .
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user