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

Code review #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Code review #1

wants to merge 5 commits into from

Conversation

kasperg
Copy link

@kasperg kasperg commented Apr 10, 2022

👍 Solid work

Reviewing code in a new repository can be tricky as there is usually no PR containing all the changes. I have tried to provide comments that I suggest should lead directly to changes to the codebase as commits in this PR with the commit comment explaining the reasoning behind. I suggest you go through each of these and cherry pick the ones that you agree with. Note that the changes are entirely untested.

Some additional comments for your consideration:

  1. The part about the naming of the module is hugely important. I am glad that it is documented.
  2. There is a high level of code comments in this module. In general this is appreciated but try to keep it at a level where is explains why code is needed. Explaining what code does should only be used for large chunks of complex code. As an example it should not be needed here:
            // Increment total_count.
            $ims_holding['total_count']++;

kasperg added 5 commits April 10, 2022 13:06
The implementation only contains a single exception class but the
code refers to multiple classes ImsServiceException and ImsException.

There does not seem to be a need for multiple exception classes so
only use one: ImsException.

Update code referring to ImsServiceException accordingly.
Code located in the module should not be executed if the module is
not enabled.
It is unneeded and variable assignment in arguments is confusing.
The inner exception (usually SoapFault) may include valuable
information which is not a part of the exception message.
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.

1 participant