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
22 changes: 19 additions & 3 deletions .github/workflows/composer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,35 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4, 8.0, 8.1, 8.2 ]
data: [
{ symfony: '5.4.*', php: 7.4 },
{ symfony: '5.4.*', php: 8.0 },
{ symfony: '5.4.*', php: 8.1 },
{ symfony: '5.4.*', php: 8.2 },

{ symfony: '6.4.*', php: 8.1 },
{ symfony: '6.4.*', php: 8.2 },

{ symfony: '7.1.*', php: 8.2 },

{ symfony: '7.2.*', php: 8.2 },
]

steps:
- uses: actions/checkout@v3.3.0

- name: Install Infrastructure
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
php-version: ${{ matrix.data.php }}
tools: composer:v2, flex
coverage: none

- name: Install Dependence and audit
env:
SYMFONY_REQUIRE: ${{ matrix.data.symfony }}
uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
dependency-versions: "highest"
- run: composer audit
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* PosCredit MDM-Client
*
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"psr/http-client": "^1.0",
"psr/http-client-implementation": "^1.0",
"guzzlehttp/psr7": "^2.0",
"symfony/uid": "^5.3|^5.4|^6.0|^7.0",
"symfony/serializer": "^5.3|^5.4|^6.0|^7.0",
"symfony/property-access": "^5.3|^5.4|^6.0|^7.0",
"symfony/uid": "^5.3|^6.0|^7.0",
"symfony/serializer": "^5.3|^6.0|^7.0",
"symfony/property-access": "^5.3|^6.0|^7.0",
"phpstan/phpdoc-parser": "^1.0",
"phpdocumentor/reflection-docblock": "^5.0",
"doctrine/annotations": "^1.0|^2.0",
Expand All @@ -42,8 +42,8 @@
"brick/phonenumber": "^0.4|^0.5|^0.6"
},
"require-dev": {
"symfony/http-client": "^5.3|^5.4|^6.0|^7.0",
"symfony/var-dumper": "^5.3|^5.4|^6.0|^7.0",
"symfony/http-client": "^5.3|^6.0|^7.0",
"symfony/var-dumper": "^5.3|^6.0|^7.0",
"friendsofphp/php-cs-fixer": "^3.64",
"vimeo/psalm": "^5.23",
"psalm/plugin-symfony": "^5.1",
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/Composer/function.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/HttpClient/ConfigurationClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/HttpClient/Middleware/Middleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/HttpClient/Middleware/UrlMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
3 changes: 2 additions & 1 deletion src/Infrastructure/Serializer/CountryIsoNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down Expand Up @@ -84,7 +85,7 @@ public function supportsNormalization($data, ?string $format = null, array $cont
}

/**
* @psalm-suppress MoreSpecificImplementedParamType
* @psalm-suppress MoreSpecificImplementedParamType, ParamNameMismatch
*
* @param object $object
* @param array<string, mixed> $context
Expand Down
1 change: 1 addition & 0 deletions src/Infrastructure/Serializer/EnumNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down Expand Up @@ -36,7 +37,7 @@ public function supportsNormalization($data, ?string $format = null, array $cont
}

/**
* @psalm-suppress MoreSpecificImplementedParamType
* @psalm-suppress MoreSpecificImplementedParamType, ParamNameMismatch
*
* @param object $object
* @param array<string, mixed> $context
Expand Down
4 changes: 4 additions & 0 deletions src/Infrastructure/Serializer/MoneyNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down Expand Up @@ -100,6 +101,9 @@ public function supportsNormalization($data, ?string $format = null, array $cont
return $data instanceof Money;
}

/**
* @psalm-suppress ParamNameMismatch
*/
public function normalize($object, ?string $format = null, array $context = []): string
{
if (!$object instanceof Money) {
Expand Down
3 changes: 2 additions & 1 deletion src/Infrastructure/Serializer/PhoneNumberNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down Expand Up @@ -93,7 +94,7 @@ public function supportsNormalization($data, ?string $format = null, array $cont
}

/**
* @psalm-suppress MoreSpecificImplementedParamType, LessSpecificReturnStatement, MoreSpecificReturnType
* @psalm-suppress MoreSpecificImplementedParamType, LessSpecificReturnStatement, MoreSpecificReturnType, ParamNameMismatch
*
* @param object $object
* @param array<string, mixed> $context
Expand Down
3 changes: 2 additions & 1 deletion src/Infrastructure/Serializer/RegionIsoNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down Expand Up @@ -84,7 +85,7 @@ public function supportsNormalization($data, ?string $format = null, array $cont
}

/**
* @psalm-suppress MoreSpecificImplementedParamType
* @psalm-suppress MoreSpecificImplementedParamType, ParamNameMismatch
*
* @param object $object
* @param array<string, mixed> $context
Expand Down
1 change: 1 addition & 0 deletions src/Response/CountryIso.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/FiasActualityState.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
14 changes: 14 additions & 0 deletions src/Response/FiasLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ final class FiasLevel extends Enum

private const LAND_PLOT = '75';

private const ADDITIONAL_TERRITORY = '90';

private const STREET_IN_ADDITIONAL_TERRITORY = '91';

private const FOREIGN_OR_BLANK = '-1';

public static function country(): self
Expand Down Expand Up @@ -98,6 +102,16 @@ public static function landPlot(): self
return new self(self::LAND_PLOT);
}

public static function additionalTerritory(): self
{
return new self(self::ADDITIONAL_TERRITORY);
}

public static function streetInAdditionalTerritory(): self
{
return new self(self::STREET_IN_ADDITIONAL_TERRITORY);
}

public static function foreignOrBlank(): self
{
return new self(self::FOREIGN_OR_BLANK);
Expand Down
1 change: 1 addition & 0 deletions src/Response/Metro.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/Organization.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationBranchType.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationName.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationOpf.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationState.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationStateStatus.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/OrganizationType.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/RegionIso.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/SuggestAddress.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Response/SuggestOrganization.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/RestClientBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/SuggestAddressClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/SuggestOrganizationClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Transport/RestSuggestAddressClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
1 change: 1 addition & 0 deletions src/Transport/RestSuggestOrganizationClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DaData Client
*
Expand Down
Loading