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

@@ -67,7 +67,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
]);
}
/* (non-PHPdoc)
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
public function prependRoutes(ContainerBuilder $container)

View File

@@ -45,14 +45,14 @@ use Symfony\Component\Serializer\Annotation\SerializedName;
* @ActivityValidator\ActivityValidity
*/
/*
* TODO : revoir
/**
* TODO : revoir.
*
* @UserCircleConsistency(
* "CHILL_ACTIVITY_SEE_DETAILS",
* getUserFunction="getUser",
* path="scope")
* "CHILL_ACTIVITY_SEE_DETAILS",
* getUserFunction="getUser",
* path="scope")
*/
class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
{
public const SENTRECEIVED_RECEIVED = 'received';

View File

@@ -89,7 +89,7 @@ class ActivityDateFilter implements FilterInterface
);
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
/* @var $filterForm \Symfony\Component\Form\FormInterface */
/** @var \Symfony\Component\Form\FormInterface $filterForm */
$filterForm = $event->getForm()->getParent();
$enabled = $filterForm->get(FilterType::ENABLED_FIELD)->getData();

View File

@@ -134,7 +134,7 @@ class PersonHavingActivityBetweenDateFilter implements FilterInterface, ExportEl
]);
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
/* @var FormInterface $filterForm */
/** @var FormInterface $filterForm */
$filterForm = $event->getForm()->getParent();
$enabled = $filterForm->get(FilterType::ENABLED_FIELD)->getData();

View File

@@ -374,7 +374,7 @@ class ActivityType extends AbstractType
// set the timezone to GMT, and fix the difference between current and GMT
// the datetimetransformer will then handle timezone as GMT
$timezoneUTC = new DateTimeZone('GMT');
/* @var $data \DateTime */
/** @var DateTime $data */
$data = $formEvent->getData() === null ?
DateTime::createFromFormat('U', 300) :
$formEvent->getData();

View File

@@ -37,7 +37,7 @@ class TranslatableActivityType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
/* @var QueryBuilder $qb */
/** @var QueryBuilder $qb */
$qb = $options['query_builder'];
if (true === $options['active_only']) {

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'];
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {

View File

@@ -26,7 +26,7 @@ class CountActivityTest extends AbstractExportTest
{
static::bootKernel();
/* @var $container \Symfony\Component\DependencyInjection\ContainerInterface */
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();
$this->export = $container->get('chill.activity.export.count_activity');

View File

@@ -26,7 +26,7 @@ class ListActivityTest extends AbstractExportTest
{
static::bootKernel();
/* @var $container \Symfony\Component\DependencyInjection\ContainerInterface */
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();
$this->export = $container->get('chill.activity.export.list_activity');

View File

@@ -28,7 +28,7 @@ class StatActivityDurationSumTest extends AbstractExportTest
{
static::bootKernel();
/* @var $container \Symfony\Component\DependencyInjection\ContainerInterface */
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $container */
$container = self::$kernel->getContainer();
$this->export = $container->get('chill.activity.export.sum_activity_duration');

View File

@@ -119,7 +119,7 @@ class ActivityTypeTest extends KernelTestCase
$this->assertInstanceOf(Activity::class, $form->getData()['activity']);
// test the activity
/* @var $activity Activity */
/** @var Activity $activity */
$activity = $form->getData()['activity'];
$this->assertEquals(
@@ -170,7 +170,7 @@ class ActivityTypeTest extends KernelTestCase
$this->assertTrue($form->isValid());
// test the activity
/* @var $activity Activity */
/** @var Activity $activity */
$activity = $form->getData()['activity'];
$this->assertEquals(