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

Update symplify/coding-standard requirement from ^0.1 to ^0.1 || ^1.0 #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
27 changes: 15 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm

#matrix:
# allow_failures:
# - php: 7.0
# - php: hhvm
# include:
# - php: 7.0
# env: PHPUNIT_FLAGS="--coverage-clover coverage.clover" CHECK_CS=true
matrix:
allow_failures:
- php: 7.0
- php: 7.1
- php: hhvm
include:
- php: 7.0
- php: 7.1
env: PHPUNIT_FLAGS="--coverage-clover coverage.clover" CHECK_CS=true

before_script:
- composer self-update
- composer install --no-interaction --prefer-source

#script:
# - phpunit $PHPUNIT_FLAGS
# - if [[ "$CHECK_CS" != "" ]]; then vendor/bin/symplify-cs check src tests; fi
script:
- phpunit $PHPUNIT_FLAGS
- if [[ "$CHECK_CS" != "" ]]; then vendor/bin/symplify-cs check src tests; fi

#after_script:
# - if [[ "$PHPUNIT_FLAGS" != "" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
after_script:
- if [[ "$PHPUNIT_FLAGS" != "" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"fabpot/goutte": "^2.0|^3.0"
},
"require-dev": {
"symplify/coding-standard": "^0.1"
"symplify/coding-standard": "^0.1 || ^1.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 5 additions & 3 deletions src/Ares.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ public function findByIdentificationNumber($id)
} else {
$record->setStreetHouseNumber(strval($elements->AA->CD));
}

if (strval($elements->AA->NCO)) {
$record->setTown(strval($elements->AA->N.' - '.strval($elements->AA->NCO)));

if (strval($elements->AA->N) == "Praha") { //Praha
$record->setTown(strval($elements->AA->NMC) ." - ". strval($elements->AA->NCO));
} elseif(strval($elements->AA->NCO) != strval($elements->AA->N)) { //Ostrava
$record->setTown(strval($elements->AA->N) ." - ". strval($elements->AA->NCO));
} else {
$record->setTown(strval($elements->AA->N));
}
Expand Down