Skip to content

Commit 23a0e12

Browse files
committed
even more strict types
1 parent 3e28ce1 commit 23a0e12

File tree

10 files changed

+20
-12
lines changed

10 files changed

+20
-12
lines changed

debian/changelog

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
php-spojenet-abraflexi (3.2.0.225~noble) UNRELEASED; urgency=medium
1+
php-spojenet-abraflexi (3.3.0) UNRELEASED; urgency=medium
2+
3+
* Even more strict types
4+
5+
-- vitex <[email protected]> Thu, 14 Nov 2024 16:59:56 +0100
6+
7+
php-spojenet-abraflexi (3.2.0.225) experimental; urgency=medium
28

39
* Strict types
410
* jenkins-Spoje.Net-php-spojenet-abraflexi-225
511

6-
-- vitex <[email protected]> Tue, 22 Oct 2024 22:03:06 +0000
12+
-- vitex <[email protected]> Thu, 14 Nov 2024 16:59:43 +0100
713

814
php-spojenet-abraflexi (3.1.0) experimental; urgency=medium
915

src/AbraFlexi/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function __toString()
6969
/**
7070
* Easy way how to force format DateTime used.
7171
*
72-
* @param string
72+
* @param string $format
7373
*
7474
* @return \DateTime|false
7575
*/

src/AbraFlexi/Exception.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Exception extends \Ease\Exception
2727

2828
/**
2929
* Error messages sit here.
30+
* @var array<string>
3031
*/
3132
private array $errorMessages = [];
3233

@@ -58,7 +59,7 @@ public function getErrorMessage($index = 0)
5859
/**
5960
* All stored Error messages.
6061
*
61-
* @return array
62+
* @return array<string>
6263
*/
6364
public function getErrorMessages()
6465
{

tests/ObjectForTesting.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ObjectForTesting extends \stdClass
2525

2626
/**
2727
* Array item.
28+
* @var array<string>
2829
*/
2930
public array $arrItem = ['a', 'b' => 'c'];
3031

tests/src/AbraFlexi/BankaTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function makeTestPayment($initialData = [], $dayBack = 1)
6565
'specSym' => \Ease\Functions::randomNumber(111, 999),
6666
'bezPolozek' => true,
6767
'datVyst' => \AbraFlexi\RO::dateToFlexiDate($yesterday),
68-
'typDokl' => \AbraFlexi\Functions::code((string)'STANDARD'),
68+
'typDokl' => \AbraFlexi\Functions::code((string) 'STANDARD'),
6969
], $initialData));
7070

7171
if ($payment->sync()) {
@@ -96,7 +96,7 @@ public function getDataForInsert($code = 'UnitTest')
9696
);
9797
$bankCodeRaw = $loader->getColumnsFromAbraFlexi([
9898
'kod'], ['limit' => 1]);
99-
$dataForInsert['banka'] = \AbraFlexi\Functions::code((string)$bankCodeRaw[0]['kod']);
99+
$dataForInsert['banka'] = \AbraFlexi\Functions::code((string) $bankCodeRaw[0]['kod']);
100100
$dataForInsert['typPohybuK'] = 'typPohybu.prijem';
101101

102102
return $dataForInsert;

tests/src/AbraFlexi/FakturaVydanaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function makeTestInvoice(
7272
'bezPolozek' => true,
7373
'popis' => 'AbraFlexi Test invoice',
7474
'datVyst' => \AbraFlexi\RO::dateToFlexiDate($yesterday),
75-
'typDokl' => \AbraFlexi\Functions::code((string)'FAKTURA'),
75+
'typDokl' => \AbraFlexi\Functions::code((string) 'FAKTURA'),
7676
], $initialData));
7777

7878
if ($invoice->sync()) {

tests/src/AbraFlexi/FunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ public function testXml2array(): void
7373
],
7474
];
7575

76-
$this->assertEquals($arrayWeWant, $this->object->xml2array($this->xml));
76+
$this->assertEquals($arrayWeWant, Functions::xml2array($this->xml));
7777
}
7878
}

tests/src/AbraFlexi/RWTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getDataForInsert($code = 'UnitTest')
7171
);
7272
$typDoklRaw = $loader->getColumnsFromAbraFlexi([
7373
'kod'], ['limit' => 1]);
74-
$dataForInsert['typDokl'] = \AbraFlexi\Functions::code((string)$typDoklRaw[0]['kod']);
74+
$dataForInsert['typDokl'] = \AbraFlexi\Functions::code((string) $typDoklRaw[0]['kod']);
7575
}
7676
}
7777

tools/update_actions_class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Actions
133133
$evidenceActions .= ' /**
134134
* Evidence ' . $evidencePath . ' (' . $evidenceName . ') Actions.
135135
*
136-
* @var array
136+
* @var array<string,array<string,string>>
137137
*/
138138
';
139139
$evidenceActions .= ' static public $' . lcfirst(RO::evidenceToClassName($evidencePath)) . ' = ' . varexport($structure,

tools/update_evidencelist_class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function __construct($init = null, $options = []) {
143143
$evidenceList .= ' /**
144144
* Evidences Path/Name listing.
145145
*
146-
* @var array
146+
* @var array<string,string>
147147
*/
148148
';
149149
$evidenceList .= ' static public $name = ' . varexport($evlist, true) . ';
@@ -152,7 +152,7 @@ public function __construct($init = null, $options = []) {
152152
$evidenceList .= ' /**
153153
* All Evidence\'s all properties listing.
154154
*
155-
* @var array
155+
* @var array<string,array<string,string>>
156156
*/
157157
';
158158
$evidenceList .= ' static public $evidences = ' . varexport($fullList, true) . ';

0 commit comments

Comments
 (0)