Skip to content

Commit 0fd378c

Browse files
author
Vítězslav Dvořák
committed
Update PHP CS Fixer configuration, enhance type declarations, and improve documentation
1 parent 29d67bb commit 0fd378c

File tree

15 files changed

+42
-24
lines changed

15 files changed

+42
-24
lines changed

.php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use Ergebnis\PhpCsFixer\Config\Factory;
1717
use Ergebnis\PhpCsFixer\Config\Rules;
18-
use Ergebnis\PhpCsFixer\Config\RuleSet\Php74;
18+
use Ergebnis\PhpCsFixer\Config\RuleSet\Php81;
1919

2020
$header = <<<'HEADER'
2121
This file is part of the PohodaSQL package
@@ -28,7 +28,7 @@
2828
file that was distributed with this source code.
2929
HEADER;
3030

31-
$ruleSet = Php74::create()->withHeader($header)->withRules(Rules::fromArray([
31+
$ruleSet = Php81::create()->withHeader($header)->withRules(Rules::fromArray([
3232
'blank_line_before_statement' => [
3333
'statements' => [
3434
'break',

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"minimum-stability": "dev",
1212
"require": {
13-
"vitexsoftware/ease-fluentpdo": "dev-main"
13+
"vitexsoftware/ease-fluentpdo": "^1.4"
1414
},
1515
"autoload": {
1616
"psr-4": {
@@ -25,9 +25,9 @@
2525
"require-dev": {
2626
"phpunit/phpunit": "*",
2727
"phpstan/phpstan": "*",
28-
"friendsofphp/php-cs-fixer": "^3.61",
29-
"ergebnis/composer-normalize": "^2.43",
30-
"ergebnis/php-cs-fixer-config": "^6.34"
28+
"friendsofphp/php-cs-fixer": "^3.84",
29+
"ergebnis/composer-normalize": "^2.47",
30+
"ergebnis/php-cs-fixer-config": "^6.50"
3131
},
3232
"config": {
3333
"allow-plugins": {

debian/changelog

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
php-spojenet-pohoda-sql (0.2.0) UNRELEASED; urgency=low
1+
php-spojenet-pohoda-sql (0.2.1) UNRELEASED; urgency=medium
22

3+
* many changes
4+
5+
-- Vitex <[email protected]> Fri, 25 Jul 2025 12:10:10 +0200
6+
7+
php-spojenet-pohoda-sql (0.2.0) unstable; urgency=low
8+
9+
[ Vítězslav Dvořák ]
310
* Initial release. Closes: #nnnn
411

5-
-- Vítězslav Dvořák <info@vitexsoftware.cz> Fri, 08 Dec 2023 15:02:05 +0100
12+
-- Vitex <vitezslav.dvorak@spojenet.cz> Fri, 25 Jul 2025 12:09:56 +0200

src/SpojeNet/PohodaSQL/Adresar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Adresar extends Agenda
3232
*
3333
* @const array
3434
*/
35-
public $struct = [
35+
public array $struct = [
3636
'ID' => [
3737
'type' => 'int',
3838
'size' => '10',

src/SpojeNet/PohodaSQL/Agenda.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Agenda extends \Ease\SQL\Engine
118118
*
119119
* @const array
120120
*/
121-
public $struct = [];
121+
public array $struct = [];
122122

123123
/**
124124
* DatSave column name.
@@ -131,14 +131,15 @@ class Agenda extends \Ease\SQL\Engine
131131
* @param array $options Object Options (dbType,server,username,password,database,
132132
* port,connectionSettings,myTable,debug)
133133
*/
134-
public function setUp($options = []): bool
134+
public function setUp(array $options = []): bool
135135
{
136136
$this->setKeyColumn(\array_key_exists('ID', $this->struct) ? 'ID' : null);
137137
$this->createColumn = \array_key_exists('DatCreate', $this->struct) ? 'DatCreate' : null;
138138
$this->lastModifiedColumn = \array_key_exists('DatSave', $this->struct) ? 'DatSave' : null;
139139
$this->nameColumn = \array_key_exists('IDS', $this->struct) ? 'IDS' : '';
140140
$setUp = parent::setUp($options);
141141
$this->setObjectName();
142+
142143
return $setUp;
143144
}
144145

src/SpojeNet/PohodaSQL/CiselnaRada.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,8 @@ class CiselnaRada extends Agenda
237237

238238
/**
239239
* Hodnota číselné řady.
240-
*
241-
* @var int|string
242240
*/
243-
public $value = 0;
241+
public int|string $value = 0;
244242

245243
/**
246244
* Přidružená agenda.
@@ -262,7 +260,7 @@ public function __construct($identifier = null, $options = [])
262260
{
263261
parent::__construct($identifier, $options);
264262

265-
if (\array_key_exists('IDS', $identifier) && \array_key_exists('RelCrAg', $identifier)) {
263+
if (\is_array($identifier) && \array_key_exists('IDS', $identifier) && \array_key_exists('RelCrAg', $identifier)) {
266264
$this->init(
267265
$identifier['IDS'],
268266
$identifier['RelCrAg'],

src/SpojeNet/PohodaSQL/DOC.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DOC extends Agenda
3333
*
3434
* @const array
3535
*/
36-
public $struct = [
36+
public array $struct = [
3737
'ID' => [
3838
'type' => 'int',
3939
'size' => '10',

src/SpojeNet/PohodaSQL/Faktura.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Faktura extends Agenda
3232
*
3333
* @const array
3434
*/
35-
public $struct = [
35+
public array $struct = [
3636
'ID' => [
3737
'type' => 'int',
3838
'size' => '10',
@@ -766,7 +766,7 @@ class Faktura extends Agenda
766766
* @param mixed $identifier Initial content/identifier
767767
* @param array $options Object options
768768
*/
769-
public function __construct($identifier = null, $options = [])
769+
public function __construct($identifier = null, array $options = [])
770770
{
771771
parent::__construct($identifier, $options);
772772
}

src/SpojeNet/PohodaSQL/FakturaPolozka.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class FakturaPolozka extends Agenda
3232
*
3333
* @const array
3434
*/
35-
public $struct = [
35+
public array $struct = [
3636
'ID' => [
3737
'type' => 'int',
3838
'size' => '10',

src/SpojeNet/PohodaSQL/Majetek.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Majetek extends Agenda
3232
*
3333
* @const array
3434
*/
35-
public $struct = [
35+
public array $struct = [
3636
'ID' => [
3737
'type' => 'int',
3838
'size' => '10',

0 commit comments

Comments
 (0)