diff --git a/README.md b/README.md index dff3e89..a54ce04 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,7 @@ final class MyClass extends MyParentClass public array $foo1, public readonly Foo&Bar $bar1, public ?bool $baz1, - ) { - } + ) {} /** * @var non-empty-string|array @@ -322,8 +321,7 @@ final class MyService { public function __construct( private readonly Dumper $dumper, - ) { - } + ) {} public function doTheThingsAndStuff(): void { diff --git a/composer.json b/composer.json index 50a10aa..e19b911 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ } ], "require-dev": { - "friendsofphp/php-cs-fixer": "3.45.0", - "phpstan/phpstan": "1.10.50", + "friendsofphp/php-cs-fixer": "3.49.0", + "phpstan/phpstan": "1.10.59", "phpstan/phpstan-strict-rules": "1.5.2", - "symplify/phpstan-rules": "12.4.3", - "phpunit/phpunit": "10.5.5", - "symfony/framework-bundle": "6.4.2", - "symfony/yaml": "6.4.0", + "symplify/phpstan-rules": "12.4.8", + "phpunit/phpunit": "10.5.10", + "symfony/framework-bundle": "6.4.3", + "symfony/yaml": "6.4.3", "cweagans/composer-patches": "1.7.3" }, "require": { @@ -30,19 +30,19 @@ "ext-json": "*", "ext-mbstring": "*", "ext-xml": "*", - "nikic/php-parser": "^4.17", - "symfony/config": "^5.0 || ^6.0", - "symfony/console": "^5.0 || ^6.0", - "symfony/dependency-injection": "^5.0 || ^6.0", - "symfony/event-dispatcher": "^5.0 || ^6.0", - "symfony/filesystem": "^5.0 || ^6.0", - "symfony/finder": "^5.0 || ^6.0", - "symfony/http-foundation": "^5.0 || ^6.0", - "symfony/http-kernel": "^5.0 || ^6.0", - "symfony/property-access": "^5.0 || ^6.0", - "symfony/serializer": "^5.0 || ^6.0", - "symfony/string": "^5.0 || ^6.0", - "phpstan/phpdoc-parser": "^1.24" + "nikic/php-parser": "^4.18", + "symfony/config": "^5.0 || ^6.0 || ^7.0", + "symfony/console": "^5.0 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^5.0 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.0 || ^6.0 || ^7.0", + "symfony/finder": "^5.0 || ^6.0 || ^7.0", + "symfony/http-foundation": "^5.0 || ^6.0 || ^7.0", + "symfony/http-kernel": "^5.0 || ^6.0 || ^7.0", + "symfony/property-access": "^5.0 || ^6.0 || ^7.0", + "symfony/serializer": "^5.0 || ^6.0 || ^7.0", + "symfony/string": "^5.0 || ^6.0 || ^7.0", + "phpstan/phpdoc-parser": "^1.25" }, "autoload": { "psr-4": { diff --git a/src/Tool/Str.php b/src/Tool/Str.php index 6a230ef..93b75c0 100644 --- a/src/Tool/Str.php +++ b/src/Tool/Str.php @@ -104,7 +104,7 @@ final public static function splitByNewLines( ->replace("\r", "\n") ; - $lines = array_filter($string->split("\n"), static fn (UnicodeString $line) => $line->length()); + $lines = array_filter($string->split("\n"), static fn (UnicodeString $line) => $line->length() > 0); $lineCount = count($lines); if (!$lineCount) { diff --git a/tests/Fixture/Input/IterableTypes.php b/tests/Fixture/Input/IterableTypes.php index 0c05121..56ee13f 100644 --- a/tests/Fixture/Input/IterableTypes.php +++ b/tests/Fixture/Input/IterableTypes.php @@ -9,6 +9,8 @@ /** * @internal * + * @PhpCsFixerIgnore phpdoc_scalar + * * This is a class description */ #[AsTypeScriptable] diff --git a/tests/Fixture/Input/NativeTypes.php b/tests/Fixture/Input/NativeTypes.php index 74b4b9b..3017d5e 100644 --- a/tests/Fixture/Input/NativeTypes.php +++ b/tests/Fixture/Input/NativeTypes.php @@ -11,6 +11,7 @@ /** * @internal * + * @PhpCsFixerIgnore fully_qualified_strict_types * @PhpCsFixerIgnore global_namespace_import * @PhpCsFixerIgnore phpdoc_add_missing_param_annotation */