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

refactor: Update cross product operation in point free style. #177

Merged
merged 4 commits into from
Aug 18, 2021

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Aug 15, 2021

This PR:

  • Update Product in point free style.
  • Has unit tests (phpspec)
  • Has static analysis tests (psalm, phpstan)

@drupol
Copy link
Collaborator Author

drupol commented Aug 15, 2021

It seems that there is an issue with the latest PSalm version (4.9.3)... investigating.

@drupol drupol changed the title refactor: Update Cross product operation in point free style refactor: Update cross product operation in point free style Aug 15, 2021
@drupol drupol added the enhancement New feature or request label Aug 15, 2021
@drupol drupol changed the title refactor: Update cross product operation in point free style refactor: Update cross product operation in point free style. Aug 15, 2021
@drupol drupol force-pushed the refactor/update-cross-product-operation branch from f8aa923 to 91535c3 Compare August 16, 2021 10:20
@drupol
Copy link
Collaborator Author

drupol commented Aug 16, 2021

I updated drupol/php-conventions so it doesn't install version 4.9.3 of Psalm.

@drupol drupol marked this pull request as ready for review August 16, 2021 20:09
@drupol drupol enabled auto-merge (squash) August 17, 2021 21:21
Copy link
Collaborator

@AlexandruGG AlexandruGG left a comment

Choose a reason for hiding this comment

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

I cannot see the Psalm issue anymore but looks like you sorted it by restricting the version so should be fine for now.

On a separate note, I think this new form is extremely difficult to follow and understand 😅.
What do you think of using some variables just to make it a bit easier to follow? It shouldn't affect performance too much.

For example, storing this closure in a variable. Same for the others, and then combining in the Pipe. Alternatively, we could add comments to show what each one represents?

@drupol drupol merged commit 0fe81c7 into master Aug 18, 2021
@drupol drupol deleted the refactor/update-cross-product-operation branch August 18, 2021 19:08
@AlexandruGG
Copy link
Collaborator

@drupol auto-merge got me again 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants