apply rector rules

This commit is contained in:
Julien Fastré 2023-07-28 02:40:02 +02:00
parent 157cdf6dfc
commit f570fe92a5
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
112 changed files with 252 additions and 562 deletions

View File

@ -25,10 +25,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
{ {
use \Symfony\Component\DependencyInjection\ContainerAwareTrait; use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
/** private readonly \Faker\Generator $faker;
* @var \Faker\Generator
*/
private $faker;
public function __construct(private readonly EntityManagerInterface $em) public function __construct(private readonly EntityManagerInterface $em)
{ {

View File

@ -25,10 +25,9 @@ use Doctrine\ORM\Mapping as ORM;
class ActivityReasonCategory implements \Stringable class ActivityReasonCategory implements \Stringable
{ {
/** /**
* @var bool
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $active = true; private bool $active = true;
/** /**
* @var int * @var int
@ -122,11 +121,9 @@ class ActivityReasonCategory implements \Stringable
* as unactive, all the reason have this entity as category is also * as unactive, all the reason have this entity as category is also
* set as unactive. * set as unactive.
* *
* @param bool $active
*
* @return ActivityReasonCategory * @return ActivityReasonCategory
*/ */
public function setActive($active) public function setActive(bool $active)
{ {
if ($this->active !== $active && !$active) { if ($this->active !== $active && !$active) {
foreach ($this->reasons as $reason) { foreach ($this->reasons as $reason) {

View File

@ -34,7 +34,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
/** /**
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $createdAt; private ?\DateTimeInterface $createdAt = null;
/** /**
* @ORM\ManyToOne(targetEntity=User::class) * @ORM\ManyToOne(targetEntity=User::class)
@ -45,7 +45,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
/** /**
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $date; private ?\DateTimeInterface $date = null;
/** /**
* @ORM\Column(type="time", nullable=true) * @ORM\Column(type="time", nullable=true)
@ -62,23 +62,23 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
/** /**
* @ORM\Column(type="string", length=100, nullable=true) * @ORM\Column(type="string", length=100, nullable=true)
*/ */
private $location; private ?string $location = null;
/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", nullable=true)
*/ */
private $note; private ?string $note = null;
/** /**
* @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities") * @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities")
* @ORM\JoinColumn(nullable=false) * @ORM\JoinColumn(nullable=false)
*/ */
private $type; private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null;
/** /**
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private $updatedAt; private ?\DateTimeInterface $updatedAt = null;
/** /**
* @ORM\ManyToOne(targetEntity=User::class) * @ORM\ManyToOne(targetEntity=User::class)

View File

@ -21,12 +21,9 @@ use Symfony\Component\HttpFoundation\Request;
class ChargeController extends AbstractElementController class ChargeController extends AbstractElementController
{ {
/** /**
* @Route(
* "{_locale}/budget/charge/{id}/delete",
* name="chill_budget_charge_delete"
* )
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/delete", name="chill_budget_charge_delete")
*/ */
public function deleteAction(Request $request, Charge $charge) public function deleteAction(Request $request, Charge $charge)
{ {
@ -39,12 +36,9 @@ class ChargeController extends AbstractElementController
} }
/** /**
* @Route(
* "{_locale}/budget/charge/{id}/edit",
* name="chill_budget_charge_edit"
* )
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/edit", name="chill_budget_charge_edit")
*/ */
public function editAction(Request $request, Charge $charge) public function editAction(Request $request, Charge $charge)
{ {
@ -57,12 +51,9 @@ class ChargeController extends AbstractElementController
} }
/** /**
* @Route(
* "{_locale}/budget/charge/by-person/{id}/new",
* name="chill_budget_charge_new"
* )
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/by-person/{id}/new", name="chill_budget_charge_new")
*/ */
public function newAction(Request $request, Person $person) public function newAction(Request $request, Person $person)
{ {
@ -75,12 +66,9 @@ class ChargeController extends AbstractElementController
} }
/** /**
* @Route(
* "{_locale}/budget/charge/by-household/{id}/new",
* name="chill_budget_charge_household_new"
* )
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/by-household/{id}/new", name="chill_budget_charge_household_new")
*/ */
public function newHouseholdAction(Request $request, Household $household) public function newHouseholdAction(Request $request, Household $household)
{ {
@ -93,12 +81,9 @@ class ChargeController extends AbstractElementController
} }
/** /**
* @Route(
* "{_locale}/budget/charge/{id}/view",
* name="chill_budget_charge_view"
* )
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/view", name="chill_budget_charge_view")
*/ */
public function viewAction(Charge $charge) public function viewAction(Charge $charge)
{ {

View File

@ -36,10 +36,7 @@ class ElementController extends AbstractController
} }
/** /**
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-person/{id}", name="chill_budget_elements_index")
* "{_locale}/budget/elements/by-person/{id}",
* name="chill_budget_elements_index"
* )
*/ */
public function indexAction(Person $person) public function indexAction(Person $person)
{ {
@ -63,10 +60,7 @@ class ElementController extends AbstractController
} }
/** /**
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-household/{id}", name="chill_budget_elements_household_index")
* "{_locale}/budget/elements/by-household/{id}",
* name="chill_budget_elements_household_index"
* )
*/ */
public function indexHouseholdAction(Household $household) public function indexHouseholdAction(Household $household)
{ {

View File

@ -22,10 +22,7 @@ use Symfony\Component\HttpFoundation\Response;
class ResourceController extends AbstractElementController class ResourceController extends AbstractElementController
{ {
/** /**
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/delete", name="chill_budget_resource_delete")
* "{_locale}/budget/resource/{id}/delete",
* name="chill_budget_resource_delete"
* )
*/ */
public function deleteAction(Request $request, Resource $resource) public function deleteAction(Request $request, Resource $resource)
{ {
@ -38,10 +35,7 @@ class ResourceController extends AbstractElementController
} }
/** /**
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/edit", name="chill_budget_resource_edit")
* "{_locale}/budget/resource/{id}/edit",
* name="chill_budget_resource_edit"
* )
*/ */
public function editAction(Request $request, Resource $resource): Response public function editAction(Request $request, Resource $resource): Response
{ {
@ -56,10 +50,7 @@ class ResourceController extends AbstractElementController
/** /**
* Create a new budget element for a person. * Create a new budget element for a person.
* *
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-person/{id}/new", name="chill_budget_resource_new")
* "{_locale}/budget/resource/by-person/{id}/new",
* name="chill_budget_resource_new"
* )
*/ */
public function newAction(Request $request, Person $person): Response public function newAction(Request $request, Person $person): Response
{ {
@ -74,10 +65,7 @@ class ResourceController extends AbstractElementController
/** /**
* Create new budget element for a household. * Create new budget element for a household.
* *
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-household/{id}/new", name="chill_budget_resource_household_new")
* "{_locale}/budget/resource/by-household/{id}/new",
* name="chill_budget_resource_household_new"
* )
*/ */
public function newHouseholdAction(Request $request, Household $household): Response public function newHouseholdAction(Request $request, Household $household): Response
{ {
@ -90,10 +78,7 @@ class ResourceController extends AbstractElementController
} }
/** /**
* @Route( * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/view", name="chill_budget_resource_view")
* "{_locale}/budget/resource/{id}/view",
* name="chill_budget_resource_view"
* )
*/ */
public function viewAction(Resource $resource): Response public function viewAction(Resource $resource): Response
{ {

View File

@ -46,10 +46,9 @@ class Charge extends AbstractElement implements HasCentersInterface
private ?ChargeKind $charge = null; private ?ChargeKind $charge = null;
/** /**
* @var string
* @ORM\Column(name="help", type="string", nullable=true) * @ORM\Column(name="help", type="string", nullable=true)
*/ */
private $help = self::HELP_NOT_RELEVANT; private string $help = self::HELP_NOT_RELEVANT;
/** /**
* @ORM\Column(name="id", type="integer") * @ORM\Column(name="id", type="integer")

View File

@ -29,12 +29,12 @@ class CancelReason
/** /**
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $active; private ?bool $active = null;
/** /**
* @ORM\Column(type="string", length=255) * @ORM\Column(type="string", length=255)
*/ */
private $canceledBy; private ?string $canceledBy = null;
/** /**
* @ORM\Id * @ORM\Id
@ -46,7 +46,7 @@ class CancelReason
/** /**
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $name = []; private array $name = [];
public function getActive(): ?bool public function getActive(): ?bool
{ {

View File

@ -37,7 +37,7 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface
*/ */
public $fakerNl; public $fakerNl;
private $counter = 0; private int $counter = 0;
public function __construct() public function __construct()
{ {

View File

@ -27,20 +27,16 @@ class CustomField
final public const ONE_TO_ONE = 1; final public const ONE_TO_ONE = 1;
/** /**
* @var bool
*
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $active = true; private bool $active = true;
/** /**
* @var CustomFieldsGroup
*
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup", * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup",
* inversedBy="customFields") * inversedBy="customFields")
*/ */
private $customFieldGroup; private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null;
/** /**
* @var int * @var int
@ -59,11 +55,9 @@ class CustomField
private $name; private $name;
/** /**
* @var array
*
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $options = []; private array $options = [];
/** /**
* @var float * @var float
@ -73,11 +67,9 @@ class CustomField
private $ordering; private $ordering;
/** /**
* @var bool
*
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $required = false; private false $required = false;
/** /**
* @var string * @var string

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice; namespace Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -22,10 +23,9 @@ use Doctrine\ORM\Mapping as ORM;
class Option class Option
{ {
/** /**
* @var bool
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $active = true; private bool $active = true;
/** /**
* @var Collection<Option> * @var Collection<Option>
@ -45,33 +45,34 @@ class Option
private $id; private $id;
/** /**
* @var string
* @ORM\Column(type="string", length=50, name="internal_key") * @ORM\Column(type="string", length=50, name="internal_key")
*/ */
private $internalKey = ''; private string $internalKey = '';
/** /**
* @var string
* @ORM\Column(type="string", length=15) * @ORM\Column(type="string", length=15)
*/ */
private $key; private ?string $key = null;
/** /**
* @var Option
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option", * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option",
* inversedBy="children") * inversedBy="children")
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $parent; private ?\Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option $parent = null;
/** /**
* A json representation of text (multilingual). * A json representation of text (multilingual).
* *
* @var array
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $text; private ?array $text = null;
public function __construct()
{
$this->children = new ArrayCollection();
}
/** /**
* @return bool * @return bool

View File

@ -26,10 +26,8 @@ class CustomFieldsGroup
/** /**
* The custom fields of the group that are active. * The custom fields of the group that are active.
* This variable if null, if this informations has not been computed. * This variable if null, if this informations has not been computed.
*
* @var array|null
*/ */
private $activeCustomFields; private ?array $activeCustomFields = null;
/** /**
* The custom fields of the group. * The custom fields of the group.
@ -67,11 +65,9 @@ class CustomFieldsGroup
private $name; private $name;
/** /**
* @var array
*
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $options = []; private array $options = [];
/** /**
* CustomFieldsGroup constructor. * CustomFieldsGroup constructor.

View File

@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/ */
class ChoiceWithOtherType extends AbstractType class ChoiceWithOtherType extends AbstractType
{ {
private $otherValueLabel = 'Other value'; private string $otherValueLabel = 'Other value';
/** (non-PHPdoc). /** (non-PHPdoc).
* @see \Symfony\Component\Form\AbstractType::buildForm() * @see \Symfony\Component\Form\AbstractType::buildForm()

View File

@ -32,19 +32,15 @@ class LinkedCustomFieldsType extends AbstractType
* The name for the choice field. * The name for the choice field.
* *
* Extracted from builder::getName * Extracted from builder::getName
*
* @var string
*/ */
private $choiceName = 'choice'; private string $choiceName = 'choice';
/** /**
* the option of the form. * the option of the form.
* *
* @internal options are stored at the class level to be reused by appendChoice, after data are setted * @internal options are stored at the class level to be reused by appendChoice, after data are setted
*
* @var array
*/ */
private $options = []; private array $options = [];
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{ {

View File

@ -39,7 +39,7 @@ class CustomFieldProvider implements ContainerAwareInterface
/** /**
* @var array The services indexes by the type * @var array The services indexes by the type
*/ */
private $servicesByType = []; private array $servicesByType = [];
/** /**
* Add a new custom field to the provider. * Add a new custom field to the provider.

View File

@ -26,15 +26,12 @@ use Twig\TwigFunction;
*/ */
class CustomFieldRenderingTwig extends AbstractExtension implements ContainerAwareInterface class CustomFieldRenderingTwig extends AbstractExtension implements ContainerAwareInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var Container The container
*/
private $container;
/** /**
* @var array The default parameters * @var array The default parameters
*/ */
private $defaultParams = [ private array $defaultParams = [
'label_layout' => 'ChillCustomFieldsBundle:CustomField:render_label.html.twig', 'label_layout' => 'ChillCustomFieldsBundle:CustomField:render_label.html.twig',
]; ];

View File

@ -24,15 +24,12 @@ use Twig\TwigFunction;
*/ */
class CustomFieldsGroupRenderingTwig extends AbstractExtension implements ContainerAwareInterface class CustomFieldsGroupRenderingTwig extends AbstractExtension implements ContainerAwareInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var Container The container
*/
private $container;
/** /**
* @var array The default parameters * @var array The default parameters
*/ */
private $defaultParams = [ private array $defaultParams = [
'layout' => 'ChillCustomFieldsBundle:CustomFieldsGroup:render.html.twig', 'layout' => 'ChillCustomFieldsBundle:CustomFieldsGroup:render.html.twig',
'show_empty' => true, 'show_empty' => true,
]; ];

View File

@ -32,10 +32,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*/ */
private $cfChoice; private $cfChoice;
/** private ?object $cfProvider = null;
* @var \Chill\CustomFieldsBundle\Service\CustomFieldProvider
*/
private $cfProvider;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -24,10 +24,7 @@ use function count;
*/ */
final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{ {
/** private ?object $customFieldNumber = null;
* @var CustomFieldNumber
*/
private $customFieldNumber;
/** /**
* @var FormBuilderInterface * @var FormBuilderInterface

View File

@ -24,10 +24,7 @@ final class CustomFieldsTextTest extends WebTestCase
{ {
use CustomFieldTestHelper; use CustomFieldTestHelper;
/** private ?object $customFieldProvider = null;
* @var \Chill\CustomFieldsBundle\Service\CustomFieldProvider
*/
private $customFieldProvider;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -23,15 +23,9 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/ */
final class CustomFieldsHelperTest extends KernelTestCase final class CustomFieldsHelperTest extends KernelTestCase
{ {
/** private ?object $cfHelper = null;
* @var CustomFieldsHelper
*/
private $cfHelper;
/** private \Chill\CustomFieldsBundle\Entity\CustomField $randomCFText;
* @var CustomField
*/
private $randomCFText;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -24,15 +24,9 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/ */
final class CustomFieldRenderingTwigTest extends KernelTestCase final class CustomFieldRenderingTwigTest extends KernelTestCase
{ {
/** private ?object $cfProvider = null;
* @var CustomFieldProvider
*/
private $cfProvider;
/** private ?object $cfRendering = null;
* @var CustomFieldRenderingTwig
*/
private $cfRendering;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -26,15 +26,9 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/ */
final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
{ {
/** private ?object $cfProvider = null;
* @var CustomFieldProvider
*/
private $cfProvider;
/** private ?object $cfRendering = null;
* @var CustomFieldsGroupRenderingTwig
*/
private $cfRendering;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -19,7 +19,7 @@ use function is_array;
class NormalizeNullValueHelper class NormalizeNullValueHelper
{ {
public function __construct(private readonly NormalizerInterface $normalizer, private ?string $discriminatorType = null, private readonly ?string $discriminatorValue = null) public function __construct(private readonly NormalizerInterface $normalizer, private readonly ?string $discriminatorType = null, private readonly ?string $discriminatorValue = null)
{ {
} }

View File

@ -37,17 +37,17 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
* @ORM\JoinColumn(name="category_id_inside_bundle", referencedColumnName="id_inside_bundle") * @ORM\JoinColumn(name="category_id_inside_bundle", referencedColumnName="id_inside_bundle")
* }) * })
*/ */
private $category; private ?\Chill\DocStoreBundle\Entity\DocumentCategory $category = null;
/** /**
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $date; private ?\DateTimeInterface $date = null;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text")
*/ */
private $description = ''; private string $description = '';
/** /**
* @ORM\Id * @ORM\Id
@ -66,12 +66,12 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
* message="Upload a document" * message="Upload a document"
* ) * )
*/ */
private $object; private ?\Chill\DocStoreBundle\Entity\StoredObject $object = null;
/** /**
* @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate") * @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate")
*/ */
private $template; private ?\Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate $template = null;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text")
@ -79,7 +79,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
* min=2, max=250 * min=2, max=250
* ) * )
*/ */
private $title; private ?string $title = null;
/** /**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")

View File

@ -33,22 +33,19 @@ use Traversable;
class Event implements HasCenterInterface, HasScopeInterface class Event implements HasCenterInterface, HasScopeInterface
{ {
/** /**
* @var Center
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center")
*/ */
private $center; private ?\Chill\MainBundle\Entity\Center $center = null;
/** /**
* @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/ */
private $circle; private ?\Chill\MainBundle\Entity\Scope $circle = null;
/** /**
* @var DateTime
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $date; private ?\DateTime $date = null;
/** /**
* @var int * @var int
@ -80,10 +77,9 @@ class Event implements HasCenterInterface, HasScopeInterface
private Collection $participations; private Collection $participations;
/** /**
* @var EventType
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\EventType") * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\EventType")
*/ */
private $type; private ?\Chill\EventBundle\Entity\EventType $type = null;
/** /**
* Event constructor. * Event constructor.

View File

@ -35,12 +35,11 @@ use function in_array;
class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterface class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterface
{ {
/** /**
* @var Event
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\Event", * targetEntity="Chill\EventBundle\Entity\Event",
* inversedBy="participations") * inversedBy="participations")
*/ */
private $event; private ?\Chill\EventBundle\Entity\Event $event = null;
/** /**
* @var int * @var int
@ -52,28 +51,24 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
private $id; private $id;
/** /**
* @var DateTime
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $lastUpdate; private ?\DateTime $lastUpdate = null;
/** /**
* @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/ */
private $person; private ?\Chill\PersonBundle\Entity\Person $person = null;
/** /**
* @var Role
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role") * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role")
*/ */
private $role; private ?\Chill\EventBundle\Entity\Role $role = null;
/** /**
* @var Status
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status") * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status")
*/ */
private $status; private ?\Chill\EventBundle\Entity\Status $status = null;
/** /**
* @return Center * @return Center

View File

@ -44,12 +44,11 @@ class Role
private $name; private $name;
/** /**
* @var EventType
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\EventType", * targetEntity="Chill\EventBundle\Entity\EventType",
* inversedBy="roles") * inversedBy="roles")
*/ */
private $type; private ?\Chill\EventBundle\Entity\EventType $type = null;
/** /**
* Get active. * Get active.

View File

@ -44,12 +44,11 @@ class Status
private $name; private $name;
/** /**
* @var EventType
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\EventType", * targetEntity="Chill\EventBundle\Entity\EventType",
* inversedBy="statuses") * inversedBy="statuses")
*/ */
private $type; private ?\Chill\EventBundle\Entity\EventType $type = null;
/** /**
* Get active. * Get active.

View File

@ -42,7 +42,7 @@ final class ParticipationControllerTest extends WebTestCase
* *
* @var int[] * @var int[]
*/ */
private $personsIdsCache = []; private array $personsIdsCache = [];
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -38,10 +38,9 @@ abstract class AbstractFamilyMember implements HasCenterInterface
* @ORM\Column(name="birthdate", type="date_immutable", nullable=true) * @ORM\Column(name="birthdate", type="date_immutable", nullable=true)
* @Assert\Date * @Assert\Date
*/ */
private $birthdate; private ?\DateTimeImmutable $birthdate = null;
/** /**
* @var DateTimeImmutable|null
* *
* @ORM\Column(name="endDate", type="datetime_immutable", nullable=true) * @ORM\Column(name="endDate", type="datetime_immutable", nullable=true)
* @Assert\Date * @Assert\Date
@ -50,7 +49,7 @@ abstract class AbstractFamilyMember implements HasCenterInterface
* message="The membership's end date should be after the start date" * message="The membership's end date should be after the start date"
* ) * )
*/ */
private $endDate; private ?\DateTimeImmutable $endDate = null;
/** /**
* @var string * @var string
@ -59,64 +58,51 @@ abstract class AbstractFamilyMember implements HasCenterInterface
private $familialSituation; private $familialSituation;
/** /**
* @var string
*
* @ORM\Column(name="firstname", type="string", length=255) * @ORM\Column(name="firstname", type="string", length=255)
*/ */
private $firstname = ''; private string $firstname = '';
/** /**
* @var string
*
* @ORM\Column(name="gender", type="string", length=20) * @ORM\Column(name="gender", type="string", length=20)
*/ */
private $gender = ''; private string $gender = '';
/** /**
* @var string
*
* @ORM\Column(name="lastname", type="string", length=255) * @ORM\Column(name="lastname", type="string", length=255)
*/ */
private $lastname = ''; private string $lastname = '';
/** /**
* @var string
*
* @ORM\Column(name="link", type="string", length=255) * @ORM\Column(name="link", type="string", length=255)
*/ */
private $link = ''; private string $link = '';
/** /**
* @var MaritalStatus
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\MaritalStatus" * targetEntity="\Chill\PersonBundle\Entity\MaritalStatus"
* ) * )
*/ */
private $maritalStatus; private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null;
/** /**
* @var Person
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person" * targetEntity="\Chill\PersonBundle\Entity\Person"
* ) * )
*/ */
private $person; private ?\Chill\PersonBundle\Entity\Person $person = null;
/** /**
* @var string
*
* @ORM\Column(name="professionnalSituation", type="text") * @ORM\Column(name="professionnalSituation", type="text")
*/ */
private $professionnalSituation = ''; private string $professionnalSituation = '';
/** /**
* @var DateTimeImmutable
* *
* @ORM\Column(name="startDate", type="datetime_immutable") * @ORM\Column(name="startDate", type="datetime_immutable")
* @Assert\NotNull * @Assert\NotNull
* @Assert\Date * @Assert\Date
*/ */
private $startDate; private ?\DateTimeImmutable $startDate = null;
public function __construct() public function __construct()
{ {

View File

@ -129,8 +129,6 @@ abstract class AbstractCRUDController extends AbstractController
* *
* By default, count all entities. You can customize the query by * By default, count all entities. You can customize the query by
* using the method `customizeQuery`. * using the method `customizeQuery`.
*
* @param mixed $_format
*/ */
protected function countEntities(string $action, Request $request, mixed $_format): int protected function countEntities(string $action, Request $request, mixed $_format): int
{ {

View File

@ -218,7 +218,6 @@ class ApiController extends AbstractCRUDController
* @param string $postedDataType the type of the posted data (the content) * @param string $postedDataType the type of the posted data (the content)
* @param string $postedDataContext a context to deserialize posted data (the content) * @param string $postedDataContext a context to deserialize posted data (the content)
* @param bool $forcePersist force to persist the created element (only for POST request) * @param bool $forcePersist force to persist the created element (only for POST request)
* @param mixed $id
* @throw BadRequestException if unable to deserialize the posted data * @throw BadRequestException if unable to deserialize the posted data
* @throw BadRequestException if the method is not POST or DELETE * @throw BadRequestException if the method is not POST or DELETE
*/ */
@ -337,9 +336,6 @@ class ApiController extends AbstractCRUDController
* 4. launch `onPostCheckACL`. If the result is an instance of Response, * 4. launch `onPostCheckACL`. If the result is an instance of Response,
* this response is returned ; * this response is returned ;
* 5. Serialize the entity and return the result. The serialization context is given by `getSerializationContext` * 5. Serialize the entity and return the result. The serialization context is given by `getSerializationContext`
*
* @param mixed $id
* @param mixed $_format
*/ */
protected function entityGet(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response protected function entityGet(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response
{ {
@ -451,8 +447,6 @@ class ApiController extends AbstractCRUDController
* PATCH, PUT, or POST method). * PATCH, PUT, or POST method).
* *
* This is called **after** the entity was altered. * This is called **after** the entity was altered.
*
* @param mixed $entity
*/ */
protected function getContextForSerializationPostAlter(string $action, Request $request, string $_format, mixed $entity, array $more = []): array protected function getContextForSerializationPostAlter(string $action, Request $request, string $_format, mixed $entity, array $more = []): array
{ {
@ -489,7 +483,6 @@ class ApiController extends AbstractCRUDController
* 4. Serialize the entities in a Collection, using `SerializeCollection` * 4. Serialize the entities in a Collection, using `SerializeCollection`
* *
* @param string $action * @param string $action
* @param mixed $_format
*/ */
protected function indexApiAction($action, Request $request, mixed $_format) protected function indexApiAction($action, Request $request, mixed $_format)
{ {

View File

@ -59,8 +59,6 @@ class CRUDController extends AbstractController
* BAse method for edit action. * BAse method for edit action.
* *
* IMplemented by the method formEditAction, with action as 'edit' * IMplemented by the method formEditAction, with action as 'edit'
*
* @param mixed $id
*/ */
public function edit(Request $request, mixed $id): Response public function edit(Request $request, mixed $id): Response
{ {
@ -120,8 +118,6 @@ class CRUDController extends AbstractController
* Base method for the view action. * Base method for the view action.
* *
* Implemented by the method viewAction, with action as 'view' * Implemented by the method viewAction, with action as 'view'
*
* @param mixed $id
*/ */
public function view(Request $request, mixed $id): Response public function view(Request $request, mixed $id): Response
{ {
@ -182,7 +178,6 @@ class CRUDController extends AbstractController
* Throw an \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException * Throw an \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException
* if not accessible. * if not accessible.
* *
* @param mixed $entity
* *
* @throws \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException * @throws \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException
*/ */
@ -223,7 +218,6 @@ class CRUDController extends AbstractController
* It is preferable to override customizeForm instead of overriding * It is preferable to override customizeForm instead of overriding
* this method. * this method.
* *
* @param mixed $entity
* @param string $formClass * @param string $formClass
*/ */
protected function createFormFor(string $action, mixed $entity, ?string $formClass = null, array $formOptions = []): FormInterface protected function createFormFor(string $action, mixed $entity, ?string $formClass = null, array $formOptions = []): FormInterface
@ -484,9 +478,7 @@ class CRUDController extends AbstractController
* 6. Launch rendering, the parameter is fetch using `getTemplateFor` * 6. Launch rendering, the parameter is fetch using `getTemplateFor`
* The parameters may be personnalized using `generateTemplateParameter`. * The parameters may be personnalized using `generateTemplateParameter`.
* *
* @param mixed $id
* @param string $formClass * @param string $formClass
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/ */
protected function formEditAction(string $action, Request $request, mixed $id, ?string $formClass = null, array $formOptions = []): Response protected function formEditAction(string $action, Request $request, mixed $id, ?string $formClass = null, array $formOptions = []): Response
@ -877,7 +869,6 @@ class CRUDController extends AbstractController
* * save-and-new: return to new page of current crud ; * * save-and-new: return to new page of current crud ;
* * save-and-view: return to view page of current crud ; * * save-and-view: return to view page of current crud ;
* *
* @param mixed $entity
* *
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
*/ */
@ -1050,9 +1041,6 @@ class CRUDController extends AbstractController
* * `crud_name`: the crud name * * `crud_name`: the crud name
* 6. Launch rendering, the parameter is fetch using `getTemplateFor` * 6. Launch rendering, the parameter is fetch using `getTemplateFor`
* The parameters may be personnalized using `generateTemplateParameter`. * The parameters may be personnalized using `generateTemplateParameter`.
*
* @param mixed $id
* @param mixed $_format
*/ */
protected function viewAction(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response protected function viewAction(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response
{ {

View File

@ -64,17 +64,13 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
/** /**
* The current input interface. * The current input interface.
*
* @var InputInterface
*/ */
private $input; private ?\Symfony\Component\Console\Input\InputInterface $input = null;
/** /**
* The current output interface. * The current output interface.
*
* @var OutputInterface
*/ */
private $output; private ?\Symfony\Component\Console\Output\OutputInterface $output = null;
public function __construct( public function __construct(
LoggerInterface $logger, LoggerInterface $logger,

View File

@ -31,12 +31,12 @@ class LoadAndUpdateLanguagesCommand extends Command
final public const INCLUDE_REGIONAL_VERSION = 'include_regional'; final public const INCLUDE_REGIONAL_VERSION = 'include_regional';
// Array of ancien languages (to exclude) // Array of ancien languages (to exclude)
private $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga', private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ]; 'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
// The regional version of language are language with _ in the code // The regional version of language are language with _ in the code
// This array contains regional code to not exclude // This array contains regional code to not exclude
private $regionalVersionToInclude = ['ro_MD']; private array $regionalVersionToInclude = ['ro_MD'];
/** /**
* LoadCountriesCommand constructor. * LoadCountriesCommand constructor.
@ -84,7 +84,6 @@ class LoadAndUpdateLanguagesCommand extends Command
{ {
$em = $this->entityManager; $em = $this->entityManager;
$chillAvailableLanguages = $this->availableLanguages; $chillAvailableLanguages = $this->availableLanguages;
$languageBundle = Intl::getLanguageBundle();
$languages = []; $languages = [];
foreach ($chillAvailableLanguages as $avLang) { foreach ($chillAvailableLanguages as $avLang) {
@ -125,7 +124,7 @@ class LoadAndUpdateLanguagesCommand extends Command
if ($langageDB) { if ($langageDB) {
$em->remove($langageDB); $em->remove($langageDB);
} }
echo 'Code excluded : ' . $code . ' - ' . \Symfony\Component\Intl\Languages::getName() . "\n"; echo 'Code excluded : ' . $code . ' - ' . \Symfony\Component\Intl\Languages::getName('en_GB') . "\n";
} }
} }

View File

@ -26,10 +26,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
{ {
protected $faker; protected $faker;
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface
*/
private $container;
public function __construct() public function __construct()
{ {

View File

@ -23,10 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/ */
class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface
*/
private $container;
public function getOrder() public function getOrder()
{ {

View File

@ -27,17 +27,14 @@ use function in_array;
class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
{ {
// Array of ancien languages (to exclude) // Array of ancien languages (to exclude)
private $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga', private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ]; 'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface
*/
private $container;
// The regional version of language are language with _ in the code // The regional version of language are language with _ in the code
// This array contains regional code to not exclude // This array contains regional code to not exclude
private $regionalVersionToInclude = ['ro_MD']; private array $regionalVersionToInclude = ['ro_MD'];
public function getOrder() public function getOrder()
{ {
@ -78,7 +75,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
$names = []; $names = [];
foreach ($this->container->getParameter('chill_main.available_languages') as $lang) { foreach ($this->container->getParameter('chill_main.available_languages') as $lang) {
$names[$lang] = \Symfony\Component\Intl\Languages::getName(); $names[$lang] = \Symfony\Component\Intl\Languages::getName('en_GB');
} }
return $names; return $names;

View File

@ -23,10 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/ */
class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface
*/
private $container;
public function getOrder() public function getOrder()
{ {

View File

@ -28,7 +28,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
{ {
public static $refs = []; public static $refs = [];
private static $postalCodeBelgium = <<<'EOF' private static string $postalCodeBelgium = <<<'EOF'
1000,BRUXELLES,BE 1000,BRUXELLES,BE
1020,BRUXELLES,BE 1020,BRUXELLES,BE
1030,SCHAERBEEK,BE 1030,SCHAERBEEK,BE
@ -63,7 +63,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
1320,BEAUVECHAIN,BE 1320,BEAUVECHAIN,BE
EOF; EOF;
private static $postalCodeFrance = <<<'EOF' private static string $postalCodeFrance = <<<'EOF'
85000,LA ROCHE SUR YON,FR,85191,46.6675261644,-1.4077954093,INSEE 85000,LA ROCHE SUR YON,FR,85191,46.6675261644,-1.4077954093,INSEE
85000,MOUILLERON LE CAPTIF,FR,85155,46.7104764993,-1.46129661418,INSEE 85000,MOUILLERON LE CAPTIF,FR,85155,46.7104764993,-1.46129661418,INSEE
85100,LES SABLES D OLONNE,FR,85194,46.5007612799,-1.79255128677,INSEE 85100,LES SABLES D OLONNE,FR,85194,46.5007612799,-1.79255128677,INSEE

View File

@ -56,10 +56,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
], ],
]; ];
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface
*/
private $container;
public function getOrder() public function getOrder()
{ {

View File

@ -109,17 +109,15 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
* cache of ordering by place. * cache of ordering by place.
* *
* @internal used by function cacheAndGetOrdering * @internal used by function cacheAndGetOrdering
*
* @var array
*/ */
private $cacheOrdering = []; private array $cacheOrdering = [];
/** /**
* @var WidgetFactoryInterface[] * @var WidgetFactoryInterface[]
*/ */
private $widgetFactories; private ?array $widgetFactories = null;
private $widgetServices = []; private array $widgetServices = [];
/** /**
* process the configuration and the container to add the widget available. * process the configuration and the container to add the widget available.

View File

@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
class Age extends FunctionNode class Age extends FunctionNode
{ {
private $value1; private \Doctrine\ORM\Query\AST\ArithmeticTerm|\Doctrine\ORM\Query\AST\SimpleArithmeticExpression|null $value1 = null;
private $value2; private \Doctrine\ORM\Query\AST\ArithmeticTerm|\Doctrine\ORM\Query\AST\SimpleArithmeticExpression|null $value2 = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -29,7 +29,7 @@ class Extract extends FunctionNode
{ {
private string $field; private string $field;
private $value; private \Doctrine\ORM\Query\AST\Node|string|null $value = null;
//private PathExpression $value; //private PathExpression $value;
//private FunctionNode $value; //private FunctionNode $value;
//private DateDiffFunction $value; //private DateDiffFunction $value;

View File

@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
class GetJsonFieldByKey extends FunctionNode class GetJsonFieldByKey extends FunctionNode
{ {
private $expr1; private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
private $expr2; private ?\Doctrine\ORM\Query\AST\Node $expr2 = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -24,7 +24,7 @@ use Doctrine\ORM\Query\SqlWalker;
*/ */
class JsonAggregate extends FunctionNode class JsonAggregate extends FunctionNode
{ {
private $expr; private ?\Doctrine\ORM\Query\AST\Node $expr = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
class JsonExtract extends FunctionNode class JsonExtract extends FunctionNode
{ {
private $element; private \Doctrine\ORM\Query\AST\Node|string|null $element = null;
private $keyToExtract; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -21,7 +21,7 @@ use Doctrine\ORM\Query\SqlWalker;
*/ */
class JsonbArrayLength extends FunctionNode class JsonbArrayLength extends FunctionNode
{ {
private $expr1; private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
public function getSql(SqlWalker $sqlWalker): string public function getSql(SqlWalker $sqlWalker): string
{ {

View File

@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
class JsonbExistsInArray extends FunctionNode class JsonbExistsInArray extends FunctionNode
{ {
private $expr1; private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
private $expr2; private ?\Doctrine\ORM\Query\AST\InputParameter $expr2 = null;
public function getSql(SqlWalker $sqlWalker): string public function getSql(SqlWalker $sqlWalker): string
{ {

View File

@ -25,13 +25,13 @@ use Exception;
*/ */
class OverlapsI extends FunctionNode class OverlapsI extends FunctionNode
{ {
private $firstPeriodEnd; private ?\Doctrine\ORM\Query\AST\Node $firstPeriodEnd = null;
private $firstPeriodStart; private ?\Doctrine\ORM\Query\AST\Node $firstPeriodStart = null;
private $secondPeriodEnd; private ?\Doctrine\ORM\Query\AST\Node $secondPeriodEnd = null;
private $secondPeriodStart; private ?\Doctrine\ORM\Query\AST\Node $secondPeriodStart = null;
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{ {

View File

@ -19,9 +19,9 @@ use Doctrine\ORM\Query\Lexer;
*/ */
class STContains extends FunctionNode class STContains extends FunctionNode
{ {
private $firstPart; private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
private $secondPart; private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{ {

View File

@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
class STX extends FunctionNode class STX extends FunctionNode
{ {
private $field; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $field = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
class STY extends FunctionNode class STY extends FunctionNode
{ {
private $field; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $field = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -16,9 +16,9 @@ use Doctrine\ORM\Query\Lexer;
class Similarity extends FunctionNode class Similarity extends FunctionNode
{ {
private $firstPart; private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
private $secondPart; private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{ {

View File

@ -17,9 +17,9 @@ use Doctrine\ORM\Query\SqlWalker;
class StrictWordSimilarityOPS extends \Doctrine\ORM\Query\AST\Functions\FunctionNode class StrictWordSimilarityOPS extends \Doctrine\ORM\Query\AST\Functions\FunctionNode
{ {
private $firstPart; private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
private $secondPart; private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -21,9 +21,9 @@ use Doctrine\ORM\Query\SqlWalker;
*/ */
class ToChar extends FunctionNode class ToChar extends FunctionNode
{ {
private $datetime; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null;
private $fmt; private \Doctrine\ORM\Query\AST\Node|string|null $fmt = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -22,7 +22,7 @@ use Doctrine\ORM\Query\Lexer;
*/ */
class Unaccent extends FunctionNode class Unaccent extends FunctionNode
{ {
private $string; private ?\Doctrine\ORM\Query\AST\Node $string = null;
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{ {

View File

@ -25,10 +25,9 @@ class CommentEmbeddable
private ?string $comment = null; private ?string $comment = null;
/** /**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private $date; private ?\DateTime $date = null;
/** /**
* Embeddable does not support associations. * Embeddable does not support associations.

View File

@ -29,7 +29,7 @@ class PermissionsGroup
* *
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $flags = []; private array $flags = [];
/** /**
* @var Collection<GroupCenter> * @var Collection<GroupCenter>

View File

@ -53,12 +53,11 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
private string $canonical = ''; private string $canonical = '';
/** /**
* @var Point
* *
* @ORM\Column(type="point", nullable=true) * @ORM\Column(type="point", nullable=true)
* @groups({"read"}) * @groups({"read"})
*/ */
private $center; private ?\Chill\MainBundle\Doctrine\Model\Point $center = null;
/** /**
* @var string * @var string
@ -69,12 +68,11 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
private $code; private $code;
/** /**
* @var Country
* *
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
* @groups({"write", "read"}) * @groups({"write", "read"})
*/ */
private $country; private ?\Chill\MainBundle\Entity\Country $country = null;
/** /**
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null}) * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
@ -100,28 +98,25 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
private $name; private $name;
/** /**
* @var int
* *
* @ORM\Column(name="origin", type="integer", nullable=true) * @ORM\Column(name="origin", type="integer", nullable=true)
* @groups({"write", "read"}) * @groups({"write", "read"})
*/ */
private $origin = 0; private int $origin = 0;
/** /**
* @var string
* *
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"}) * @groups({"read"})
*/ */
private $postalCodeSource; private ?string $postalCodeSource = null;
/** /**
* @var string
* *
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"}) * @groups({"read"})
*/ */
private $refPostalCodeId; private ?string $refPostalCodeId = null;
public function getCenter(): ?Point public function getCenter(): ?Point
{ {

View File

@ -64,10 +64,7 @@ class ExportManager
*/ */
private array $formatters = []; private array $formatters = [];
/** private readonly string|\Stringable|\Symfony\Component\Security\Core\User\UserInterface $user;
* @var \Symfony\Component\Security\Core\User\UserInterface
*/
private $user;
public function __construct( public function __construct(
private readonly LoggerInterface $logger, private readonly LoggerInterface $logger,

View File

@ -126,17 +126,13 @@ class SpreadSheetFormatter implements FormatterInterface
* The array's keys are the keys in the raw result, and * The array's keys are the keys in the raw result, and
* values are the callable which will transform the raw result to * values are the callable which will transform the raw result to
* displayable result. * displayable result.
*
* @var array
*/ */
private $cacheDisplayableResult; private ?array $cacheDisplayableResult = null;
/** /**
* Whethe `cacheDisplayableResult` is initialized or not. * Whethe `cacheDisplayableResult` is initialized or not.
*
* @var bool
*/ */
private $cacheDisplayableResultIsInitialized = false; private bool $cacheDisplayableResultIsInitialized = false;
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager) public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
{ {

View File

@ -28,20 +28,17 @@ use function in_array;
*/ */
class ComposedRoleScopeType extends AbstractType class ComposedRoleScopeType extends AbstractType
{ {
/** private readonly \Chill\MainBundle\Security\RoleProvider $roleProvider;
* @var RoleProvider
*/
private $roleProvider;
/** /**
* @var string[] * @var string[]
*/ */
private $roles = []; private array $roles = [];
/** /**
* @var string[] * @var string[]
*/ */
private $rolesWithoutScope = []; private array $rolesWithoutScope = [];
public function __construct( public function __construct(
private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatableStringHelper $translatableStringHelper,

View File

@ -26,7 +26,7 @@ class TranslatableStringFormType extends AbstractType
{ {
// The langauges availaible // The langauges availaible
private $frameworkTranslatorFallback; // The langagues used for the translation private readonly array $frameworkTranslatorFallback; // The langagues used for the translation
public function __construct(private readonly array $availableLanguages, Translator $translator) public function __construct(private readonly array $availableLanguages, Translator $translator)
{ {

View File

@ -190,7 +190,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
'Type' => 'carrier', 'Type' => 'carrier',
], ],
]); ]);
} catch (ClientException $e) { } catch (ClientException) {
return 'invalid'; return 'invalid';
} catch (ServerException $e) { } catch (ServerException $e) {
$response = $e->getResponse(); $response = $e->getResponse();

View File

@ -22,17 +22,14 @@ use Twig\TwigFunction;
*/ */
class MenuTwig extends AbstractExtension implements ContainerAwareInterface class MenuTwig extends AbstractExtension implements ContainerAwareInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var \Symfony\Component\DependencyInjection\ContainerInterface
*/
private $container;
/** /**
* the default parameters for chillMenu. * the default parameters for chillMenu.
* *
* @var mixed[] * @var mixed[]
*/ */
private $defaultParams = [ private array $defaultParams = [
'layout' => '@ChillMain/Menu/defaultMenu.html.twig', 'layout' => '@ChillMain/Menu/defaultMenu.html.twig',
'args' => [], 'args' => [],
'activeRouteKey' => null, 'activeRouteKey' => null,

View File

@ -35,19 +35,19 @@ class SearchProvider
/** /**
* @var HasAdvancedSearchFormInterface[] * @var HasAdvancedSearchFormInterface[]
*/ */
private $hasAdvancedFormSearchServices = []; private array $hasAdvancedFormSearchServices = [];
/** /**
* store string which must be extracted to find default arguments. * store string which must be extracted to find default arguments.
* *
* @var string[] * @var string[]
*/ */
private $mustBeExtracted = []; private array $mustBeExtracted = [];
/** /**
* @var SearchInterface[] * @var SearchInterface[]
*/ */
private $searchServices = []; private array $searchServices = [];
public function addSearchService(SearchInterface $service, $name) public function addSearchService(SearchInterface $service, $name)
{ {

View File

@ -19,17 +19,15 @@ class RoleProvider
/** /**
* @var ProvideRoleInterface[] * @var ProvideRoleInterface[]
*/ */
private $providers = []; private array $providers = [];
/** /**
* an array where keys are the role, and value is the title * an array where keys are the role, and value is the title
* for the given role. * for the given role.
* *
* Null when not initialized. * Null when not initialized.
*
* @var array|null
*/ */
private $rolesTitlesCache; private ?array $rolesTitlesCache = null;
/** /**
* Add a role provider. * Add a role provider.

View File

@ -80,7 +80,6 @@ class WidgetRenderingTwig extends AbstractExtension
* *
* @param string $place * @param string $place
* @param WidgetInterface $widget * @param WidgetInterface $widget
* @param mixed $ordering
*/ */
public function addWidget($place, mixed $ordering, $widget, array $config = []) public function addWidget($place, mixed $ordering, $widget, array $config = [])
{ {

View File

@ -286,10 +286,6 @@ abstract class AbstractExportTest extends WebTestCase
* > 0). * > 0).
* *
* @dataProvider dataProviderInitiateQuery * @dataProvider dataProviderInitiateQuery
*
* @param mixed $modifiers
* @param mixed $acl
* @param mixed $data
*/ */
public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data) public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data)
{ {
@ -377,10 +373,6 @@ abstract class AbstractExportTest extends WebTestCase
* - nothing, if the query is a native SQL * - nothing, if the query is a native SQL
* *
* @dataProvider dataProviderInitiateQuery * @dataProvider dataProviderInitiateQuery
*
* @param mixed $modifiers
* @param mixed $acl
* @param mixed $data
*/ */
public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data) public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data)
{ {

View File

@ -22,7 +22,7 @@ use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
*/ */
final class UserControllerTest extends WebTestCase final class UserControllerTest extends WebTestCase
{ {
private $client; private \Symfony\Bundle\FrameworkBundle\KernelBrowser $client;
private array $toDelete = []; private array $toDelete = [];

View File

@ -21,7 +21,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/ */
final class RouteLoaderTest extends KernelTestCase final class RouteLoaderTest extends KernelTestCase
{ {
private $router; private ?object $router = null;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -22,7 +22,7 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
/** /**
* @var \Chill\MainBundle\Search\AbstractSearch * @var \Chill\MainBundle\Search\AbstractSearch
*/ */
private $stub; private \Chill\MainBundle\Search\AbstractSearch&\PHPUnit\Framework\MockObject\MockObject $stub;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -24,10 +24,7 @@ use PHPUnit\Framework\TestCase;
*/ */
final class SearchProviderTest extends TestCase final class SearchProviderTest extends TestCase
{ {
/** private \Chill\MainBundle\Search\SearchProvider $search;
* @var SearchProvider
*/
private $search;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -36,16 +36,14 @@ class TimelineBuilder implements ContainerAwareInterface
* *
* @var TimelineProviderInterface[] * @var TimelineProviderInterface[]
*/ */
private $providers = []; private array $providers = [];
/** /**
* Record provider and their context. * Record provider and their context.
* *
* This array has the structure `[ 'context' => [ 'service id' ] ]` * This array has the structure `[ 'context' => [ 'service id' ] ]`
*
* @var array
*/ */
private $providersByContext = []; private array $providersByContext = [];
public function __construct(private readonly EntityManagerInterface $em) public function __construct(private readonly EntityManagerInterface $em)
{ {

View File

@ -24,7 +24,7 @@ class CountriesInfo
{ {
private static $cacheCountriesCodeByContinent; private static $cacheCountriesCodeByContinent;
private static $preparedData; private static ?array $preparedData = null;
/** /**
* get the information about country in arrays where :. * get the information about country in arrays where :.

View File

@ -29,11 +29,8 @@ use function count;
*/ */
class Version20150821105642 extends AbstractMigration implements \Symfony\Component\DependencyInjection\ContainerAwareInterface class Version20150821105642 extends AbstractMigration implements \Symfony\Component\DependencyInjection\ContainerAwareInterface
{ {
/** private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
* @var ContainerInterface public function __construct(\Doctrine\DBAL\Connection $connection, \Psr\Log\LoggerInterface $logger, private readonly \Doctrine\ORM\EntityManager $entityManager)
*/
private $container;
public function __construct(\Doctrine\DBAL\Connection $connection, \Psr\Log\LoggerInterface $logger, private \Doctrine\ORM\EntityManager $entityManager)
{ {
parent::__construct($connection, $logger); parent::__construct($connection, $logger);
} }

View File

@ -25,7 +25,7 @@ class LoadAccompanyingPeriodOrigin extends AbstractFixture implements OrderedFix
public static $references = []; public static $references = [];
private $phoneCall = ['en' => 'phone call', 'fr' => 'appel téléphonique']; private array $phoneCall = ['en' => 'phone call', 'fr' => 'appel téléphonique'];
public function getOrder() public function getOrder()
{ {

View File

@ -32,9 +32,9 @@ use Twig\Environment;
class LoadCustomFields extends AbstractFixture implements class LoadCustomFields extends AbstractFixture implements
OrderedFixtureInterface OrderedFixtureInterface
{ {
private $cfText; private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfText = null;
private $cfChoice; private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfChoice = null;
/** /**
/** /**

View File

@ -21,7 +21,7 @@ use Doctrine\Persistence\ObjectManager;
*/ */
class LoadMaritalStatus extends AbstractFixture implements OrderedFixtureInterface class LoadMaritalStatus extends AbstractFixture implements OrderedFixtureInterface
{ {
private $maritalStatuses = [ private array $maritalStatuses = [
['id' => 'single', 'name' => ['en' => 'single', 'fr' => 'célibataire']], ['id' => 'single', 'name' => ['en' => 'single', 'fr' => 'célibataire']],
['id' => 'married', 'name' => ['en' => 'married', 'fr' => 'marié(e)']], ['id' => 'married', 'name' => ['en' => 'married', 'fr' => 'marié(e)']],
['id' => 'widow', 'name' => ['en' => 'widow', 'fr' => 'veuf veuve ']], ['id' => 'widow', 'name' => ['en' => 'widow', 'fr' => 'veuf veuve ']],

View File

@ -90,9 +90,9 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
protected NativeLoader $loader; protected NativeLoader $loader;
private $genders = [Person::MALE_GENDER, Person::FEMALE_GENDER, Person::BOTH_GENDER]; private array $genders = [Person::MALE_GENDER, Person::FEMALE_GENDER, Person::BOTH_GENDER];
private $peoples = [ private array $peoples = [
[ [
'lastName' => 'Depardieu', 'lastName' => 'Depardieu',
'firstName' => 'Gérard', 'firstName' => 'Gérard',

View File

@ -23,7 +23,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
*/ */
class Configuration implements ConfigurationInterface class Configuration implements ConfigurationInterface
{ {
private $validationBirthdateNotAfterInfos = 'The period before today during which' private string $validationBirthdateNotAfterInfos = 'The period before today during which'
. ' any birthdate is not allowed. The birthdate is expressed as ISO8601 : ' . ' any birthdate is not allowed. The birthdate is expressed as ISO8601 : '
. 'https://en.wikipedia.org/wiki/ISO_8601#Durations'; . 'https://en.wikipedia.org/wiki/ISO_8601#Durations';

View File

@ -40,20 +40,14 @@ abstract class AddressPart extends FunctionNode
'country_id', 'country_id',
]; ];
/** private \Doctrine\ORM\Query\AST\Node|string|null $date = null;
* @var \Doctrine\ORM\Query\AST\Node
*/
private $date;
/** /**
* @var \Doctrine\ORM\Query\AST\Node * @var \Doctrine\ORM\Query\AST\Node
*/ */
private $part; private $part;
/** private ?\Doctrine\ORM\Query\AST\PathExpression $pid = null;
* @var \Doctrine\ORM\Query\AST\Node
*/
private $pid;
/** /**
* return the part of the address. * return the part of the address.

View File

@ -226,12 +226,11 @@ class AccompanyingPeriod implements
private ?int $id = null; private ?int $id = null;
/** /**
* @var string
* @ORM\Column(type="string", nullable=true) * @ORM\Column(type="string", nullable=true)
* @Groups({"read"}) * @Groups({"read"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED}) * @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
*/ */
private $intensity = self::INTENSITY_OCCASIONAL; private string $intensity = self::INTENSITY_OCCASIONAL;
/** /**
* @ORM\ManyToOne( * @ORM\ManyToOne(
@ -597,8 +596,6 @@ class AccompanyingPeriod implements
* *
* Search for the person's participation and set the end date at * Search for the person's participation and set the end date at
* 'now'. * 'now'.
*
* @param mixed $person
*/ */
public function closeParticipationFor(mixed $person): ?AccompanyingPeriodParticipation public function closeParticipationFor(mixed $person): ?AccompanyingPeriodParticipation
{ {
@ -1241,7 +1238,6 @@ class AccompanyingPeriod implements
* *
* For closing a Person file, you should use Person::setClosed instead. * For closing a Person file, you should use Person::setClosed instead.
* *
* @param mixed $closingDate
* *
* @return AccompanyingPeriod * @return AccompanyingPeriod
*/ */

View File

@ -34,7 +34,7 @@ class AccompanyingPeriodWorkGoal
/** /**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals") * @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals")
*/ */
private $accompanyingPeriodWork; private ?\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork $accompanyingPeriodWork = null;
/** /**
* @ORM\ManyToOne(targetEntity=Goal::class) * @ORM\ManyToOne(targetEntity=Goal::class)

View File

@ -216,54 +216,49 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* Array where customfield's data are stored. * Array where customfield's data are stored.
* *
* @var array
* *
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $cFData; private ?array $cFData = null;
/** /**
* The marital status of the person. * The marital status of the person.
* *
* @var Civility
* *
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Civility") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Civility")
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $civility; private ?\Chill\MainBundle\Entity\Civility $civility = null;
/** /**
* Contact information for contacting the person. * Contact information for contacting the person.
* *
* @var string
* *
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", nullable=true)
*/ */
private $contactInfo = ''; private string $contactInfo = '';
/** /**
* The person's country of birth. * The person's country of birth.
* *
* @var Country
* *
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
* *
* sf4 check: option inversedBy="birthsIn" return error mapping !! * sf4 check: option inversedBy="birthsIn" return error mapping !!
*
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $countryOfBirth; private ?\Chill\MainBundle\Entity\Country $countryOfBirth = null;
/** /**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL}) * @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
*/ */
private $createdAt; private ?\DateTimeInterface $createdAt = null;
/** /**
* @ORM\ManyToOne(targetEntity=User::class) * @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $createdBy; private ?\Chill\MainBundle\Entity\User $createdBy = null;
/** /**
* Cache the computation of household. * Cache the computation of household.
@ -299,14 +294,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's email. * The person's email.
* *
* @var string
* *
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", nullable=true)
* @Assert\Email( * @Assert\Email(
* checkMX=true * checkMX=true
* ) * )
*/ */
private $email = ''; private string $email = '';
/** /**
* The person's first name. * The person's first name.
@ -330,12 +324,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's gender. * The person's gender.
* *
* @var string
* *
* @ORM\Column(type="string", length=9, nullable=true) * @ORM\Column(type="string", length=9, nullable=true)
* @Assert\NotNull(message="The gender must be set") * @Assert\NotNull(message="The gender must be set")
*/ */
private $gender; private ?string $gender = null;
/** /**
* Comment on gender. * Comment on gender.
@ -388,12 +381,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The marital status of the person. * The marital status of the person.
* *
* @var MaritalStatus
* *
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\MaritalStatus") * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\MaritalStatus")
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $maritalStatus; private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null;
/** /**
* Comment on marital status. * Comment on marital status.
@ -415,11 +407,10 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* A remark over the person. * A remark over the person.
* *
* @var string
* *
* @ORM\Column(type="text") * @ORM\Column(type="text")
*/ */
private $memo = ''; // TO-CHANGE in remark private string $memo = ''; // TO-CHANGE in remark
/** /**
* The person's mobile phone number. * The person's mobile phone number.
@ -432,15 +423,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's nationality. * The person's nationality.
* *
* @var Country
* *
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
* *
* sf4 check: option inversedBy="nationals" return error mapping !! * sf4 check: option inversedBy="nationals" return error mapping !!
*
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
*/ */
private $nationality; private ?\Chill\MainBundle\Entity\Country $nationality = null;
/** /**
* Number of children. * Number of children.
@ -488,20 +477,17 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's place of birth. * The person's place of birth.
* *
* @var string
* *
* @ORM\Column(type="string", length=255, name="place_of_birth") * @ORM\Column(type="string", length=255, name="place_of_birth")
*/ */
private $placeOfBirth = ''; private string $placeOfBirth = '';
/** /**
* @var bool
* *
* @deprecated * @deprecated
*
* @ORM\Column(type="boolean") * @ORM\Column(type="boolean")
*/ */
private $proxyAccompanyingPeriodOpenState = false; //TO-DELETE ? private bool $proxyAccompanyingPeriodOpenState = false; //TO-DELETE ?
/** /**
* @ORM\OneToMany(targetEntity=PersonResource::class, mappedBy="personOwner") * @ORM\OneToMany(targetEntity=PersonResource::class, mappedBy="personOwner")
@ -527,14 +513,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL}) * @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
*/ */
private $updatedAt; private ?\DateTimeInterface $updatedAt = null;
/** /**
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity=User::class * targetEntity=User::class
* ) * )
*/ */
private $updatedBy; private ?\Chill\MainBundle\Entity\User $updatedBy = null;
/** /**
* Person constructor. * Person constructor.

View File

@ -48,14 +48,12 @@ class PersonAltName
private $label; private $label;
/** /**
* @var Person
*
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity="Chill\PersonBundle\Entity\Person", * targetEntity="Chill\PersonBundle\Entity\Person",
* inversedBy="altNames" * inversedBy="altNames"
* ) * )
*/ */
private $person; private ?\Chill\PersonBundle\Entity\Person $person = null;
/** /**
* Get id. * Get id.

View File

@ -24,10 +24,9 @@ use Doctrine\ORM\Mapping as ORM;
class PersonNotDuplicate class PersonNotDuplicate
{ {
/** /**
* @var DateTime
* @ORM\Column(type="datetime") * @ORM\Column(type="datetime")
*/ */
private $date; private \DateTime $date;
/** /**
* The person's id. * The person's id.
@ -41,25 +40,19 @@ class PersonNotDuplicate
private $id; private $id;
/** /**
* @var Person
*
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/ */
private $person1; private ?\Chill\PersonBundle\Entity\Person $person1 = null;
/** /**
* @var Person
*
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/ */
private $person2; private ?\Chill\PersonBundle\Entity\Person $person2 = null;
/** /**
* @var User
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/ */
private $user; private ?\Chill\MainBundle\Entity\User $user = null;
public function __construct() public function __construct()
{ {

View File

@ -32,7 +32,7 @@ class Goal
/** /**
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private $desactivationDate; private ?\DateTimeInterface $desactivationDate = null;
/** /**
* @ORM\Id * @ORM\Id

View File

@ -40,12 +40,12 @@ class SocialAction
/** /**
* @ORM\Column(type="dateinterval", nullable=true) * @ORM\Column(type="dateinterval", nullable=true)
*/ */
private $defaultNotificationDelay; private ?\DateInterval $defaultNotificationDelay = null;
/** /**
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private $desactivationDate; private ?\DateTimeInterface $desactivationDate = null;
/** /**
* @var Collection<Evaluation> * @var Collection<Evaluation>
@ -71,7 +71,7 @@ class SocialAction
/** /**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions") * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions")
*/ */
private $issue; private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $issue = null;
/** /**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0}) * @ORM\Column(type="float", name="ordering", options={"default": 0.0})
@ -81,7 +81,7 @@ class SocialAction
/** /**
* @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children") * @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children")
*/ */
private $parent; private ?\Chill\PersonBundle\Entity\SocialWork\SocialAction $parent = null;
/** /**
* @var Collection<Result> * @var Collection<Result>
@ -93,7 +93,7 @@ class SocialAction
/** /**
* @ORM\Column(type="json") * @ORM\Column(type="json")
*/ */
private $title = []; private array $title = [];
public function __construct() public function __construct()
{ {

View File

@ -36,7 +36,7 @@ class SocialIssue
/** /**
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private $desactivationDate; private ?\DateTimeInterface $desactivationDate = null;
/** /**
* @ORM\Id * @ORM\Id
@ -53,7 +53,7 @@ class SocialIssue
/** /**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children") * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children")
*/ */
private $parent; private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $parent = null;
/** /**
* @var Collection<SocialAction> * @var Collection<SocialAction>
@ -65,7 +65,7 @@ class SocialIssue
* @ORM\Column(type="json") * @ORM\Column(type="json")
* @Groups({"read"}) * @Groups({"read"})
*/ */
private $title = []; private array $title = [];
public function __construct() public function __construct()
{ {

View File

@ -48,7 +48,7 @@ use function uniqid;
*/ */
class ListPerson implements ExportElementValidatedInterface, ListInterface, GroupedExportInterface class ListPerson implements ExportElementValidatedInterface, ListInterface, GroupedExportInterface
{ {
private $slugs = []; private array $slugs = [];
public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CustomFieldProvider $customFieldProvider, private readonly ListPersonHelper $listPersonHelper, private readonly EntityManagerInterface $entityManager, private readonly TranslatableStringHelper $translatableStringHelper) public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CustomFieldProvider $customFieldProvider, private readonly ListPersonHelper $listPersonHelper, private readonly EntityManagerInterface $entityManager, private readonly TranslatableStringHelper $translatableStringHelper)
{ {

View File

@ -46,10 +46,7 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
{ {
final public const PERSON_PRIVACY_EVENT = 'chill_person.privacy_event'; final public const PERSON_PRIVACY_EVENT = 'chill_person.privacy_event';
/** private array $persons = [];
* @var array
*/
private $persons = [];
/** /**
* PrivacyEvent constructor. * PrivacyEvent constructor.

View File

@ -33,22 +33,16 @@ final class PersonControllerUpdateTest extends WebTestCase
/** /**
* @var string The url using for editing the person's information * @var string The url using for editing the person's information
*/ */
private $editUrl; private string $editUrl;
/** private ?object $em = null;
* @var \Doctrine\ORM\EntityManagerInterface The entity manager
*/
private $em;
/** private ?\Chill\PersonBundle\Entity\Person $person = null;
* @var Person The person on which the test is executed
*/
private $person;
/** /**
* @var string The url using for seeing the person's information * @var string The url using for seeing the person's information
*/ */
private $viewUrl; private string $viewUrl;
/** /**
* Prepare client and create a random person. * Prepare client and create a random person.

View File

@ -30,22 +30,16 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
/** /**
* @var string The url using for editing the person's information * @var string The url using for editing the person's information
*/ */
private $editUrl; private string $editUrl;
/** private ?object $em = null;
* @var \Doctrine\ORM\EntityManagerInterface The entity manager
*/
private $em;
/** private ?\Chill\PersonBundle\Entity\Person $person = null;
* @var Person The person on which the test is executed
*/
private $person;
/** /**
* @var string The url using for seeing the person's information * @var string The url using for seeing the person's information
*/ */
private $viewUrl; private string $viewUrl;
/** /**
* Prepare client and create a random person. * Prepare client and create a random person.

View File

@ -20,20 +20,14 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/ */
final class PersonControllerViewTest extends WebTestCase final class PersonControllerViewTest extends WebTestCase
{ {
/** private ?object $em = null;
* @var \Doctrine\ORM\EntityManagerInterface The entity manager
*/
private $em;
/** private ?\Chill\PersonBundle\Entity\Person $person = null;
* @var Person A person used on which to run the test
*/
private $person;
/** /**
* @var string The url to view the person details * @var string The url to view the person details
*/ */
private $viewUrl; private string $viewUrl;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -20,20 +20,14 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/ */
final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase
{ {
/** private ?object $em = null;
* @var \Doctrine\ORM\EntityManagerInterface The entity manager
*/
private $em;
/** private ?\Chill\PersonBundle\Entity\Person $person = null;
* @var Person A person used on which to run the test
*/
private $person;
/** /**
* @var string The url to view the person details * @var string The url to view the person details
*/ */
private $viewUrl; private string $viewUrl;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -24,7 +24,7 @@ final class CountPersonTest extends AbstractExportTest
/** /**
* @var * @var
*/ */
private $export; private ?object $export = null;
protected function setUp(): void protected function setUp(): void
{ {

View File

@ -20,7 +20,7 @@ use Doctrine\Migrations\AbstractMigration;
*/ */
final class Version20210326113045 extends AbstractMigration final class Version20210326113045 extends AbstractMigration
{ {
private $datas = []; private array $datas = [];
/** /**
* The distinct clause makes that for each group of duplicates, it keeps only the first row in the returned result set. * The distinct clause makes that for each group of duplicates, it keeps only the first row in the returned result set.

Some files were not shown because too many files have changed in this diff Show More