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

Clean up code and fix linter warnings #1

Merged
merged 6 commits into from
Oct 17, 2024
Merged

Clean up code and fix linter warnings #1

merged 6 commits into from
Oct 17, 2024

Conversation

daniil-berg
Copy link
Contributor

  • Add return/parameter/property types wherever possible
  • Use imports/aliases instead of qualifiers wherever possible
  • Use shorthand array literal notation
  • Use array destructuring instead of list assignments
  • Remove redundant PHPdocs in a few inherited methods
  • Improve readability in a few instances
    • Use more consistent indentation
    • Use named arguments in function calls with many arguments
    • Use string interpolation instead of concatenation if possible
  • Define custom user_2fa_loggedin::create_and_trigger method
  • Add some TODOs

- Add return/parameter/property types wherever possible
- Use imports/aliases instead of qualifiers wherever possible
- Use shorthand array literal notation
- Use array destructuring instead of `list` assignments
- Remove redundant PHPdocs in a few inherited methods
- Improve readability in a few instances
  * Use more consistent indentation
  * Use named arguments in function calls with many arguments
  * Use string interpolation instead of concatenation if possible
- Define custom `user_2fa_loggedin::create_and_trigger` method
- Add some TODOs
@daniil-berg daniil-berg self-assigned this Sep 6, 2024
@daniil-berg daniil-berg force-pushed the lint-cleanup branch 3 times, most recently from 4f8a228 to e9ea198 Compare September 19, 2024 09:48
- Add `templates/manage_form.mustache`
- Remove redundant `label` tags because they appear inside the selector
  element already via the option groups (analogous to the forum
  subscriber selectors)
- Render template with selector HTML and other context from `manage.php`
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/event/user_2fa_loggedin.php Show resolved Hide resolved
classes/privacy/provider.php Show resolved Hide resolved
classes/privacy/provider.php Show resolved Hide resolved
classes/privacy/provider.php Show resolved Hide resolved
index.php Outdated Show resolved Hide resolved
manage.php Outdated Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
classes/condition.php Show resolved Hide resolved
lang/de/availability_shibboleth2fa.php Outdated Show resolved Hide resolved
templates/manage_form.mustache Outdated Show resolved Hide resolved
Add back "redundant" return value descriptions in docblocks
Improve readability slightly
@daniil-berg daniil-berg merged commit 65bee9b into main Oct 17, 2024
6 checks passed
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.

3 participants