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 refactor / review #44

Merged
merged 1 commit into from
Aug 29, 2023
Merged

code refactor / review #44

merged 1 commit into from
Aug 29, 2023

Conversation

skerbis
Copy link
Member

@skerbis skerbis commented Jul 25, 2023

Changes Made to the PHP Code

  1. Variable names: Changed variable names to follow the camelCase naming convention for better readability.

  2. Use strict comparison: Replaced loose comparison (==) with strict comparison (===) where appropriate for better type checking.

  3. Simplify conditional checks: Used strict comparison directly in if conditions where needed to avoid unnecessary type coercion.

  4. Replaced elseif with else if: Changed elseif to else if for consistency in code style.

  5. Use single quotes: Changed double quotes to single quotes for string literals that don't require variable interpolation to improve performance.

  6. Removed redundant comments: Removed some redundant and obvious comments to keep the code clean.

  7. Simplify ternary condition: Simplified ternary condition in getCustomUrl() method for better readability.

  8. Minor formatting: Adjusted some indentation and line breaks to improve code formatting and readability.

These changes should help improve the code's readability and maintainability while not affecting its functionality or performance.

## Changes Made to the PHP Code

1. Variable names: Changed variable names to follow the camelCase naming convention for better readability.

2. Use strict comparison: Replaced loose comparison (`==`) with strict comparison (`===`) where appropriate for better type checking.

3. Simplify conditional checks: Used strict comparison directly in `if` conditions where needed to avoid unnecessary type coercion.

4. Replaced `elseif` with `else if`: Changed `elseif` to `else if` for consistency in code style.

5. Use single quotes: Changed double quotes to single quotes for string literals that don't require variable interpolation to improve performance.

6. Removed redundant comments: Removed some redundant and obvious comments to keep the code clean.

7. Simplify ternary condition: Simplified ternary condition in `getCustomUrl()` method for better readability.

8. Minor formatting: Adjusted some indentation and line breaks to improve code formatting and readability.

These changes should help improve the code's readability and maintainability while not affecting its functionality or performance.
@tyrant88
Copy link
Member

tyrant88 commented Jul 25, 2023

These changes should help improve the code's readability and maintainability while not affecting its functionality or performance.

Ich hatte gerade den Fall in ycom, wo in einem in_array() der strict-parameter auf true gesetzt wurde und der Code nicht mehr funktioniert. Also die strikte Typ-Prüfung nicht unterschätzen!

@skerbis skerbis merged commit 2f560ea into master Aug 29, 2023
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