Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest']
php: ['8.2', '8.3', '8.4']
continue-on-error: ${{ matrix.php == '8.4' }}
php: ['8.3', '8.4', '8.5', '8.6']
continue-on-error: ${{ matrix.php == '8.6' }}
steps:
- uses: actions/checkout@v2

Expand All @@ -27,15 +27,15 @@ jobs:
run: composer validate

- name: Install dependencies
if: ${{ matrix.php != '8.4' }}
if: ${{ matrix.php != '8.6' }}
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 3
command: composer update --no-interaction --no-progress

- name: Install Dependencies (ignore platform)
if: ${{ matrix.php == '8.4' }}
if: ${{ matrix.php == '8.6' }}
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
Expand Down
21 changes: 14 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
}
],
"require": {
"php": ">=7.2"
"php": "^8.3||^8.4||^8.5||^8.6"
},
"require-dev": {
"php": ">=8.2",
"phpunit/phpunit": "^11.1",
"php": "^8.3||^8.4||^8.5||^8.6",
"phpunit/phpunit": "^12",
"friendsofphp/php-cs-fixer": "^3.53",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-strict-rules": "^1.5",
"rector/rector": "^1.0"
"phpstan/phpstan": "^2.2",
"phpstan/phpstan-strict-rules": "^2",
"rector/rector": "^2"
},
"autoload": {
"psr-4": {
Expand All @@ -46,6 +46,13 @@
"stan": "vendor/bin/phpstan",
"check-cs": "vendor/bin/php-cs-fixer fix --dry-run --diff",
"fix-cs": "vendor/bin/php-cs-fixer fix",
"qa": "composer check-cs && composer test && composer stan"
"qa": [
"@check-cs",
"@stan",
"@tests",
"@rector:dry"
],
"rector:dry": "rector -n",
"rector:fix": "rector"
}
}
5,296 changes: 4,436 additions & 860 deletions phpstan-baseline.neon

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Rector\CodeQuality\Rector\FuncCall\IntvalToTypeCastRector;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\UseSpecificWillMethodRector;
use Rector\PHPUnit\PHPUnit80\Rector\MethodCall\SpecificAssertInternalTypeRector;
use Rector\PHPUnit\Rector\Class_\PreferPHPUnitSelfCallRector;
use Rector\PHPUnit\Set\PHPUnitSetList;

return RectorConfig::configure()
->withPreparedSets(deadCode: true, codeQuality: true)
->withIndent()
->withImportNames()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets($php82 = true)
->withPhpSets(php83: true)
->withSets([
PHPUnitSetList::COMPOSER_BASED,
])
->withSkip([
ClassPropertyAssignToConstructorPromotionRector::class,
])
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
IntvalToTypeCastRector::class,
AddLiteralSeparatorToNumberRector::class,
SpecificAssertInternalTypeRector::class,
AssertSameTrueFalseToAssertTrueFalseRector::class,
PreferPHPUnitSelfCallRector::class,
UseSpecificWillMethodRector::class,
]);
2 changes: 2 additions & 0 deletions src/Factory/StructFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Scn\EvalancheSoapStruct\Factory;

use Scn\EvalancheSoapStruct\Struct\Generic\HashMapInterface;
Expand Down
4 changes: 0 additions & 4 deletions src/Struct/Account/Account.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

declare(strict_types=1);
Expand All @@ -24,7 +24,6 @@

/**
* @param AccountingTypeInterface[] $accountingTypes
* @param DiscountInterface $discount
*/
public function __construct(array $accountingTypes = null, DiscountInterface $discount = null)
{
Expand All @@ -40,9 +39,6 @@
return $this->accountingTypes;
}

/**
* @return DiscountInterface
*/
public function getDiscount(): DiscountInterface
{
return $this->discount;
Expand Down
5 changes: 2 additions & 3 deletions src/Struct/Account/AccountInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Scn\EvalancheSoapStruct\Struct\Account;

use Scn\EvalancheSoapStruct\Struct\StructInterface;
Expand All @@ -16,8 +18,5 @@ interface AccountInterface extends StructInterface
*/
public function getAccountingTypes(): array;

/**
* @return DiscountInterface
*/
public function getDiscount(): DiscountInterface;
}
18 changes: 0 additions & 18 deletions src/Struct/Account/AccountingItem.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

namespace Scn\EvalancheSoapStruct\Struct\Account;
Expand Down Expand Up @@ -30,12 +30,6 @@
*/
private $chargeCount;

/**
* @param string $description
* @param int $mandatorId
* @param string $accountingDate
* @param int $chargeCount
*/
public function __construct(
string $description = null,
int $mandatorId = null,
Expand All @@ -48,33 +42,21 @@
$this->chargeCount = $chargeCount;
}

/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}

/**
* @return int
*/
public function getMandatorId(): int
{
return $this->mandatorId;
}

/**
* @return string
*/
public function getAccountingDate(): string
{
return $this->accountingDate;
}

/**
* @return int
*/
public function getChargeCount(): int
{
return $this->chargeCount;
Expand Down
14 changes: 2 additions & 12 deletions src/Struct/Account/AccountingItemInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Scn\EvalancheSoapStruct\Struct\Account;

use Scn\EvalancheSoapStruct\Struct\StructInterface;
Expand All @@ -11,23 +13,11 @@
*/
interface AccountingItemInterface extends StructInterface
{
/**
* @return string
*/
public function getDescription(): string;

/**
* @return int
*/
public function getMandatorId(): int;

/**
* @return string
*/
public function getAccountingDate(): string;

/**
* @return int
*/
public function getChargeCount(): int;
}
16 changes: 0 additions & 16 deletions src/Struct/Account/AccountingType.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

namespace Scn\EvalancheSoapStruct\Struct\Account;
Expand Down Expand Up @@ -37,10 +37,6 @@
private $accountingItems;

/**
* @param int $typeId
* @param int $amount
* @param float $price
* @param string $currency
* @param AccountingItemInterface[] $accountingItems
*/
public function __construct(
Expand All @@ -57,33 +53,21 @@
$this->accountingItems = $accountingItems;
}

/**
* @return int
*/
public function getTypeId(): int
{
return $this->typeId;
}

/**
* @return int
*/
public function getAmount(): int
{
return $this->amount;
}

/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
}

/**
* @return string
*/
public function getCurrency(): string
{
return $this->currency;
Expand Down
14 changes: 2 additions & 12 deletions src/Struct/Account/AccountingTypeInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Scn\EvalancheSoapStruct\Struct\Account;

use Scn\EvalancheSoapStruct\Struct\StructInterface;
Expand All @@ -11,24 +13,12 @@
*/
interface AccountingTypeInterface extends StructInterface
{
/**
* @return int
*/
public function getTypeId(): int;

/**
* @return int
*/
public function getAmount(): int;

/**
* @return float
*/
public function getPrice(): float;

/**
* @return string
*/
public function getCurrency(): string;

/**
Expand Down
14 changes: 0 additions & 14 deletions src/Struct/Account/Discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,23 @@ class Discount implements DiscountInterface
*/
private $price;

/**
* @param string $description
* @param float $percent
* @param float $price
*/
public function __construct(string $description = null, float $percent = null, float $price = null)
{
$this->description = $description;
$this->percent = $percent;
$this->price = $price;
}

/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}

/**
* @return float
*/
public function getPercent(): float
{
return $this->percent;
}

/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
Expand Down
10 changes: 1 addition & 9 deletions src/Struct/Account/DiscountInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

declare(strict_types=1);

namespace Scn\EvalancheSoapStruct\Struct\Account;

Expand All @@ -12,18 +13,9 @@
*/
interface DiscountInterface extends StructInterface
{
/**
* @return string
*/
public function getDescription(): string;

/**
* @return float
*/
public function getPercent(): float;

/**
* @return float
*/
public function getPrice(): float;
}
Loading
Loading