Skip to content

Commit

Permalink
Latest Jane compatibility. (#4)
Browse files Browse the repository at this point in the history
* Update packages
*  fix the broken types declaration with latest janephp version.
  • Loading branch information
l-you committed Jan 31, 2024
1 parent 97ecbc4 commit dac87bb
Show file tree
Hide file tree
Showing 140 changed files with 288 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor/
.idea
.php-cs-fixer.cache
composer-lock.json
composer.lock
2 changes: 1 addition & 1 deletion jane-initial-config.php → .jane-openapi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
return [
'openapi-file' => 'https://api.checkbox.in.ua/api/openapi.json',
'namespace' => 'Vendor\Library\Generated\CheckboxUA',
'directory' => __DIR__.'/generated/checkbox_ua',
'directory' => __DIR__.'/src',
'throw-unexpected-status-code' => true,
'date-format' => 'Y-m-d\\TH:i:s.uP',
'clean-generated' => true,
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"require": {
"php": "^8.2",
"jane-php/open-api-runtime": "^7.5",
"jane-php/open-api-runtime": "^7.6",
"guzzlehttp/guzzle": "^7.8"
},
"require-dev": {
"jane-php/open-api-3": "^7.5",
"jane-php/open-api-3": "^7.6",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "*"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/AddressModelNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\AddressModel;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -82,7 +82,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['address_type'] = $object->getAddressType();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/BalanceModelNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\BalanceModel;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -99,7 +99,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['initial'] = $object->getInitial();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\BodyImportGoodsFromFileApiV1GoodsImportUploadPost;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -58,7 +58,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['file'] = $object->getFile();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/BonusPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\BonusPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -66,7 +66,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['bonus_card'] = $object->getBonusCard();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/BranchModelNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\BranchModel;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -79,7 +79,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['id'] = $object->getId();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedDiscountPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedDiscountPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -93,7 +93,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['type'] = $object->getType();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedGoodDetailsPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedGoodDetailsPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -94,7 +94,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['code'] = $object->getCode();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedGoodItemPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedGoodItemPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -94,7 +94,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['good'] = $this->normalizer->normalize($object->getGood(), 'json', $context);
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedGoodTaxPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedGoodTaxPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -104,7 +104,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['code'] = $object->getCode();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedReceiptSellPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedReceiptSellPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -187,7 +187,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('id') && null !== $object->getId()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CalculatedReceiptTaxPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CalculatedReceiptTaxPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -126,7 +126,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('id') && null !== $object->getId()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CardPaymentPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CardPaymentPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -130,7 +130,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('type') && null !== $object->getType()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashPaymentPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashPaymentPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -70,7 +70,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('type') && null !== $object->getType()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashRegisterDeviceModelNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashRegisterDeviceModel;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -119,7 +119,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['id'] = $object->getId();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashRegisterModelNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashRegisterModel;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -79,7 +79,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
$data['id'] = $object->getId();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashRegisterOfflineTimeNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashRegisterOfflineTime;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -66,7 +66,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('status') && null !== $object->getStatus()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashRegisterOfflineTimeSessionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashRegisterOfflineTimeSession;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -71,7 +71,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('start') && null !== $object->getStart()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashRegisterOfflineTimeStatusNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashRegisterOfflineTimeStatus;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -69,7 +69,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('current') && null !== $object->getCurrent()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/CashWithdrawalReceiptPayloadNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function supportsNormalization($data, $format = null, array $context = []
return is_object($data) && $data instanceof \RevoTale\CheckboxUA\Model\CashWithdrawalReceiptPayload;
}

public function denormalize($data, $class, $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
Expand Down Expand Up @@ -107,7 +107,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
/**
* @return array|string|int|float|bool|ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$data = [];
if ($object->isInitialized('id') && null !== $object->getId()) {
Expand Down
Loading

0 comments on commit dac87bb

Please sign in to comment.