Skip to content

Commit

Permalink
Add support nette/utils 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
h4kuna committed Sep 18, 2023
1 parent 4a0395d commit 92b99dd
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ext-curl": "*",
"ext-json": "*",
"h4kuna/memoize": "^0.1.4",
"nette/utils": "^3.0 || ^4.0",
"nette/utils": "^2.0 || ^3.0 || ^4.0",
"psr/http-factory": "^1.0"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/Ares/Core/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class Data implements JsonSerializable, Stringable

/**
* <prefix>DIČ
* @todo how fix it, ARES incorrect data in few cases
* @todo https://github.com/h4kuna/ares/issues/30#issuecomment-1719170527
*/
public ?string $tin;

/**
* @todo how fix it, ARES incorrect data in few cases
* @todo https://github.com/h4kuna/ares/issues/30#issuecomment-1719170527
*/
public ?string $vat_id;

Expand Down
3 changes: 0 additions & 3 deletions src/Ares/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
use h4kuna\Ares\Ares\Core\SubjectType;
use h4kuna\Ares\Exceptions\InvalidStateException;
use h4kuna\Ares\Tools\Strings;
use Nette\StaticClass;
use Nette\Utils\Strings as NetteStrings;

final class Helper
{
use StaticClass;

public static string $baseUrl = 'https://ares.gov.cz/ekonomicke-subjekty-v-be/rest';

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Tools/Strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
use DateTimeImmutable;
use DateTimeInterface;
use DateTimeZone;
use Nette\StaticClass;

final class Strings
{
use StaticClass;

public static function trimNull(?string $v): ?string
{
Expand Down
3 changes: 0 additions & 3 deletions src/Tools/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@

use h4kuna\Ares\Exceptions\ServerResponseException;
use JsonException;
use Nette\StaticClass;
use Nette\Utils\Json;
use Psr\Http\Message\ResponseInterface;

final class Xml
{
use StaticClass;

public static function toJson(ResponseInterface $response): \stdClass
{
$xml = @simplexml_load_string($response->getBody()->getContents());
Expand Down

0 comments on commit 92b99dd

Please sign in to comment.