@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | { |
| 145 | 145 | $this->data->court_all = null; |
| 146 | 146 | if ($this->data->file_number !== null && $this->data->court !== null) { |
| 147 | - $this->data->court_all = $this->data->file_number . ', ' . $this->data->court; |
|
| 147 | + $this->data->court_all = $this->data->file_number.', '.$this->data->court; |
|
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function setHouseNumber(string $cd, string $co, string $ca) |
| 191 | 191 | { |
| 192 | - $houseNumber = self::toNull(trim($cd . '/' . $co, '/')); |
|
| 192 | + $houseNumber = self::toNull(trim($cd.'/'.$co, '/')); |
|
| 193 | 193 | if ($houseNumber === null) { |
| 194 | 194 | $houseNumber = self::toNull($ca); |
| 195 | 195 | } |
@@ -202,7 +202,7 @@ |
||
| 202 | 202 | */ |
| 203 | 203 | public function setTIN(string $s) |
| 204 | 204 | { |
| 205 | - $tin = self::toNull($s); |
|
| 205 | + $tin = self::toNull($s); |
|
| 206 | 206 | $this->data->tin = $tin === 'Skupinove_DPH' ? null : $tin; |
| 207 | 207 | $this->data->vat_payer = (bool) $tin; |
| 208 | 208 | |
@@ -109,8 +109,8 @@ |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | $addr->street = $nu === '' ? $nco : $nu; |
| 112 | - $addr->house = isset($address->CO) ? trim($cd . '/' . $address->CO, '/') : $cd; |
|
| 113 | - $addr->city = isset($nco) ? $address->N . ' - ' . $nco : $address->N; |
|
| 112 | + $addr->house = isset($address->CO) ? trim($cd.'/'.$address->CO, '/') : $cd; |
|
| 113 | + $addr->city = isset($nco) ? $address->N.' - '.$nco : $address->N; |
|
| 114 | 114 | |
| 115 | 115 | $address->optional = $addr; |
| 116 | 116 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | private static function fixContent(\stdClass $data): void |
| 50 | 50 | { |
| 51 | - self::walk($data->Vypis_OR, function ($value) { |
|
| 51 | + self::walk($data->Vypis_OR, function($value) { |
|
| 52 | 52 | return Strings::replace(trim($value), '/ {2,}/', ' '); |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | return; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - array_walk($value, function (&$value) use ($callback) { |
|
| 84 | + array_walk($value, function(&$value) use ($callback) { |
|
| 85 | 85 | if (is_string($value)) { |
| 86 | 86 | $value = ($callback)($value); |
| 87 | 87 | |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | class AresRequestProvider |
| 13 | 13 | { |
| 14 | 14 | private const BASE_URL = 'https://wwwinfo.mfcr.cz/cgi-bin/ares'; |
| 15 | - protected const ONE_IN = self::BASE_URL . '/darv_bas.cgi'; |
|
| 16 | - protected const ONE_BL = self::BASE_URL . '/darv_or.cgi'; |
|
| 17 | - protected const MULTI_IN = self::BASE_URL . '/xar.cgi'; |
|
| 15 | + protected const ONE_IN = self::BASE_URL.'/darv_bas.cgi'; |
|
| 16 | + protected const ONE_BL = self::BASE_URL.'/darv_or.cgi'; |
|
| 17 | + protected const MULTI_IN = self::BASE_URL.'/xar.cgi'; |
|
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | public function __construct( |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | 'ico' => $in, |
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | - $url = self::ONE_BL . '?' . http_build_query($parameters); |
|
| 38 | + $url = self::ONE_BL.'?'.http_build_query($parameters); |
|
| 39 | 39 | |
| 40 | 40 | return $this->xmlResponse($url, $in); |
| 41 | 41 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'aktivni' => 'false', |
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | - $url = self::ONE_IN . '?' . http_build_query($parameters); |
|
| 54 | + $url = self::ONE_IN.'?'.http_build_query($parameters); |
|
| 55 | 55 | |
| 56 | 56 | return $this->xmlResponse($url, $in); |
| 57 | 57 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $content .= "<Dotaz><Pomocne_ID>$key</Pomocne_ID><ICO>$in</ICO></Dotaz>"; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - return $content . '</are:Ares_dotazy>'; |
|
| 122 | + return $content.'</are:Ares_dotazy>'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | |
| 23 | - public function xmlResponse(RequestInterface|string $url): \SimpleXMLElement |
|
| 23 | + public function xmlResponse(RequestInterface | string $url): \SimpleXMLElement |
|
| 24 | 24 | { |
| 25 | 25 | $request = $url instanceof RequestInterface ? $url : $this->createRequest($url); |
| 26 | 26 | try { |
@@ -2,22 +2,22 @@ |
||
| 2 | 2 | |
| 3 | 3 | // keep up to v3.0 |
| 4 | 4 | namespace h4kuna\Ares\Data { |
| 5 | - if (false) { |
|
| 6 | - /** @deprecated use h4kuna\Ares\Basic\Data */ |
|
| 7 | - class Data |
|
| 8 | - { |
|
| 9 | - } |
|
| 5 | + if (false) { |
|
| 6 | + /** @deprecated use h4kuna\Ares\Basic\Data */ |
|
| 7 | + class Data |
|
| 8 | + { |
|
| 9 | + } |
|
| 10 | 10 | |
| 11 | - /** @deprecated use h4kuna\Ares\Basic\SubjectFlag */ |
|
| 12 | - class SubjectFlag |
|
| 13 | - { |
|
| 14 | - } |
|
| 15 | - } |
|
| 11 | + /** @deprecated use h4kuna\Ares\Basic\SubjectFlag */ |
|
| 12 | + class SubjectFlag |
|
| 13 | + { |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | namespace { |
| 19 | - use h4kuna\Ares; |
|
| 20 | - class_alias(Ares\Basic\Data::class, 'h4kuna\Ares\Data\Data'); |
|
| 21 | - class_alias(Ares\Basic\SubjectFlag::class, 'h4kuna\Ares\Data\SubjectFlag'); |
|
| 19 | + use h4kuna\Ares; |
|
| 20 | + class_alias(Ares\Basic\Data::class, 'h4kuna\Ares\Data\Data'); |
|
| 21 | + class_alias(Ares\Basic\SubjectFlag::class, 'h4kuna\Ares\Data\SubjectFlag'); |
|
| 22 | 22 | } |
| 23 | 23 | // -- |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | // keep up to v3.0 |
| 4 | 4 | namespace h4kuna\Ares\Data { |
@@ -13,10 +13,10 @@ |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | |
| 16 | - public function disappeared(): bool |
|
| 17 | - { |
|
| 18 | - return $this->code === 61; |
|
| 19 | - } |
|
| 16 | + public function disappeared(): bool |
|
| 17 | + { |
|
| 18 | + return $this->code === 61; |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function __construct(string $message = '', string $in = '', Throwable $previous = null) |
| 15 | 15 | { |
| 16 | - $match = Strings::match($message, '/Chyba +(?<code>\d+)/'); |
|
| 16 | + $match = Strings::match($message, '/Chyba +(?<code>\d+)/'); |
|
| 17 | 17 | |
| 18 | 18 | parent::__construct($message, intval($match['code'] ?? 0), $previous); |
| 19 | 19 | $this->in = $in; |