Skip to content

Commit

Permalink
style: Update PHP-CS-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Dec 7, 2024
1 parent a681ea3 commit 9f17425
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
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
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.

0 comments on commit 9f17425

Please sign in to comment.