Upgrade Coding Standards

For now, I'm ignoring many rules because they'll make the changes that
would bring backward compatibility breaks, and I'm aiming to release a
minor version next.

However, upgrading "respect/coding-standard" is necessary because
version 4.0 no longer works.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2024-01-27 19:35:11 +01:00
parent 703f610ee8
commit 177657d5f4
No known key found for this signature in database
GPG key ID: 221E9281655813A6
4 changed files with 14 additions and 2 deletions

View file

@ -32,7 +32,7 @@
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.6",
"psr/http-message": "^1.0",
"respect/coding-standard": "^3.0",
"respect/coding-standard": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"suggest": {

View file

@ -23,6 +23,8 @@ final class CurrencyCode extends AbstractSearcher
* @see http://www.currency-iso.org/en/home/tables/table-a1.html
*
* {@inheritDoc}
*
* @return string[]
*/
protected function getDataSource($input = null): array
{

View file

@ -13,6 +13,7 @@ use function function_exists;
use function is_string;
use function json_decode;
use function json_last_error;
use function json_validate;
use const JSON_ERROR_NONE;

View file

@ -14,5 +14,14 @@
<file>library/</file>
<file>tests/</file>
<rule ref="Respect" />
<rule ref="Respect">
<exclude name="SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden" />
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment.UselessInheritDocComment" />
<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint" />
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall" />
</rule>
</ruleset>