-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
8,428 additions
and
2,940 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.github export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.doc export-ignore | ||
changelog.md export-ignore | ||
tests export-ignore | ||
phpstan.neon export-ignore | ||
README.md export-ignore | ||
example export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Static Analysis (only informative) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
|
||
- run: composer install --no-progress --prefer-dist | ||
- run: composer phpstan -- --no-progress | ||
continue-on-error: true # is only informative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
composer.lock | ||
/**/output/ | ||
/vendor/ | ||
/AresRestApi-verejne.json | ||
/coverage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env php | ||
<?php declare(strict_types=1); | ||
|
||
use h4kuna\Ares; | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$IN = trim($argv[1] ?? '27082440'); | ||
|
||
$ares = (new Ares\AresFactory())->create(); | ||
try { | ||
$response = $ares->loadBasic($IN); | ||
/* @var $response Ares\Ares\Core\Data */ | ||
$response->original = null; | ||
dump($response); | ||
} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { | ||
// log identification number, why is bad? Or make nothing. | ||
} catch (Ares\Exceptions\ServerResponseException $e) { | ||
// no response from server or broken json | ||
} | ||
|
||
foreach ($response->sources as $name => $exists) { | ||
if ($exists === false || Ares\Ares\Helper::endpointExists($name) === false) { | ||
continue; | ||
} | ||
dump(Ares\Ares\Helper::prepareUrl($name, $IN)); | ||
|
||
try { | ||
$result = $ares->getAresClient()->useEndpoint($name, $IN); | ||
dump($result); | ||
} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { | ||
// log identification number, why is bad? Or make nothing. | ||
} catch (Ares\Exceptions\ServerResponseException $e) { | ||
// no response from server or broken json | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env php | ||
<?php declare(strict_types=1); | ||
|
||
use h4kuna\Ares; | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$ares = (new Ares\AresFactory())->create(); | ||
$result = $ares->getAresClient()->searchEndpoint(Ares\Ares\Sources::DIAL, [ | ||
'kodCiselniku' => 'PravniForma', | ||
'zdrojCiselniku' => 'res', | ||
])->ciselniky[0]->polozkyCiselniku; | ||
|
||
foreach ($result as $item) { | ||
dump($item); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.