mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 17:15:02 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -16,9 +16,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route("/{_locale}/admin/budget", name="chill_admin_budget")
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/budget', name: 'chill_admin_budget')]
|
||||
public function indexAdminAction()
|
||||
{
|
||||
return $this->render('@ChillBudget/Admin/index.html.twig');
|
||||
|
@@ -21,9 +21,8 @@ class ChargeController extends AbstractElementController
|
||||
{
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/delete", name="chill_budget_charge_delete")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/{id}/delete', name: 'chill_budget_charge_delete')]
|
||||
public function deleteAction(Request $request, Charge $charge)
|
||||
{
|
||||
return $this->_delete(
|
||||
@@ -36,9 +35,8 @@ class ChargeController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/edit", name="chill_budget_charge_edit")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/{id}/edit', name: 'chill_budget_charge_edit')]
|
||||
public function editAction(Request $request, Charge $charge)
|
||||
{
|
||||
return $this->_edit(
|
||||
@@ -51,9 +49,8 @@ class ChargeController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/by-person/{id}/new", name="chill_budget_charge_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/by-person/{id}/new', name: 'chill_budget_charge_new')]
|
||||
public function newAction(Request $request, Person $person)
|
||||
{
|
||||
return $this->_new(
|
||||
@@ -66,9 +63,8 @@ class ChargeController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/by-household/{id}/new", name="chill_budget_charge_household_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/by-household/{id}/new', name: 'chill_budget_charge_household_new')]
|
||||
public function newHouseholdAction(Request $request, Household $household)
|
||||
{
|
||||
return $this->_new(
|
||||
@@ -81,9 +77,8 @@ class ChargeController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/charge/{id}/view", name="chill_budget_charge_view")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/{id}/view', name: 'chill_budget_charge_view')]
|
||||
public function viewAction(Charge $charge)
|
||||
{
|
||||
return $this->_view($charge, '@ChillBudget/Charge/view.html.twig');
|
||||
|
@@ -23,9 +23,7 @@ class ElementController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) {}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-person/{id}", name="chill_budget_elements_index")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/elements/by-person/{id}', name: 'chill_budget_elements_index')]
|
||||
public function indexAction(Person $person)
|
||||
{
|
||||
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $person);
|
||||
@@ -47,9 +45,7 @@ class ElementController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-household/{id}", name="chill_budget_elements_household_index")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/elements/by-household/{id}', name: 'chill_budget_elements_household_index')]
|
||||
public function indexHouseholdAction(Household $household)
|
||||
{
|
||||
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $household);
|
||||
|
@@ -20,9 +20,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ResourceController extends AbstractElementController
|
||||
{
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/delete", name="chill_budget_resource_delete")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/{id}/delete', name: 'chill_budget_resource_delete')]
|
||||
public function deleteAction(Request $request, Resource $resource)
|
||||
{
|
||||
return $this->_delete(
|
||||
@@ -33,9 +31,7 @@ class ResourceController extends AbstractElementController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/edit", name="chill_budget_resource_edit")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/{id}/edit', name: 'chill_budget_resource_edit')]
|
||||
public function editAction(Request $request, Resource $resource): Response
|
||||
{
|
||||
return $this->_edit(
|
||||
@@ -48,9 +44,8 @@ class ResourceController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* Create a new budget element for a person.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-person/{id}/new", name="chill_budget_resource_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/by-person/{id}/new', name: 'chill_budget_resource_new')]
|
||||
public function newAction(Request $request, Person $person): Response
|
||||
{
|
||||
return $this->_new(
|
||||
@@ -63,9 +58,8 @@ class ResourceController extends AbstractElementController
|
||||
|
||||
/**
|
||||
* Create new budget element for a household.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/by-household/{id}/new", name="chill_budget_resource_household_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/by-household/{id}/new', name: 'chill_budget_resource_household_new')]
|
||||
public function newHouseholdAction(Request $request, Household $household): Response
|
||||
{
|
||||
return $this->_new(
|
||||
@@ -76,9 +70,7 @@ class ResourceController extends AbstractElementController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/resource/{id}/view", name="chill_budget_resource_view")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/{id}/view', name: 'chill_budget_resource_view')]
|
||||
public function viewAction(Resource $resource): Response
|
||||
{
|
||||
return $this->_view($resource, '@ChillBudget/Resource/view.html.twig');
|
||||
|
Reference in New Issue
Block a user