Skip to content

Commit 89dbbd7

Browse files
committed
Add bankruptcyDate and endOfBankruptcyProceedingsDate attributes
1 parent 306807c commit 89dbbd7

File tree

240 files changed

+39123
-952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+39123
-952
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
*.ipr
66

77
### Local
8+
*.lock
9+
*.phar
10+
/backup/
11+
/vendor/

NIP24/AccountStatus.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -26,101 +26,101 @@
2626
*/
2727
class AccountStatus
2828
{
29-
public $uid;
29+
public string $uid;
3030

31-
public $type;
31+
public string $type;
3232

33-
public $valid_to;
33+
public string $valid_to;
3434

35-
public $billing_plan_name;
35+
public string $billing_plan_name;
3636

37-
public $subscription_price;
37+
public float $subscription_price;
3838

39-
public $item_price;
39+
public float $item_price;
4040

41-
public $item_price_status;
41+
public float $item_price_status;
4242

43-
public $item_price_invoice;
43+
public float $item_price_invoice;
4444

45-
public $item_price_all;
45+
public float $item_price_all;
4646

47-
public $item_price_iban;
47+
public float $item_price_iban;
4848

49-
public $item_price_whitelist;
49+
public float $item_price_whitelist;
5050

51-
public $item_price_search_vat;
51+
public float $item_price_search_vat;
5252

53-
public $item_price_krs_data;
53+
public float $item_price_krs_data;
5454

55-
public $item_price_krs_section;
55+
public float $item_price_krs_section;
5656

57-
public $limit;
57+
public int $limit;
5858

59-
public $request_delay;
59+
public int $request_delay;
6060

61-
public $domain_limit;
61+
public int $domain_limit;
6262

63-
public $overplan_allowed;
63+
public bool $overplan_allowed;
6464

65-
public $teryt_codes;
65+
public bool $teryt_codes;
6666

67-
public $excel_addin;
67+
public bool $excel_addin;
6868

69-
public $jpk_vat;
69+
public bool $jpk_vat;
7070

71-
public $cli;
71+
public bool $cli;
7272

73-
public $stats;
73+
public bool $stats;
7474

75-
public $nip_monitor;
75+
public bool $nip_monitor;
7676

77-
public $search_by_nip;
77+
public bool $search_by_nip;
7878

79-
public $search_by_regon;
79+
public bool $search_by_regon;
8080

81-
public $search_by_krs;
81+
public bool $search_by_krs;
8282

83-
public $func_is_active;
83+
public bool $func_is_active;
8484

85-
public $func_get_invoice_data;
85+
public bool $func_get_invoice_data;
8686

87-
public $func_get_all_data;
87+
public bool $func_get_all_data;
8888

89-
public $func_get_vies_data;
89+
public bool $func_get_vies_data;
9090

91-
public $func_get_vat_status;
91+
public bool $func_get_vat_status;
9292

93-
public $func_get_iban_status;
93+
public bool $func_get_iban_status;
9494

95-
public $func_get_whitelist_status;
95+
public bool $func_get_whitelist_status;
9696

97-
public $func_search_vat;
97+
public bool $func_search_vat;
9898

99-
public $func_get_krs_data;
99+
public bool $func_get_krs_data;
100100

101-
public $func_get_krs_section;
101+
public bool $func_get_krs_section;
102102

103-
public $invoice_data_count;
103+
public int $invoice_data_count;
104104

105-
public $all_data_count;
105+
public int $all_data_count;
106106

107-
public $firm_status_count;
107+
public int $firm_status_count;
108108

109-
public $vat_status_count;
109+
public int $vat_status_count;
110110

111-
public $vies_status_count;
111+
public int $vies_status_count;
112112

113-
public $iban_status_count;
113+
public int $iban_status_count;
114114

115-
public $whitelist_status_count;
115+
public int $whitelist_status_count;
116116

117-
public $search_vat_count;
117+
public int $search_vat_count;
118118

119-
public $krs_data_count;
119+
public int $krs_data_count;
120120

121-
public $krs_section_count;
121+
public int $krs_section_count;
122122

123-
public $total_count;
123+
public int $total_count;
124124

125125
/**
126126
* Get object data as string

NIP24/AllData.php

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,73 +26,77 @@
2626
*/
2727
class AllData extends InvoiceData
2828
{
29-
public $type;
29+
public string $type;
3030

31-
public $regon;
31+
public string $regon;
3232

33-
public $shortname;
33+
public string $shortname;
3434

35-
public $secondname;
35+
public string $secondname;
3636

37-
public $streetCode;
37+
public string $streetCode;
3838

39-
public $cityCode;
39+
public string $cityCode;
4040

41-
public $community;
41+
public string $community;
4242

43-
public $communityCode;
43+
public string $communityCode;
4444

45-
public $county;
45+
public string $county;
4646

47-
public $countyCode;
47+
public string $countyCode;
4848

49-
public $state;
49+
public string $state;
5050

51-
public $stateCode;
51+
public string $stateCode;
5252

53-
public $creationDate;
53+
public string $creationDate;
5454

55-
public $startDate;
55+
public string $startDate;
5656

57-
public $registrationDate;
57+
public string $registrationDate;
5858

59-
public $holdDate;
59+
public string $holdDate;
6060

61-
public $renevalDate;
61+
public string $renevalDate;
6262

63-
public $lastUpdateDate;
63+
public string $lastUpdateDate;
6464

65-
public $endDate;
65+
public string $bankruptcyDate;
6666

67-
public $deletionDate;
67+
public string $endOfBankruptcyProceedingsDate;
6868

69-
public $registryEntityCode;
69+
public string $endDate;
7070

71-
public $registryEntityName;
71+
public string $deletionDate;
7272

73-
public $registryCode;
73+
public string $registryEntityCode;
7474

75-
public $registryName;
75+
public string $registryEntityName;
7676

77-
public $recordCreationDate;
77+
public string $registryCode;
7878

79-
public $recordNumber;
79+
public string $registryName;
8080

81-
public $basicLegalFormCode;
81+
public string $recordCreationDate;
8282

83-
public $basicLegalFormName;
83+
public string $recordNumber;
8484

85-
public $specificLegalFormCode;
85+
public string $basicLegalFormCode;
8686

87-
public $specificLegalFormName;
87+
public string $basicLegalFormName;
8888

89-
public $ownershipFormCode;
89+
public string $specificLegalFormCode;
9090

91-
public $ownershipFormName;
91+
public string $specificLegalFormName;
9292

93-
public $businessPartner;
93+
public string $ownershipFormCode;
9494

95-
public $pkd;
95+
public string $ownershipFormName;
96+
97+
public array $businessPartner;
98+
99+
public array $pkd;
96100

97101
public function __construct()
98102
{
@@ -142,6 +146,8 @@ public function __toString()
142146
. ', holdDate = ' . $this->holdDate
143147
. ', renevalDate = ' . $this->renevalDate
144148
. ', lastUpdateDate = ' . $this->lastUpdateDate
149+
. ', bankruptcyDate = ' . $this->bankruptcyDate
150+
. ', endOfBankruptcyProceedingsDate = ' . $this->endOfBankruptcyProceedingsDate
145151
. ', endDate = ' . $this->endDate
146152
. ', deletionDate = ' . $this->deletionDate
147153

NIP24/BusinessPartner.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
*/
2727
class BusinessPartner
2828
{
29-
public $regon;
29+
public string $regon;
3030

31-
public $firmName;
31+
public string $firmName;
3232

33-
public $firstName;
33+
public string $firstName;
3434

35-
public $secondName;
35+
public string $secondName;
3636

37-
public $lastName;
37+
public string $lastName;
3838

3939
/**
4040
* Get object data as string

NIP24/EUVAT.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ class EUVAT
2828
{
2929
/**
3030
* Normalizes form of the VAT number
31-
* @param string $number input string
31+
* @param string|null $number input string
3232
* @return string|false
3333
*/
34-
public static function normalize($number)
34+
public static function normalize(?string $number)
3535
{
3636
if (is_null($number) || strlen($number) <= 2) {
3737
return false;
@@ -49,10 +49,10 @@ public static function normalize($number)
4949

5050
/**
5151
* Checks if specified NIP is valid
52-
* @param string $number input number
52+
* @param string|null $number input number
5353
* @return bool
5454
*/
55-
public static function isValid($number)
55+
public static function isValid(?string $number): bool
5656
{
5757
if (! ($number = self::normalize($number))) {
5858
return false;

NIP24/Error.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Error
104104
const CLI_DATEFORMAT = 210;
105105
const CLI_INPUT = 211;
106106

107-
private static $codes = array(
107+
private static array $codes = array(
108108
self::CLI_CONNECT => 'Nie udało się nawiązać połączenia z serwisem NIP24',
109109
self::CLI_RESPONSE => 'Odpowiedź serwisu NIP24 ma nieprawidłowy format',
110110
self::CLI_NUMBER => 'Nieprawidłowy typ numeru',
@@ -123,8 +123,8 @@ class Error
123123
* @param int $code error code
124124
* @return string error message
125125
*/
126-
public static function message($code)
127-
{
126+
public static function message(int $code): ?string
127+
{
128128
if ($code < self::CLI_CONNECT || $code > self::CLI_INPUT) {
129129
return null;
130130
}

NIP24/IBAN.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
*/
2727
class IBAN
2828
{
29-
/**
30-
* Normalizes form of the IBAN number
31-
* @param string $iban
32-
* @return string|false
33-
*/
34-
public static function normalize($iban)
29+
/**
30+
* Normalizes form of the IBAN number
31+
* @param string|null $iban
32+
* @return string|false
33+
*/
34+
public static function normalize(?string $iban)
3535
{
3636
if (is_null($iban) || strlen($iban) == 0) {
3737
return false;
@@ -46,14 +46,14 @@ public static function normalize($iban)
4646

4747
return $iban;
4848
}
49-
50-
/**
51-
* Check if specified IBAN is valid
52-
* @param string $iban input number
53-
* @return bool
54-
*/
55-
public static function isValid($iban)
56-
{
49+
50+
/**
51+
* Check if specified IBAN is valid
52+
* @param string|null $iban input number
53+
* @return bool
54+
*/
55+
public static function isValid(?string $iban): bool
56+
{
5757
if (! ($iban = self::normalize($iban))) {
5858
return false;
5959
}

0 commit comments

Comments
 (0)