Skip to content

chore: add return types for remaining data providers#8544

Merged
kubawerlos merged 2 commits intoPHP-CS-Fixer:masterfrom
6b7562617765726c6f73:rest_of_types
Mar 30, 2025
Merged

chore: add return types for remaining data providers#8544
kubawerlos merged 2 commits intoPHP-CS-Fixer:masterfrom
6b7562617765726c6f73:rest_of_types

Conversation

@kubawerlos
Copy link
Copy Markdown
Member

No description provided.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 94.874%. remained the same
when pulling f513324 on 6b7562617765726c6f73:rest_of_types
into 6d14a6e on PHP-CS-Fixer:master.

}

/**
* @return iterable<array{0: string, 1?: string}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use following ?

Suggested change
* @return iterable<array{0: string, 1?: string}>
* @return iterable<string, array{0: string, 1?: string}>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No:

 ------ -----------------------------------------------------------------
  Line   tests/Fixer/ControlStructure/SwitchContinueToBreakFixerTest.php
 ------ -----------------------------------------------------------------
  269    Generator expects key type string, int given.
         🪪  generator.keyType
  432    Generator expects key type string, int given.
         🪪  generator.keyType
 ------ -----------------------------------------------------------------

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaaaand, especially one of them is from code you touch in this PR

I see no reason why not to fix that single case that was missing the description.

#8546

@kubawerlos kubawerlos enabled auto-merge (squash) March 30, 2025 12:51
@kubawerlos kubawerlos merged commit 86720d4 into PHP-CS-Fixer:master Mar 30, 2025
51 of 53 checks passed
@kubawerlos kubawerlos deleted the rest_of_types branch March 30, 2025 12:52
Comment on lines -427 to +433
[
'<?php
];

yield [
'<?php
Copy link
Copy Markdown
Member

@keradus keradus Mar 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there was some mistake in master branch of 2 cases merged into 1 weirdly [string, string, [string, string]],
but now the case-description here doesn't make sense

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants