Skip to content

Code Cleanup#648

Merged
Groruk merged 23 commits intosbpp:v1.xfrom
rannmann:v1.x
Feb 10, 2020
Merged

Code Cleanup#648
Groruk merged 23 commits intosbpp:v1.xfrom
rannmann:v1.x

Conversation

@rannmann
Copy link

@rannmann rannmann commented Feb 3, 2020

Description

  • Added a bunch of missing PHPDoc
  • Fixed some incorrect PHPDoc
  • Split many long lines into shorter lines
  • Fixed namespace references
  • Added brackets to if statments
  • Converted instances of else if to elseif for consistency
  • Rearranged some elseif and else statements to be on the same line as the closing and opening braces for the previous and current statement respectively
  • Fixed some files containing windows crlf and converted to unix-style endings to match the rest of the repo
  • Updated some files that used tab indents to 4-space indents to match the rest of the repo
  • Updated some files that used 2-space indents to 4-space indents to match the rest of the repo
  • Fixed a couple error messages so they read better
  • Fixed themes/default/box_admin_log_search.tpl smarty template missing close quote: rannmann@c72a6ca
  • Fixed javascript being interpreted as smarty command and fatal erroring: rannmann@ca191d1
  • Fixed HasAccess returning void instead of a boolean: rannmann@6acf811#diff-6646d03ff13ddcd0c500775df94a20b1R147

Each changed file was committed separately for readability. EOL/Spacing commits were done separately since they're just whitspace changes and every single line is touched by them.

The majority of the work was done in sb-callback.php: rannmann@892199d

I know these types of changes aren't generally received well, but at the very least I think the phpdoc changes are important. If you'd like me to revert the EOL/Spacing changes I have no problems doing so.

Motivation and Context

This is an effort to improve code quality. No real code changes were made except for a minor bugfix to the admin log search template mentioned above.

How Has This Been Tested?

  • Loaded every page
  • Looked through PHP error log. One bug was found and fixed, but it wasn't introduced in this branch

There's not really a lot to test since almost all these changes are whitespace or php comments.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@Groruk Groruk merged commit 194edab into sbpp:v1.x Feb 10, 2020
@Groruk Groruk mentioned this pull request May 26, 2020
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