mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
update php-cs-fixer and rector + fix rules
This commit is contained in:
@@ -675,8 +675,8 @@ final class ActivityController extends AbstractController
|
||||
throw $this->createNotFoundException('Accompanying Period not found');
|
||||
}
|
||||
|
||||
// TODO Add permission
|
||||
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
// TODO Add permission
|
||||
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
} else {
|
||||
throw $this->createNotFoundException('Person or Accompanying Period not found');
|
||||
}
|
||||
|
@@ -22,9 +22,8 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*/
|
||||
class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
/**
|
||||
* Creates a new ActivityReasonCategory entity.
|
||||
*
|
||||
@@ -59,7 +58,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||
@@ -82,7 +81,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll();
|
||||
$entities = $em->getRepository(ActivityReasonCategory::class)->findAll();
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -114,7 +113,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||
@@ -134,7 +133,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||
|
@@ -60,7 +60,7 @@ class ActivityReasonController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
if (null === $entity) {
|
||||
throw new NotFoundHttpException('Unable to find ActivityReason entity.');
|
||||
@@ -115,7 +115,7 @@ class ActivityReasonController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||
@@ -135,7 +135,7 @@ class ActivityReasonController extends AbstractController
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||
|
@@ -36,6 +36,7 @@ use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Context;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
|
@@ -404,7 +404,7 @@ class ActivityType extends AbstractType
|
||||
->setAllowedTypes('center', ['null', Center::class, 'array'])
|
||||
->setAllowedTypes('role', ['string'])
|
||||
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
|
||||
->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']);
|
||||
->setAllowedTypes('accompanyingPeriod', [AccompanyingPeriod::class, 'null']);
|
||||
}
|
||||
|
||||
public function getBlockPrefix(): string
|
||||
|
@@ -27,7 +27,7 @@ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
||||
/** @var Person $person */
|
||||
$person = $parameters['person'];
|
||||
|
||||
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
|
||||
|
@@ -310,7 +310,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
||||
* @return ActivityType
|
||||
*/
|
||||
private function getRandomActivityType()
|
||||
{
|
||||
|
@@ -35,7 +35,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
||||
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
||||
|
||||
$request = $this->prophesize()
|
||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
||||
->willExtend(Request::class);
|
||||
|
||||
$request->getLocale()->willReturn('fr');
|
||||
|
||||
|
@@ -58,7 +58,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
||||
|
||||
$this->assertTrue($form->isSynchronized());
|
||||
$this->assertInstanceOf(
|
||||
\Chill\ActivityBundle\Entity\ActivityType::class,
|
||||
ActivityType::class,
|
||||
$form->getData()['type'],
|
||||
'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType'
|
||||
);
|
||||
@@ -83,7 +83,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
||||
* @return ActivityType
|
||||
*/
|
||||
protected function getRandomType(mixed $active = true)
|
||||
{
|
||||
|
Reference in New Issue
Block a user