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