FriendsOfREDAXO / yrewrite_scheme

Stellt verschiedene URL-Schemes für YRewrite mehrsprachig zur Verfügung
MIT License
37 stars 7 forks source link

code refactor / review #44

Closed skerbis closed 1 year ago

skerbis commented 1 year ago

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 commented 1 year ago

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!