mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 20:39:40 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -34,11 +34,9 @@ class HouseholdApiController extends ApiController
|
||||
public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/person/household/by-address-reference/{id}.json",
|
||||
* name="chill_api_person_household_by_address_reference")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\JsonResponse
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/household/by-address-reference/{id}.json', name: 'chill_api_person_household_by_address_reference')]
|
||||
public function getHouseholdByAddressReference(AddressReference $addressReference): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@@ -59,10 +57,8 @@ class HouseholdApiController extends ApiController
|
||||
|
||||
/**
|
||||
* Add an address to a household.
|
||||
*
|
||||
* @Route("/api/1.0/person/household/{id}/address.{_format}", name="chill_api_single_household_address",
|
||||
* methods={"POST"}, requirements={"_format": "json"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/household/{id}/address.{_format}', name: 'chill_api_single_household_address', methods: ['POST'], requirements: ['_format' => 'json'])]
|
||||
public function householdAddressApi(Household $household, Request $request, string $_format): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
|
||||
@@ -104,15 +100,9 @@ class HouseholdApiController extends ApiController
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/person/address/suggest/by-household/{household_id}.{_format}",
|
||||
* name="chill_person_address_suggest_by_household",
|
||||
* requirements={
|
||||
* "_format": "json"
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/address/suggest/by-household/{household_id}.{_format}', name: 'chill_person_address_suggest_by_household', requirements: ['_format' => 'json'])]
|
||||
public function suggestAddressByHousehold(Household $household, string $_format)
|
||||
{
|
||||
// TODO add acl
|
||||
|
Reference in New Issue
Block a user