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

Allow optional when on Collector class #25

Merged
merged 4 commits into from
Sep 7, 2024
Merged

Conversation

samsonasik
Copy link
Owner

@samsonasik samsonasik commented Sep 7, 2024

Allow when callable to optional, so can be like this:

        $data = [
            ' a ',
            ' b ',
            ' c ',
        ];

        $results = Collector::setUp($data)
            ->withTransform(fn (string $datum): string => trim($datum))
            ->getResults(); // ['a', 'b', 'c']

@samsonasik samsonasik marked this pull request as draft September 7, 2024 15:34
@samsonasik samsonasik marked this pull request as ready for review September 7, 2024 16:28
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d3c90d4) to head (f423102).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #25   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        44        45    +1     
===========================================
  Files              4         4           
  Lines            120       122    +2     
===========================================
+ Hits             120       122    +2     
Flag Coverage Δ
tests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@samsonasik samsonasik merged commit 1f4027d into main Sep 7, 2024
4 checks passed
@samsonasik samsonasik deleted the samsonasik-patch-1 branch September 7, 2024 16:37
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