Skip to content

Commit

Permalink
correction import
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitLeveque committed Jan 6, 2024
1 parent c461de7 commit 8206519
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Campaign/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public function createResponse(array $data, Campaign $campaign): Response
$enumClass = $this->enums->getEnums($enum['class']);
$enumId = $enumClass->getIdByLabel($data[$enum['key']] ?? null);

if ($enumClass instanceof JobTitleEnums && null === $enumId) {
$enumId = $enumClass->oldChoices[$data[$enum['key']]] ?? null;
if ($enumClass instanceof JobTitleEnums && 0 === $enumId) {
$enumId = $enumClass->oldChoices[$data[$enum['key']]] ?? 0;
}

if ($enumClass instanceof PHPVersionEnums && 'PHP 5.6 ou inférieur' === $data[$enum['key']]) {
Expand Down
22 changes: 11 additions & 11 deletions src/Enums/JobTitleEnums.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class JobTitleEnums extends AbstractEnums
];

public array $oldChoices = [
self::DIRECTEUR => 'Directeur, cadre dirigeant',
self::RESPONSABLE_EQUIPE => "Cadre intermédiaire, responsable d'équipe",
self::CHEF_PROJET => 'Chef de projet',
self::LEAD_DEVELOPPEUR => 'Lead développeur',
self::ARCHITECTE => 'Architecte',
self::CONSULTANT => 'Consultant',
self::FORMATEUR => 'Formateur',
self::DEVELOPPEUR => 'Développeur',
self::SYSADMIN => 'Sysadmin',
self::DEVOPS => 'Devops',
self::AUTRE => 'Autre',
'Directeur, cadre dirigeant' => self::DIRECTEUR,
"Cadre intermédiaire, responsable d'équipe" => self::RESPONSABLE_EQUIPE,
'Chef de projet' => self::CHEF_PROJET,
'Lead développeur' => self::LEAD_DEVELOPPEUR,
'Architecte' => self::ARCHITECTE,
'Consultant' => self::CONSULTANT,
'Formateur' => self::FORMATEUR,
'Développeur' => self::DEVELOPPEUR,
'Sysadmin' => self::SYSADMIN,
'Devops' => self::DEVOPS,
'Autre' => self::AUTRE,
];
}
5 changes: 5 additions & 0 deletions src/Report/WorkMethodReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ public function execute()

$this->data = $this->queryBuilder->fetchAllAssociative();
}

public function getWeight()
{
return null;
}
}

0 comments on commit 8206519

Please sign in to comment.