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

chore: use php-cs-fixer 3.51 #120

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

phil-davis
Copy link
Contributor

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.

Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
@@             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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phil-davis
Copy link
Contributor Author

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

@phil-davis
Copy link
Contributor Author

Similar to sabre-io/xml#271

@phil-davis phil-davis changed the title chore: use php-cs-fixer 3.49 chore: use php-cs-fixer 3.51 Mar 4, 2024
@phil-davis phil-davis merged commit 2bdd3e8 into sabre-io:master Mar 4, 2024
5 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.

None yet

1 participant