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

Change Iter\apply (Closure(T): void) $function to (Closure(T): mixed) #471

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

devnix
Copy link
Sponsor Contributor

@devnix devnix commented Apr 22, 2024

If the return type is not going to be used, it does not make sense to enforce it.

For example, there are cases like arrow functions that are incompatible, and force to use longer versions just because of the implicit return, for example:

Psl\Iter\apply(
    $items,
    fn (Item $item) => $q($item)->then($this->processItem(...))
);

…mixed)`

If the return type is not going to be used, it does not make sense to enforce it.

For example, there are cases like arrow functions that are incompatible, and force to use longer versions just because of the implicit return, for example:

```php
Psl\Iter\apply(
    $items,
    fn (Item $item) => $q($item)->then($this->processItem(...))
);
```
@devnix devnix changed the title Change Iter\apply (Closure(T): void) $functionto (Closure(T): mixed) Change Iter\apply (Closure(T): void) $function to (Closure(T): mixed) Apr 22, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8780834876

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.781%

Totals Coverage Status
Change from base Build 8750822623: 0.0%
Covered Lines: 4377
Relevant Lines: 4431

💛 - Coveralls

@veewee veewee requested a review from azjezz April 25, 2024 11:08
@veewee veewee added Priority: Medium This issue may be useful, and needs some attention. Status: Review Needed The issue has a PR attached to it which needs to be reviewed. Type: Enhancement Most issues will probably ask for additions or changes. labels Apr 25, 2024
@veewee veewee merged commit 8ea808a into azjezz:next Apr 25, 2024
14 checks passed
@veewee veewee added this to the 3.0.0 milestone Apr 25, 2024
@devnix devnix deleted the patch-1 branch April 25, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Review Needed The issue has a PR attached to it which needs to be reviewed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants