Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Update PHP-CS-Fixer #244

Merged
merged 2 commits into from
Dec 7, 2024
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PSALM_BIN = vendor-bin/psalm/vendor/vimeo/psalm/psalm
PSALM = $(PSALM_BIN) --no-cache

PHP_CS_FIXER_BIN = vendor-bin/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
PHP_CS_FIXER = $(PHP_CS_FIXER_BIN) fix --ansi --verbose --config=.php-cs-fixer.php
PHP_CS_FIXER = PHP_CS_FIXER_IGNORE_ENV=1 $(PHP_CS_FIXER_BIN) fix --ansi --verbose --config=.php-cs-fixer.php


.DEFAULT_GOAL := check
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"symfony/console": "^6.4 || ^7.0",
"symfony/deprecation-contracts": "^3.4",
"symfony/event-dispatcher-contracts": "^2.5 || ^3.0",
"symfony/polyfill-php84": "^1.31",
"symfony/service-contracts": "^2.5 || ^3.0",
"thecodingmachine/safe": "^2.0",
"webmozart/assert": "^1.11"
Expand Down
4 changes: 2 additions & 2 deletions src/Internal/Type/NonEmptyStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

use Fidry\Console\Input\InvalidInputValueType;
use Fidry\Console\Internal\InputAssert;
use function mb_trim;
use function sprintf;
use function trim;

/**
* @implements ScalarType<non-empty-string>
Expand All @@ -27,7 +27,7 @@ public function coerceValue(array|bool|string|null $value, string $label): strin
{
InputAssert::string($value, $label);

$trimmedValue = trim($value);
$trimmedValue = mb_trim($value);

if ('' === $trimmedValue) {
throw new InvalidInputValueType(
Expand Down
4 changes: 2 additions & 2 deletions src/Internal/Type/StringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Fidry\Console\Internal\Type;

use Fidry\Console\Internal\InputAssert;
use function trim;
use function mb_trim;

/**
* @implements ScalarType<string>
Expand All @@ -25,7 +25,7 @@ public function coerceValue(array|bool|string|null $value, string $label): strin
{
InputAssert::string($value, $label);

return trim($value);
return mb_trim($value);
}

public function getTypeClassNames(): array
Expand Down
2 changes: 2 additions & 0 deletions vendor-bin/pph-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
18 changes: 18 additions & 0 deletions vendor-bin/pph-cs-fixer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading