Skip to content

Commit f35cb85

Browse files
committed
strict types update
1 parent e87c866 commit f35cb85

File tree

20 files changed

+41
-41
lines changed

20 files changed

+41
-41
lines changed

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
php-spojenet-abraflexi (3.3.1.245~noble.247~bullseye.249~bullseye) UNRELEASED; urgency=medium
1+
php-spojenet-abraflexi (3.3.1) experimental; urgency=medium
22

33
* build fix
44
* jenkins-Spoje.Net-php-spojenet-abraflexi-245
55
* jenkins-Spoje.Net-php-spojenet-abraflexi-247
66
* jenkins-Spoje.Net-php-spojenet-abraflexi-249
77

8-
-- vitex <[email protected]> Tue, 31 Dec 2024 12:43:45 +0000
8+
-- vitex <[email protected]> Tue, 07 Jan 2025 01:19:35 +0100
99

1010
php-spojenet-abraflexi (3.3.0.235~noble.236~noble.237~jammy.239~noble.240~noble.241~noble) experimental; urgency=medium
1111

src/AbraFlexi/Banka.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function stahnoutVypisyOnline()
6464
*
6565
* @return bool
6666
*/
67-
public function automatickeParovani($advanced = false, $filter = null)
67+
public function automatickeParovani($advanced = false, $filter = null): bool
6868
{
6969
$filterUrl = $filter === null ? '' : rtrim($filter, '/').'/';
7070
$this->performRequest($filterUrl.'automaticke-parovani'.($advanced ? '-pokrocile' : ''), 'PUT');

src/AbraFlexi/Changes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Changes extends RO
3131
*
3232
* @return bool
3333
*/
34-
public function enable()
34+
public function enable(): true
3535
{
3636
$this->performRequest('enable.xml', 'POST', 'xml');
3737

src/AbraFlexi/Company.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function processInit($init): void
7979
*
8080
* @param string $urlSuffix
8181
*/
82-
public function getEvidenceURL($urlSuffix = null)
82+
public function getEvidenceURL($urlSuffix = null): string
8383
{
8484
if (null === $urlSuffix) {
8585
$urlSuffix = $this->evidence;
@@ -101,7 +101,7 @@ public function getEvidenceURL($urlSuffix = null)
101101
*
102102
* @return string API URL for current record or object/evidence
103103
*/
104-
public function getApiURL($format = null)
104+
public function getApiURL($format = null): string
105105
{
106106
return \dirname(parent::getApiURL($format));
107107
}
@@ -111,7 +111,7 @@ public function getApiURL($format = null)
111111
*
112112
* @return string
113113
*/
114-
public function getResponseEvidence()
114+
public function getResponseEvidence(): string
115115
{
116116
return 'company';
117117
}
@@ -147,7 +147,7 @@ public function rawResponseToArray(string $responseRaw, string $format)
147147
*
148148
* @return bool was backup saved to file ?
149149
*/
150-
public function saveBackupTo($filename)
150+
public function saveBackupTo($filename): bool
151151
{
152152
$backupFile = fopen($filename, 'w+b');
153153
$headersBackup = $this->defaultHttpHeaders;
@@ -223,7 +223,7 @@ public function restoreBackupFrom(
223223
*
224224
* @return bool
225225
*/
226-
public function createNew($name)
226+
public function createNew($name): bool
227227
{
228228
$this->performRequest('/admin/zalozeni-firmy?name='.urlencode($name), 'PUT');
229229

src/AbraFlexi/Date.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(string $flexidate = 'NOW')
6262
*
6363
* @return string
6464
*/
65-
public function __toString()
65+
public function __toString(): string
6666
{
6767
return $this->isNull ? '' : $this->format(Functions::$DateFormat);
6868
}
@@ -74,7 +74,7 @@ public function __toString()
7474
*
7575
* @return \AbraFlexi\Date or NULL
7676
*/
77-
public static function timestampToFlexiDate($timpestamp = null)
77+
public static function timestampToFlexiDate($timpestamp = null): Date
7878
{
7979
$flexiDate = new self();
8080

src/AbraFlexi/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct(string $flexidatetime = 'NOW')
6161
*
6262
* @return string
6363
*/
64-
public function __toString()
64+
public function __toString(): string
6565
{
6666
return $this->isNull ? '' : $this->format(self::$format);
6767
}

src/AbraFlexi/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Document
2626
public function getLabels();
2727

2828
/**
29-
* Set one of availble Labels for current record.
29+
* Set one of available Labels for current record.
3030
*
3131
* @param string $label
3232
*

src/AbraFlexi/Evidence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(RO $engine, array $conditions = [])
4343
}
4444

4545
/**
46-
* Array of objects in eveidence.
46+
* Array of objects in evidence.
4747
*
4848
* @return array<string, string>
4949
*/

src/AbraFlexi/Formats.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Formats
2626
public static string $version = '2025.1.1';
2727

2828
/**
29-
* Availble Formats.
29+
* Available Formats.
3030
*
3131
* @see https://www.flexibee.eu/api/dokumentace/ref/format-types/
3232
*

src/AbraFlexi/Functions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function urlEncode(string $urlRaw)
5858
*
5959
* @return string Class name
6060
*/
61-
public static function evidenceToClassName($evidence)
61+
public static function evidenceToClassName($evidence): string
6262
{
6363
return str_replace(' ', '', ucwords(str_replace('-', ' ', $evidence)));
6464
}
@@ -68,7 +68,7 @@ public static function evidenceToClassName($evidence)
6868
*
6969
* @return string
7070
*/
71-
public static function code(string $code)
71+
public static function code(string $code): string
7272
{
7373
return (substr($code, 0, 4) === 'ext:') ? $code : 'code:'.strtoupper(self::uncode($code));
7474
}
@@ -78,7 +78,7 @@ public static function code(string $code)
7878
*
7979
* @return array Options
8080
*/
81-
public static function companyUrlToOptions(string $companyUrl)
81+
public static function companyUrlToOptions(string $companyUrl): array
8282
{
8383
$urlParts = parse_url($companyUrl);
8484
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'].'://' : '';
@@ -105,7 +105,7 @@ public static function companyUrlToOptions(string $companyUrl)
105105
*
106106
* @return string
107107
*/
108-
public static function uncode(string $code)
108+
public static function uncode(string $code): string
109109
{
110110
return str_replace(['code:', 'code%3A'], '', $code);
111111
}
@@ -139,7 +139,7 @@ static function ($a, $column) {
139139
*
140140
* @return string
141141
*/
142-
public static function flexiUrl(array $data, $joiner = 'and', $defop = 'eq')
142+
public static function flexiUrl(array $data, $joiner = 'and', $defop = 'eq'): string
143143
{
144144
$parts = [];
145145

0 commit comments

Comments
 (0)