Skip to content

Conversation

@smnandre
Copy link
Member

@smnandre smnandre commented May 2, 2025

TL;DR; stricter type checks + PHPDoc annotations = PHPStan level 9

AnsiToHtmlConverter

  • Grouped preg_replace calls into a single call in AnsiToHtmlConverter::convert
  • Removed a conditional test case for PHP versions below 5.4
  • Strict comparaisons
  • PHPDoc annotations

AnsiToHtmlConverterTest

  • Removed a conditional test case for PHP versions below 5.4
  • PHPDoc annotations

@smnandre
Copy link
Member Author

smnandre commented May 2, 2025

fabbot unhappy because of the void in the test file. An other choice would be adding specific exclusion in phpstan.neon.

Not sure it's worth it for a single return type 🤷

@fabpot
Copy link
Member

fabpot commented May 2, 2025

fabbot unhappy because of the void in the test file. An other choice would be adding specific exclusion in phpstan.neon.

Not sure it's worth it for a single return type 🤷

Not using void is part of our CS, so let's fix it. If not, we'll never be able to make it green.

@fabpot
Copy link
Member

fabpot commented May 2, 2025

Thank you @smnandre.

@fabpot fabpot merged commit b9b4a2e into sensiolabs:master May 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants