Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] La commande de maj des commune ne dépends plus des fixtures #2109

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

numew
Copy link
Collaborator

@numew numew commented Jan 12, 2024

Ticket

#2107

Description

Fix de la commande update-communes afin qu'elle ne dépende plus du DoctrineFixtureBundle

Tests

  • Lancer les fixtures make load-fixtures
  • Lancer la commande make console app="update-communes"

Copy link

sonarcloud bot commented Jan 12, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Comment on lines +16 to +23
$codeCommune = $itemCodeCommune;
$codeCommune = str_pad($codeCommune, 5, '0', \STR_PAD_LEFT);
$zipCode = substr($codeCommune, 0, 2);
if ('97' == $zipCode) {
$zipCode = substr($codeCommune, 0, 3);
}

return $zipCode;
Copy link
Collaborator

@sfinx13 sfinx13 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour le zipCode de la Corse c'est 2A et 2B voir du coté de https://github.com/MTES-MCT/histologe/blob/main/src/Service/Signalement/ZipcodeProvider.php

A moins que code Commune correspondent à code insee ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c'est bon j'ai ma réponse j'approuve

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK lecture et test !

Comment on lines +16 to +23
$codeCommune = $itemCodeCommune;
$codeCommune = str_pad($codeCommune, 5, '0', \STR_PAD_LEFT);
$zipCode = substr($codeCommune, 0, 2);
if ('97' == $zipCode) {
$zipCode = substr($codeCommune, 0, 3);
}

return $zipCode;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c'est bon j'ai ma réponse j'approuve

@sfinx13 sfinx13 merged commit 73b7e76 into main Jan 12, 2024
3 checks passed
@hmeneuvrier hmeneuvrier deleted the hotfix/2107-fix-commande-update-communes branch January 30, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants