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

feat(Resolve address): use field dalsiUdaje #42

Merged
merged 1 commit into from
Nov 10, 2024
Merged

feat(Resolve address): use field dalsiUdaje #42

merged 1 commit into from
Nov 10, 2024

Conversation

h4kuna
Copy link
Owner

@h4kuna h4kuna commented Nov 8, 2024

Probléme je, že v adresa je jen z části vyplněná podle hlavního zdroje.

  • provedl jsem změnu, kde pokud není vyplněné PSČ, zkusí další možnosti
    • dříve to bylo tak, že jakákoliv složka mohla být vyplněná a bralo se to jako OK
    • v tomto případě, byl vyplněn jen stát a kód státu

Projdu field dalsiUdaje kde se koukám na pravniForma a datovyZdroj, datovyZdroj mám podle mnou definované priority ['rzp', 'res', 'vr']. V nich hledám adresy a pokud nějakou najdu, tak ji použiji.

@coveralls
Copy link

coveralls commented Nov 8, 2024

Coverage Status

coverage: 89.838% (+0.5%) from 89.294%
when pulling e6d9a52 on ic-26005492
into b15be7e on master.

if ($addressExists === false && isset($json->dalsiUdaje[0]->sidlo[0]->sidlo)) {
$addressExists = self::updateAddress($data, $json->dalsiUdaje[0]->sidlo[0]->sidlo);
if ($addressExists === false) {
$additionalData = isset($json->dalsiUdaje) ? self::prepareForAddress($json->dalsiUdaje) : [];
Copy link

@pionl pionl Nov 8, 2024

Choose a reason for hiding this comment

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

pro lepší čitelnost bych to hodil do private funkce a využil bych early returns.

@h4kuna h4kuna merged commit f3dd253 into master Nov 10, 2024
18 checks passed
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.

3 participants