mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
php cs fixes
This commit is contained in:
parent
2708bafb1f
commit
2895638f3b
@ -49,7 +49,6 @@ class ApiWrapper
|
||||
return $data->access_token;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$response = $this->client->post('', [
|
||||
'query' => ['realm' => '/partenaire'],
|
||||
|
@ -81,12 +81,10 @@ class PartenaireRomeAppellation
|
||||
$this->client,
|
||||
$this->logger
|
||||
);
|
||||
|
||||
} catch (ClientException $e) {
|
||||
dump($e->getResponse()->getBody()->getContents());
|
||||
}
|
||||
|
||||
|
||||
return Utils::jsonDecode((string) $response->getBody());
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ class Immersion implements \Stringable
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private ?\Chill\PersonBundle\Entity\Person $person = null;
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @Assert\NotNull()
|
||||
@ -523,7 +523,6 @@ class Immersion implements \Stringable
|
||||
|
||||
/**
|
||||
* Get duration.
|
||||
*
|
||||
*/
|
||||
public function getDuration()
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ class ProjetProfessionnel implements \Stringable
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private ?\Chill\PersonBundle\Entity\Person $person = null;
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @Assert\NotNull()
|
||||
|
@ -24,9 +24,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class AddCSPersonToPersonListHelper implements CustomizeListPersonHelperInterface
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
private const CSPERSON_FIELDS = [
|
||||
'dateFinDernierEmploi',
|
||||
@ -82,41 +80,35 @@ class AddCSPersonToPersonListHelper implements CustomizeListPersonHelperInterfac
|
||||
|
||||
$i = 0;
|
||||
|
||||
foreach (CSPerson::RESSOURCES as $key)
|
||||
{
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.ressources, :param_$i) AS ressources__" . $key)
|
||||
foreach (CSPerson::RESSOURCES as $key) {
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.ressources, :param_{$i}) AS ressources__".$key)
|
||||
->setParameter('param_'.$i, $key);
|
||||
++$i;
|
||||
}
|
||||
|
||||
foreach(CSPerson::MOBILITE_MOYEN_TRANSPORT as $key)
|
||||
{
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.mobiliteMoyenDeTransport, :param_$i) AS moyen_transport__" . $key)
|
||||
foreach (CSPerson::MOBILITE_MOYEN_TRANSPORT as $key) {
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.mobiliteMoyenDeTransport, :param_{$i}) AS moyen_transport__".$key)
|
||||
->setParameter('param_'.$i, $key);
|
||||
++$i;
|
||||
}
|
||||
|
||||
foreach(CSPerson::TYPE_CONTRAT as $key)
|
||||
{
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.typeContrat, :param_$i) AS type_contrat__" . $key)
|
||||
foreach (CSPerson::TYPE_CONTRAT as $key) {
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.typeContrat, :param_{$i}) AS type_contrat__".$key)
|
||||
->setParameter('param_'.$i, $key);
|
||||
++$i;
|
||||
}
|
||||
|
||||
foreach (CSPerson::ACCOMPAGNEMENTS as $key)
|
||||
{
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.accompagnement, :param_$i) AS accompagnements__" . $key)
|
||||
foreach (CSPerson::ACCOMPAGNEMENTS as $key) {
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.accompagnement, :param_{$i}) AS accompagnements__".$key)
|
||||
->setParameter('param_'.$i, $key);
|
||||
++$i;
|
||||
}
|
||||
|
||||
foreach (CSPerson::PERMIS_CONDUIRE as $key)
|
||||
{
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.permisConduire, :param_$i) AS permis_conduire__" . $key)
|
||||
foreach (CSPerson::PERMIS_CONDUIRE as $key) {
|
||||
$qb->addSelect("JSONB_EXISTS_IN_ARRAY(cs_person.permisConduire, :param_{$i}) AS permis_conduire__".$key)
|
||||
->setParameter('param_'.$i, $key);
|
||||
++$i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getLabels(string $key, array $values, array $data): ?callable
|
||||
@ -126,6 +118,7 @@ class AddCSPersonToPersonListHelper implements CustomizeListPersonHelperInterfac
|
||||
return function (string|bool|null $value) use ($key): string {
|
||||
if ('_header' === $value) {
|
||||
[$domain, $v] = explode('__', $key);
|
||||
|
||||
return 'export.list.cs_person.'.$domain.'.'.$v;
|
||||
}
|
||||
|
||||
@ -136,7 +129,7 @@ class AddCSPersonToPersonListHelper implements CustomizeListPersonHelperInterfac
|
||||
return '';
|
||||
};
|
||||
case 'nEETEligibilite':
|
||||
return function (string|bool|null $value) use ($key): string {
|
||||
return function (string|bool|null $value): string {
|
||||
if ('_header' === $value) {
|
||||
return 'export.list.cs_person.neet_eligibility';
|
||||
}
|
||||
@ -148,7 +141,7 @@ class AddCSPersonToPersonListHelper implements CustomizeListPersonHelperInterfac
|
||||
return '';
|
||||
};
|
||||
case 'situationProfessionnelle':
|
||||
return function ($value) use ($key) {
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
return 'export.list.cs_person.situation_professionelle';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user