mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
phpstan, rector and cs fixes
This commit is contained in:
parent
422b6b99eb
commit
526882a5b6
@ -93,7 +93,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
{
|
||||
return match ($action) {
|
||||
'ps_situation_edit' => $this->redirectToRoute(
|
||||
'chill_crud_' .$this->getCrudName().'_personal_situation_view',
|
||||
'chill_crud_'.$this->getCrudName().'_personal_situation_view',
|
||||
['person' => $entity->getId()]
|
||||
),
|
||||
'dispositifs_edit' => $this->redirectToRoute(
|
||||
|
@ -14,7 +14,6 @@ namespace Chill\JobBundle\Controller;
|
||||
use Chill\PersonBundle\CRUD\Controller\EntityPersonCRUDController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,6 @@ namespace Chill\JobBundle\Controller;
|
||||
use Chill\PersonBundle\CRUD\Controller\EntityPersonCRUDController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,6 @@ namespace Chill\JobBundle\Controller;
|
||||
use Chill\PersonBundle\CRUD\Controller\EntityPersonCRUDController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\JobBundle\DependencyInjection;
|
||||
|
||||
use Chill\JobBundle\Controller\CSCrudReportController;
|
||||
use Chill\JobBundle\Controller\CSPersonController;
|
||||
use Chill\JobBundle\Controller\CVCrudController;
|
||||
use Chill\JobBundle\Controller\FreinCrudController;
|
||||
@ -97,7 +96,7 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface
|
||||
'delete' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Report/delete.html.twig',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
@ -122,8 +121,8 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface
|
||||
],
|
||||
'delete' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Report/delete.html.twig'
|
||||
]
|
||||
'template' => '@ChillJob/Report/delete.html.twig',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
@ -149,7 +148,7 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface
|
||||
'delete' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Report/delete.html.twig',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
@ -179,7 +178,7 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface
|
||||
'delete' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Report/delete.html.twig',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -76,7 +76,7 @@ class CV implements \Stringable
|
||||
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Formation>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
|
||||
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
|
||||
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
|
||||
private Collection $formations;
|
||||
|
||||
/**
|
||||
@ -85,7 +85,7 @@ class CV implements \Stringable
|
||||
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Experience>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
|
||||
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
|
||||
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
|
||||
private Collection $experiences;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
|
@ -43,7 +43,7 @@ class Immersion implements \Stringable
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private $person;
|
||||
private ?\Chill\PersonBundle\Entity\Person $person = null;
|
||||
|
||||
/**
|
||||
* @Assert\NotNull()
|
||||
@ -125,7 +125,7 @@ class Immersion implements \Stringable
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\Column(name: 'debutDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $debutDate = null;
|
||||
private ?\DateTime $debutDate = null;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
@ -488,11 +488,9 @@ class Immersion implements \Stringable
|
||||
/**
|
||||
* Set debutDate.
|
||||
*
|
||||
* @param \DateTime|null $debutDate
|
||||
*
|
||||
* @return Immersion
|
||||
*/
|
||||
public function setDebutDate(?\DateTimeInterface $debutDate = null)
|
||||
public function setDebutDate(?\DateTime $debutDate = null)
|
||||
{
|
||||
$this->debutDate = $debutDate;
|
||||
|
||||
@ -502,7 +500,7 @@ class Immersion implements \Stringable
|
||||
/**
|
||||
* Get debutDate.
|
||||
*
|
||||
* @return \DateTimeInterface
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDebutDate()
|
||||
{
|
||||
@ -526,11 +524,11 @@ class Immersion implements \Stringable
|
||||
/**
|
||||
* Get duration.
|
||||
*
|
||||
* @return string|null
|
||||
* @return \DateInterval
|
||||
*/
|
||||
public function getDuration()
|
||||
{
|
||||
return $this->duration;
|
||||
return new \DateInterval($this->duration);
|
||||
}
|
||||
|
||||
public function getDateEndComputed()
|
||||
|
@ -36,7 +36,7 @@ class ProjetProfessionnel implements \Stringable
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private $person;
|
||||
private ?\Chill\PersonBundle\Entity\Person $person = null;
|
||||
|
||||
/**
|
||||
* @Assert\NotNull()
|
||||
|
@ -60,9 +60,9 @@ class MenuBuilder implements LocalMenuBuilderInterface
|
||||
'person' => $person->getId(),
|
||||
],
|
||||
])
|
||||
->setExtras([
|
||||
'order' => 52,
|
||||
]);
|
||||
->setExtras([
|
||||
'order' => 52,
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@ -15,7 +15,6 @@ use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Chill\JobBundle\Entity\Frein;
|
||||
use Chill\JobBundle\Entity\CV;
|
||||
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Chill\JobBundle\Entity\ProjetProfessionnel;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\Migrations\Job;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\Migrations\Job;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
Loading…
x
Reference in New Issue
Block a user