-
Notifications
You must be signed in to change notification settings - Fork 0
Release 2.15.3: Code quality improvements #128
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
Conversation
The composer.json version must match the release version in order for packagist to pick it up.
if (condition) { return true; } else { return false; }
can be reduced to:
return condition;
Less return statements is easier to debug, and makes Sonar
Qube happy.
Corrected 3 return statements which were of the form return (condition); There is no need for the ()'s.
Created a constant for when group insert fails. It is a template, so it can be used in an sprintf().
assertEquals(a,b,msg) is better code than assertTrue(a === b, msg).
assertSame supposedly does type checking too.
When the group does or does not exist, that may cause an exception.
PHP files generally should end on a new line.
It doesn't make sense to try to update Group Settings when there aren't Group Settings to update.
By setting the permissions of the copied files and ending with USER 1000, a non-privileged user should be used
Sure I have to change, but I end with non-root too!
This should be safer.
This will avoid accidentally copying git development things, jetbrain IDE things, etcetera into the docker container.
Merging RUN commands where possible, and use WORKDIR instead of "cd"
|
| chmod 664 /data/SilMock/tests/.phpunit.result.cache | ||
|
|
||
| WORKDIR /data | ||
| RUN ./composer-install.sh && mv /data/composer.phar /usr/bin/composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If at some point you want to simplify this (to possibly get rid of the need for a composer-install.sh script), you can also just copy the composer binary from their Docker image, like so:
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
You can use whatever version tag you want to, after the colon in that --from parameter.



Add
Fix