Skip to content

Commit 8c627e9

Browse files
authored
Merge pull request #82 from Spoje-NET/fix-static-analysis-errors
Fix static analysis errors
2 parents 8e12921 + 3e1a7b6 commit 8c627e9

File tree

11 files changed

+30
-18
lines changed

11 files changed

+30
-18
lines changed

src/AbraFlexi/RO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ class RO extends \Ease\Sand
360360
* Class for read only interaction with AbraFlexi.
361361
*
362362
* @param mixed $init default record id or initial data. See processInit()
363-
* @param array<string, int|string|true> $options Connection settings and other options override
363+
* @param array<string, mixed> $options Connection settings and other options override
364364
*/
365365
public function __construct($init = null, $options = [])
366366
{

src/AbraFlexi/RW.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class RW extends RO
6565
/**
6666
* SetUp Object to be ready for work.
6767
*
68-
* @param array $options Object Options (authSessionId,user,password,
68+
* @param array<mixed> $options Object Options (authSessionId,user,password,
6969
* url,company,evidence,companyUrl
7070
* prefix,defaultUrlParams,debug,ver,dry-run
7171
* detail,offline,atomic,filter,ignore404

src/AbraFlexi/Relations.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class Relations
2828

2929
/**
3030
* Evidence adresar (Adresy firem) Relations.
31+
*
32+
* @var array<string,array<string,string>>
3133
*/
3234
public static array $adresar = [
3335
'odberatele' => [
@@ -94,6 +96,8 @@ class Relations
9496

9597
/**
9698
* Evidence atribut (Atributy) Relations.
99+
*
100+
* @var array<string,array<string,string>>
97101
*/
98102
public static array $atribut = [
99103
'uzivatelske-vazby' => [
@@ -105,6 +109,8 @@ class Relations
105109

106110
/**
107111
* Evidence autotisk (Automatický tisk) Relations.
112+
*
113+
* @var array<string,array<string,string>>
108114
*/
109115
public static array $autotisk = [
110116
'uzivatelske-vazby' => [

src/AbraFlexi/Stitek.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Stitek extends RW
2525
{
2626
/**
2727
* Evidence Path for vsb supported by label.
28+
* @var array<string,string>
2829
*/
2930
public static array $vsbToEvidencePath = [
3031
'vsbAdr' => 'adresar', // Adresář
@@ -56,7 +57,8 @@ class Stitek extends RW
5657
/**
5758
* Convert coma-separated list to array.
5859
*
59-
* @param array|string $listRaw
60+
* @param array<mixed>|string $listRaw
61+
* @return array<mixed>
6062
*/
6163
public static function listToArray($listRaw): array
6264
{
@@ -80,7 +82,7 @@ public static function listToArray($listRaw): array
8082
*
8183
* @param RO $object
8284
*
83-
* @return array
85+
* @return array<mixed>
8486
*/
8587
public static function getAvailableLabels($object)
8688
{
@@ -112,8 +114,8 @@ public static function getAvailableLabels($object)
112114
* Create New Label for given evidences.
113115
*
114116
* @param string $name Label Name
115-
* @param array $evidences Evidence code list ex: ['faktura-vydana','faktura-prijata']
116-
* @param array $options Additional Label properties ex: ['kod'=>'EXAMPLE','skupVybKlic'=>'SKUPINA_STITKU']
117+
* @param array<mixed> $evidences Evidence code list ex: ['faktura-vydana','faktura-prijata']
118+
* @param array<mixed> $options Additional Label properties ex: ['kod'=>'EXAMPLE','skupVybKlic'=>'SKUPINA_STITKU']
117119
*
118120
* @return bool success
119121
*/
@@ -129,7 +131,7 @@ public function createNew($name, $evidences, $options = []): bool
129131
}
130132

131133
if (!\array_key_exists('kod', $options)) {
132-
$this->setDataValue('kod', self::code($name));
134+
$this->setDataValue('kod', \AbraFlexi\Functions::code($name));
133135
}
134136

135137
$this->setDataValue('nazev', $name);

src/AbraFlexi/Zurnal.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ class Zurnal extends RO
2828
* Evidence užitá objektem.
2929
*/
3030
public ?string $evidence = 'zurnal';
31+
/**
32+
* @var array<string,string>
33+
*/
3134
public static array $evidenceToDb = ['faktura-vydana' => 'ddoklfak'];
3235

3336
/**
3437
* Class for read only interaction with AbraFlexi.
3538
*
3639
* @param mixed $init default record id or initial data
37-
* @param array $options Connection settings and other options override
40+
* @param array<mixed> $options Connection settings and other options override
3841
*/
3942
public function __construct($init = null, $options = [])
4043
{
@@ -60,7 +63,7 @@ public function __construct($init = null, $options = [])
6063
*
6164
* @param RO $object
6265
*
63-
* @return array changes history
66+
* @return array<mixed> changes history
6467
*/
6568
public function getAllChanges($object)
6669
{
@@ -88,7 +91,7 @@ public function getAllChanges($object)
8891
*
8992
* @param RO $object
9093
*
91-
* @return array Old/New values pairs
94+
* @return array<mixed> Old/New values pairs
9295
*/
9396
public function getLastChange($object)
9497
{

src/AbraFlexi/firma.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait firma
3131
/**
3232
* Instance of Adresar( $this->getDataValue('firma') ).
3333
*
34-
* @param array $options for new Object
34+
* @param array<mixed> $options for new Object
3535
*
3636
* @return Adresar
3737
*/

src/AbraFlexi/getChanges.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ trait getChanges
4444
/**
4545
* Obtain Chaneges from Journal.
4646
*
47-
* @return array Changes obtained
47+
* @return array<mixed> Changes obtained
4848
*/
4949
public function getChanges()
5050
{

src/AbraFlexi/kod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ trait kod
3333
*/
3434
public function _getRecordCode()
3535
{
36-
return empty($this->getDataValue('kod')) ? null : self::code($this->getDataValue('kod'));
36+
return empty($this->getDataValue('kod')) ? null : \AbraFlexi\Functions::code($this->getDataValue('kod'));
3737
}
3838
}

src/AbraFlexi/stitky.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ trait stitky
2626
/**
2727
* Get all labels for current record.
2828
*
29-
* @return array
29+
* @return array<mixed>
3030
*/
3131
public function getLabels()
3232
{
@@ -50,7 +50,7 @@ public function setLabel($label)
5050
/**
5151
* UnSet Label for Current Object record.
5252
*
53-
* @param array|string $labelsToRemove Label/Labels
53+
* @param array<mixed>|string $labelsToRemove Label/Labels
5454
*
5555
* @return bool success result ?
5656
*/

src/AbraFlexi/subItems.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ trait subItems
2626
/**
2727
* Subitems - ex. items of invoice.
2828
*
29-
* @return array of document items or null
29+
* @return array<mixed> of document items or null
3030
*/
3131
public function getSubItems()
3232
{
3333
return $this->getDataValue($this->getSubmenuName());
3434
}
3535

3636
/**
37+
* @param array<mixed> $subitems
3738
* @return bool
3839
*/
3940
public function setSubitems(array $subitems)

0 commit comments

Comments
 (0)