mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
cs: Enable more risky rules.
This commit is contained in:
parent
733bee06a8
commit
28d2c42454
@ -25,20 +25,20 @@ $riskyRules = [
|
||||
'strict_param' => false,
|
||||
'declare_strict_types' => false,
|
||||
'ternary_to_elvis_operator' => false,
|
||||
'no_unreachable_default_argument_value' => false,
|
||||
'php_unit_test_case_static_method_calls' => false,
|
||||
'strict_comparison' => false,
|
||||
'ereg_to_preg' => false,
|
||||
'php_unit_mock_short_will_return' => false,
|
||||
'php_unit_set_up_tear_down_visibility' => false,
|
||||
'ordered_interfaces' => false,
|
||||
'php_unit_construct' => false,
|
||||
'php_unit_dedicate_assert' => false,
|
||||
'php_unit_expectation' => false,
|
||||
'php_unit_mock' => false,
|
||||
'php_unit_namespaced' => false,
|
||||
'php_unit_no_expectation_annotation' => false,
|
||||
'php_unit_test_case_static_method_calls' => false,
|
||||
'php_unit_test_annotation' => false,
|
||||
// 'no_unreachable_default_argument_value' => false,
|
||||
// 'ereg_to_preg' => false,
|
||||
// 'ordered_interfaces' => false,
|
||||
// 'error_suppression' => false,
|
||||
// 'non_printable_character' => false,
|
||||
// 'ordered_traits' => false,
|
||||
|
@ -16,7 +16,7 @@ use Doctrine\ORM\Query\Expr;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
class BirthdateFilter implements FilterInterface, ExportElementValidatedInterface
|
||||
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
// add specific role for this filter
|
||||
public function addRole()
|
||||
|
@ -27,7 +27,7 @@ namespace Chill\MainBundle\DependencyInjection;
|
||||
private $containerBuilder;
|
||||
|
||||
public function __construct(
|
||||
array $widgetFactories = [],
|
||||
array $widgetFactories,
|
||||
ContainerBuilder $containerBuilder
|
||||
) {
|
||||
// we register here widget factories (see below)
|
||||
|
@ -53,7 +53,7 @@ use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
* getUserFunction="getUser",
|
||||
* path="scope")
|
||||
*/
|
||||
class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
|
||||
class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
public const SENTRECEIVED_RECEIVED = 'received';
|
||||
|
||||
|
@ -28,7 +28,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use function array_key_exists;
|
||||
use function count;
|
||||
|
||||
class ActivityReasonFilter implements FilterInterface, ExportElementValidatedInterface
|
||||
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
protected ActivityReasonRepository $activityReasonRepository;
|
||||
|
||||
|
@ -26,7 +26,7 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use function count;
|
||||
|
||||
class ActivityTypeFilter implements FilterInterface, ExportElementValidatedInterface
|
||||
class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
protected ActivityTypeRepository $activityTypeRepository;
|
||||
|
||||
|
@ -33,7 +33,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use function count;
|
||||
|
||||
class PersonHavingActivityBetweenDateFilter implements FilterInterface, ExportElementValidatedInterface
|
||||
class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
protected ActivityReasonRepository $activityReasonRepository;
|
||||
|
||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(schema="chill_asideactivity")
|
||||
*/
|
||||
class AsideActivity implements TrackUpdateInterface, TrackCreationInterface
|
||||
class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
|
@ -31,7 +31,7 @@ use function in_array;
|
||||
use function is_array;
|
||||
use function is_object;
|
||||
|
||||
class DocGenObjectNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
@ -230,7 +230,7 @@ class EventController extends AbstractController
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function newAction(?Center $center = null, Request $request)
|
||||
public function newAction(?Center $center, Request $request)
|
||||
{
|
||||
if (null === $center) {
|
||||
$center_id = $request->query->get('center_id');
|
||||
|
@ -29,7 +29,7 @@ use function in_array;
|
||||
* @ORM\Table(name="chill_event_participation")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class Participation implements HasCenterInterface, HasScopeInterface, ArrayAccess
|
||||
class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
/**
|
||||
* @var Event
|
||||
|
@ -26,7 +26,7 @@ use function str_replace;
|
||||
* create a user for each permission_group and center.
|
||||
* username and password are identicals.
|
||||
*/
|
||||
class LoadUsers extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface
|
||||
class LoadUsers extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
public static $refs = [
|
||||
'center a_social' => [
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use function array_key_exists;
|
||||
|
||||
class CenterNormalizer implements NormalizerInterface, DenormalizerInterface
|
||||
class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
|
||||
{
|
||||
private CenterRepository $repository;
|
||||
|
||||
|
@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class CollectionNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class CollectionNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class UserNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class UserNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
@ -26,8 +26,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class LoadCustomFields extends AbstractFixture implements
|
||||
OrderedFixtureInterface,
|
||||
ContainerAwareInterface
|
||||
ContainerAwareInterface,
|
||||
OrderedFixtureInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
|
@ -47,7 +47,7 @@ use function ucfirst;
|
||||
/**
|
||||
* Load people into database.
|
||||
*/
|
||||
class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface
|
||||
class LoadPeople extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
|
||||
|
@ -58,11 +58,11 @@ use const SORT_REGULAR;
|
||||
* )
|
||||
*/
|
||||
class AccompanyingPeriod implements
|
||||
TrackCreationInterface,
|
||||
TrackUpdateInterface,
|
||||
HasScopesInterface,
|
||||
GroupSequenceProviderInterface,
|
||||
HasCentersInterface,
|
||||
GroupSequenceProviderInterface
|
||||
HasScopesInterface,
|
||||
TrackCreationInterface,
|
||||
TrackUpdateInterface
|
||||
{
|
||||
public const INTENSITIES = [self::INTENSITY_OCCASIONAL, self::INTENSITY_REGULAR];
|
||||
|
||||
|
@ -30,7 +30,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* "accompanying_period_work_evaluation": AccompanyingPeriodWorkEvaluation::class,
|
||||
* })
|
||||
*/
|
||||
class AccompanyingPeriodWorkEvaluation implements TrackUpdateInterface, TrackCreationInterface
|
||||
class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
|
@ -44,7 +44,7 @@ use function uniqid;
|
||||
/**
|
||||
* Render a list of people.
|
||||
*/
|
||||
class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
class ListPerson implements ExportElementValidatedInterface, ListInterface
|
||||
{
|
||||
protected CustomFieldProvider $customFieldProvider;
|
||||
|
||||
|
@ -16,7 +16,7 @@ use Doctrine\ORM\Query\Expr;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
class BirthdateFilter implements FilterInterface, ExportElementValidatedInterface
|
||||
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
public function addRole()
|
||||
{
|
||||
|
@ -25,8 +25,8 @@ use function in_array;
|
||||
use function is_array;
|
||||
|
||||
class GenderFilter implements
|
||||
FilterInterface,
|
||||
ExportElementValidatedInterface
|
||||
ExportElementValidatedInterface,
|
||||
FilterInterface
|
||||
{
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
|
@ -20,8 +20,8 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
class NationalityFilter implements
|
||||
FilterInterface,
|
||||
ExportElementValidatedInterface
|
||||
ExportElementValidatedInterface,
|
||||
FilterInterface
|
||||
{
|
||||
/**
|
||||
* @var TranslatableStringHelper
|
||||
|
@ -13,7 +13,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class AccompanyingPeriodParticipationNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
protected ?NormalizerInterface $normalizer = null;
|
||||
|
||||
|
@ -23,7 +23,7 @@ use function array_key_exists;
|
||||
use function array_merge;
|
||||
use function count;
|
||||
|
||||
class AccompanyingPeriodResourceNormalizer implements DenormalizerInterface, DenormalizerAwareInterface
|
||||
class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface, DenormalizerInterface
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
use ObjectToPopulateTrait;
|
||||
|
@ -27,7 +27,7 @@ use function is_array;
|
||||
* This denormalizer rely on AbstractNormalizer for most of the job, and
|
||||
* add some logic for synchronizing collection.
|
||||
*/
|
||||
class AccompanyingPeriodWorkDenormalizer implements DenormalizerAwareInterface, ContextAwareDenormalizerInterface
|
||||
class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInterface, DenormalizerAwareInterface
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
use ObjectToPopulateTrait;
|
||||
|
@ -23,7 +23,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use function array_key_exists;
|
||||
|
||||
class MembersEditorNormalizer implements DenormalizerInterface, DenormalizerAwareInterface
|
||||
class MembersEditorNormalizer implements DenormalizerAwareInterface, DenormalizerInterface
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
|
||||
|
@ -31,10 +31,10 @@ use function array_key_exists;
|
||||
* Serialize a Person entity.
|
||||
*/
|
||||
class PersonJsonNormalizer implements
|
||||
NormalizerInterface,
|
||||
NormalizerAwareInterface,
|
||||
DenormalizerAwareInterface,
|
||||
DenormalizerInterface,
|
||||
DenormalizerAwareInterface
|
||||
NormalizerAwareInterface,
|
||||
NormalizerInterface
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
use NormalizerAwareTrait;
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class SocialActionNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class SocialIssueNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class SocialIssueNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
@ -25,7 +25,7 @@ use function in_array;
|
||||
/**
|
||||
* Load reports into DB.
|
||||
*/
|
||||
class LoadReports extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface
|
||||
class LoadReports extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
|
||||
|
@ -47,7 +47,7 @@ use function strtolower;
|
||||
use function ucfirst;
|
||||
use function uniqid;
|
||||
|
||||
class ReportList implements ListInterface, ExportElementValidatedInterface
|
||||
class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
{
|
||||
protected CustomFieldProvider $customFieldProvider;
|
||||
|
||||
|
@ -25,7 +25,7 @@ use function array_keys;
|
||||
*
|
||||
* @ORM\MappedSuperclass
|
||||
*/
|
||||
abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
|
||||
abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
/**
|
||||
* @var User
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user