From 50b926df4e2a26e37996d4247ceaccb3f624bf8b Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Sun, 19 Mar 2017 15:13:01 +0100 Subject: [PATCH 01/10] bugfix - return of town --- src/Ares.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ares.php b/src/Ares.php index 1516e27..87ed582 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -169,7 +169,7 @@ public function findByIdentificationNumber($id) $record->setStreetHouseNumber(strval($elements->AA->CD)); } - if (strval($elements->AA->NCO)) { + if (strval($elements->AA->NCO) != strval($elements->AA->N)) { $record->setTown(strval($elements->AA->N.' - '.strval($elements->AA->NCO))); } else { $record->setTown(strval($elements->AA->N)); From 446cab20b29ae220bf34e15d7435641314f41b52 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 10:56:51 +0100 Subject: [PATCH 02/10] bugfix - better return of town and district --- src/Ares.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ares.php b/src/Ares.php index 87ed582..41d690a 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -170,7 +170,7 @@ public function findByIdentificationNumber($id) } if (strval($elements->AA->NCO) != strval($elements->AA->N)) { - $record->setTown(strval($elements->AA->N.' - '.strval($elements->AA->NCO))); + $record->setTown(strval($elements->AA->NMC)); } else { $record->setTown(strval($elements->AA->N)); } From 39064cdb41f688c8ec83aeb156dab8ca4c08d9ea Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 13:02:52 +0100 Subject: [PATCH 03/10] bugfix - better return of town and district --- src/Ares.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Ares.php b/src/Ares.php index 41d690a..ff26f2a 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -62,7 +62,7 @@ class Ares public function __construct($cacheDir = null, $debug = false, $balancer = null) { if (null === $cacheDir) { - $cacheDir = sys_get_temp_dir(); + $cacheDir = '../temp'; } if (null !== $balancer) { @@ -168,9 +168,11 @@ public function findByIdentificationNumber($id) } else { $record->setStreetHouseNumber(strval($elements->AA->CD)); } - - if (strval($elements->AA->NCO) != strval($elements->AA->N)) { - $record->setTown(strval($elements->AA->NMC)); + + 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)); } From 04d95c36a3b135a1654b92b56de1842210afad42 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 13:27:55 +0100 Subject: [PATCH 04/10] - tray to fix tests for all version of PHP - added PHP 7.1 --- .travis.yml | 1 + tests/AresTest.php | 4 ++-- tests/JusticeTest.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 53fb60d..411f7be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 - hhvm #matrix: diff --git a/tests/AresTest.php b/tests/AresTest.php index 735a5c4..114e4b7 100644 --- a/tests/AresTest.php +++ b/tests/AresTest.php @@ -3,9 +3,9 @@ namespace Defr\Ares\Tests; use Defr\Ares; -use PHPUnit_Framework_TestCase; +use \PHPUnit\Framework\TestCase; -final class AresTest extends PHPUnit_Framework_TestCase +final class AresTest extends TestCase { /** * @var Ares diff --git a/tests/JusticeTest.php b/tests/JusticeTest.php index bcf7403..4bfdb91 100644 --- a/tests/JusticeTest.php +++ b/tests/JusticeTest.php @@ -4,9 +4,9 @@ use Defr\Justice; use Goutte\Client; -use PHPUnit_Framework_TestCase; +use \PHPUnit\Framework\TestCase; -final class JusticeTest extends PHPUnit_Framework_TestCase +final class JusticeTest extends TestCase { /** * @var Justice From 9f6f466ea3ba8b95cba910d48aeb9e6d53056b8e Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 13:37:39 +0100 Subject: [PATCH 05/10] tray to fix tests for all version of PHP --- tests/AresTest.php | 4 ++-- tests/JusticeTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/AresTest.php b/tests/AresTest.php index 114e4b7..735a5c4 100644 --- a/tests/AresTest.php +++ b/tests/AresTest.php @@ -3,9 +3,9 @@ namespace Defr\Ares\Tests; use Defr\Ares; -use \PHPUnit\Framework\TestCase; +use PHPUnit_Framework_TestCase; -final class AresTest extends TestCase +final class AresTest extends PHPUnit_Framework_TestCase { /** * @var Ares diff --git a/tests/JusticeTest.php b/tests/JusticeTest.php index 4bfdb91..bcf7403 100644 --- a/tests/JusticeTest.php +++ b/tests/JusticeTest.php @@ -4,9 +4,9 @@ use Defr\Justice; use Goutte\Client; -use \PHPUnit\Framework\TestCase; +use PHPUnit_Framework_TestCase; -final class JusticeTest extends TestCase +final class JusticeTest extends PHPUnit_Framework_TestCase { /** * @var Justice From beb59df57b74ed0f91520720172dc624d2d3d967 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 13:42:57 +0100 Subject: [PATCH 06/10] tray to fix tests for all version of PHP --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 411f7be..67886bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,21 +8,21 @@ php: - 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: hhvm + include: + - php: 7.0 + 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 From 8ea876a0202d7ae39477dbff208266831489676c Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 23 Mar 2017 13:47:22 +0100 Subject: [PATCH 07/10] tray to fix tests for all version of PHP --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 67886bc..d798857 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,11 @@ php: 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: From f74ffdf59b4db0be2059f6dec48706e98bf9f2ea Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Thu, 6 Apr 2017 09:18:52 +0200 Subject: [PATCH 08/10] Revert to sys_get_tmp_dir() --- src/Ares.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ares.php b/src/Ares.php index ff26f2a..caef815 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -62,7 +62,7 @@ class Ares public function __construct($cacheDir = null, $debug = false, $balancer = null) { if (null === $cacheDir) { - $cacheDir = '../temp'; + $cacheDir = sys_get_tmp_dir(); } if (null !== $balancer) { From 20815fa833d82cfadcd08b8dc3633e6b6d898a28 Mon Sep 17 00:00:00 2001 From: Dennis Fridrich Date: Thu, 6 Apr 2017 09:19:33 +0200 Subject: [PATCH 09/10] Fix a typo --- src/Ares.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ares.php b/src/Ares.php index caef815..f96ebd8 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -62,7 +62,7 @@ class Ares public function __construct($cacheDir = null, $debug = false, $balancer = null) { if (null === $cacheDir) { - $cacheDir = sys_get_tmp_dir(); + $cacheDir = sys_get_temp_dir(); } if (null !== $balancer) { From 9bdeb1ce669141a94510f6fd16ff6883fcb54c12 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2020 14:53:17 +0000 Subject: [PATCH 10/10] Update beberlei/assert requirement from ^2.4 to ^2.4 || ^3.0 Updates the requirements on [beberlei/assert](https://github.com/beberlei/assert) to permit the latest version. - [Release notes](https://github.com/beberlei/assert/releases) - [Changelog](https://github.com/beberlei/assert/blob/v3.2.7/CHANGELOG.md) - [Commits](https://github.com/beberlei/assert/compare/v2.4...v3.2.7) Signed-off-by: dependabot-preview[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1f0bc02..4e4a950 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "require": { "php": "^5.4|^7.0", - "beberlei/assert": "^2.4", + "beberlei/assert": "^2.4 || ^3.0", "dfridrich/library": "^1.0", "fabpot/goutte": "^2.0|^3.0" },