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

Fix/issue 104 reduce cognitive complexity #105

Conversation

mohannaidu
Copy link

@mohannaidu mohannaidu commented May 22, 2022

Fixes #104

Change proposed in this PR:
• have extracted processing of methodinvocation node to new method
• refactored new method to return value or null instead of continue or break.

@RadikalJin
Copy link
Member

Hello @mohannaidu, and thank you for your contribution to Astra.

The changes are looking good - definitely helps to make the function simpler and easier to understand. Just a couple of suggestions:

  • Could the ‘if’ statement ‘break’ on line 81 be put in brackets please
  • Could the new function ‘processNode’ be named ‘updateNextChainedMethod’

After that I think we’re good to go.

renamed processNode as updateNextChainedMethod
@mohannaidu
Copy link
Author

Hi @RadikalJin

No problem. I have the changes as below:

  • added brackets for if statement
  • renamed processNode as updateNextChainedMethod

Let me know you need anything else and I am happy to look into it.

@RadikalJin RadikalJin merged commit f9615bb into alfasoftware:main May 24, 2022
@RadikalJin
Copy link
Member

Looks great, thank you @mohannaidu! Merging now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants