sabre-io / event

:bell: The sabre/event library provides utilities for lightweight event-based programming
http://sabre.io/event/
BSD 3-Clause "New" or "Revised" License
351 stars 21 forks source link

chore: use php-cs-fixer 3.51 #120

Closed phil-davis closed 8 months ago

phil-davis commented 8 months ago

php-cs-fixer 3.49 (or some recent minor release) wants to use the ? (nullable) syntax on optional parameters. That syntax has been supported for quite a while since PHP https://www.php.net/manual/en/migration71.new-features.php

In the cases here, as well as the default value of the parameter being null, the ? explicitly allows the caller to pass the value null if they want.

And some mentions of type boolean change to just bool - that seems "a good thing" because of https://www.php.net/manual/en/language.types.declarations.php "Warning Name aliases for scalar types (bool, int, float, string) are not supported. Instead, they are treated as class or interface names. For example, using boolean as a type declaration will require the value to be an instanceof the class or interface boolean, rather than of type bool"

php-cs-fixer has only found things to fix in the PHP doc for this bool thing, so no actual code effect to think about.

These seem reasonable, I don't see how it can break any existing usage.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.18%. Comparing base (6e3cf11) to head (24fb8f1). Report is 5 commits behind head on master.

:exclamation: Current head 24fb8f1 differs from pull request most recent head 45fe5fd. Consider uploading reports for the commit 45fe5fd to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #120 +/- ## ============================================ - Coverage 99.21% 99.18% -0.03% Complexity 111 111 ============================================ Files 7 7 Lines 380 370 -10 ============================================ - Hits 377 367 -10 Misses 3 3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

phil-davis commented 8 months ago

Has a minor complaint about project code coverage - strange report, the codecov/patch reports 100% of diff hit.

phil-davis commented 8 months ago

Similar to https://github.com/sabre-io/xml/pull/271