diff --git a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php index 9f0c59784..b205384e6 100644 --- a/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php +++ b/src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php @@ -25,10 +25,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface { use \Symfony\Component\DependencyInjection\ContainerAwareTrait; - /** - * @var \Faker\Generator - */ - private $faker; + private readonly \Faker\Generator $faker; public function __construct(private readonly EntityManagerInterface $em) { diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php index 1bae408dc..0522d5037 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php @@ -25,10 +25,9 @@ use Doctrine\ORM\Mapping as ORM; class ActivityReasonCategory implements \Stringable { /** - * @var bool * @ORM\Column(type="boolean") */ - private $active = true; + private bool $active = true; /** * @var int @@ -122,11 +121,9 @@ class ActivityReasonCategory implements \Stringable * as unactive, all the reason have this entity as category is also * set as unactive. * - * @param bool $active - * * @return ActivityReasonCategory */ - public function setActive($active) + public function setActive(bool $active) { if ($this->active !== $active && !$active) { foreach ($this->reasons as $reason) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 3dc205f09..ec318f413 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -34,7 +34,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\Column(type="datetime") */ - private $createdAt; + private ?\DateTimeInterface $createdAt = null; /** * @ORM\ManyToOne(targetEntity=User::class) @@ -45,7 +45,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\Column(type="datetime") */ - private $date; + private ?\DateTimeInterface $date = null; /** * @ORM\Column(type="time", nullable=true) @@ -62,23 +62,23 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\Column(type="string", length=100, nullable=true) */ - private $location; + private ?string $location = null; /** * @ORM\Column(type="text", nullable=true) */ - private $note; + private ?string $note = null; /** * @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities") * @ORM\JoinColumn(nullable=false) */ - private $type; + private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null; /** * @ORM\Column(type="datetime", nullable=true) */ - private $updatedAt; + private ?\DateTimeInterface $updatedAt = null; /** * @ORM\ManyToOne(targetEntity=User::class) diff --git a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php index 5d4a8b3a4..4f057a939 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php @@ -21,12 +21,9 @@ use Symfony\Component\HttpFoundation\Request; class ChargeController extends AbstractElementController { /** - * @Route( - * "{_locale}/budget/charge/{id}/delete", - * name="chill_budget_charge_delete" - * ) * * @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) { @@ -39,12 +36,9 @@ class ChargeController extends AbstractElementController } /** - * @Route( - * "{_locale}/budget/charge/{id}/edit", - * name="chill_budget_charge_edit" - * ) * * @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) { @@ -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 + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/by-person/{id}/new", name="chill_budget_charge_new") */ 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 + * @\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) { @@ -93,12 +81,9 @@ class ChargeController extends AbstractElementController } /** - * @Route( - * "{_locale}/budget/charge/{id}/view", - * name="chill_budget_charge_view" - * ) * * @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) { diff --git a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php index c949342b9..fdaae0163 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php @@ -36,10 +36,7 @@ class ElementController extends AbstractController } /** - * @Route( - * "{_locale}/budget/elements/by-person/{id}", - * name="chill_budget_elements_index" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-person/{id}", name="chill_budget_elements_index") */ public function indexAction(Person $person) { @@ -63,10 +60,7 @@ class ElementController extends AbstractController } /** - * @Route( - * "{_locale}/budget/elements/by-household/{id}", - * name="chill_budget_elements_household_index" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-household/{id}", name="chill_budget_elements_household_index") */ public function indexHouseholdAction(Household $household) { diff --git a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php index e7f1e9ff3..eb02c3635 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php @@ -22,10 +22,7 @@ use Symfony\Component\HttpFoundation\Response; class ResourceController extends AbstractElementController { /** - * @Route( - * "{_locale}/budget/resource/{id}/delete", - * name="chill_budget_resource_delete" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/delete", name="chill_budget_resource_delete") */ public function deleteAction(Request $request, Resource $resource) { @@ -38,10 +35,7 @@ class ResourceController extends AbstractElementController } /** - * @Route( - * "{_locale}/budget/resource/{id}/edit", - * name="chill_budget_resource_edit" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/edit", name="chill_budget_resource_edit") */ public function editAction(Request $request, Resource $resource): Response { @@ -56,10 +50,7 @@ class ResourceController extends AbstractElementController /** * Create a new budget element for a person. * - * @Route( - * "{_locale}/budget/resource/by-person/{id}/new", - * name="chill_budget_resource_new" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-person/{id}/new", name="chill_budget_resource_new") */ public function newAction(Request $request, Person $person): Response { @@ -74,10 +65,7 @@ class ResourceController extends AbstractElementController /** * Create new budget element for a household. * - * @Route( - * "{_locale}/budget/resource/by-household/{id}/new", - * name="chill_budget_resource_household_new" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-household/{id}/new", name="chill_budget_resource_household_new") */ public function newHouseholdAction(Request $request, Household $household): Response { @@ -90,10 +78,7 @@ class ResourceController extends AbstractElementController } /** - * @Route( - * "{_locale}/budget/resource/{id}/view", - * name="chill_budget_resource_view" - * ) + * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/view", name="chill_budget_resource_view") */ public function viewAction(Resource $resource): Response { diff --git a/src/Bundle/ChillBudgetBundle/Entity/Charge.php b/src/Bundle/ChillBudgetBundle/Entity/Charge.php index 50602e849..6040cb328 100644 --- a/src/Bundle/ChillBudgetBundle/Entity/Charge.php +++ b/src/Bundle/ChillBudgetBundle/Entity/Charge.php @@ -46,10 +46,9 @@ class Charge extends AbstractElement implements HasCentersInterface private ?ChargeKind $charge = null; /** - * @var string * @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") diff --git a/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php index 3c4d80c94..c8be951fe 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php +++ b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php @@ -29,12 +29,12 @@ class CancelReason /** * @ORM\Column(type="boolean") */ - private $active; + private ?bool $active = null; /** * @ORM\Column(type="string", length=255) */ - private $canceledBy; + private ?string $canceledBy = null; /** * @ORM\Id @@ -46,7 +46,7 @@ class CancelReason /** * @ORM\Column(type="json") */ - private $name = []; + private array $name = []; public function getActive(): ?bool { diff --git a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php index 5b2598ab7..8b827b535 100644 --- a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php +++ b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php @@ -37,7 +37,7 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface */ public $fakerNl; - private $counter = 0; + private int $counter = 0; public function __construct() { diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php index 06aeb9f4f..4c466d20e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php @@ -27,20 +27,16 @@ class CustomField final public const ONE_TO_ONE = 1; /** - * @var bool - * * @ORM\Column(type="boolean") */ - private $active = true; + private bool $active = true; /** - * @var CustomFieldsGroup - * * @ORM\ManyToOne( * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup", * inversedBy="customFields") */ - private $customFieldGroup; + private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null; /** * @var int @@ -59,11 +55,9 @@ class CustomField private $name; /** - * @var array - * * @ORM\Column(type="json") */ - private $options = []; + private array $options = []; /** * @var float @@ -73,11 +67,9 @@ class CustomField private $ordering; /** - * @var bool - * * @ORM\Column(type="boolean") */ - private $required = false; + private false $required = false; /** * @var string diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php index 39eb7a153..92d228659 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice; +use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; @@ -22,10 +23,9 @@ use Doctrine\ORM\Mapping as ORM; class Option { /** - * @var bool * @ORM\Column(type="boolean") */ - private $active = true; + private bool $active = true; /** * @var Collection