[PR #948] [MERGED] Lib framework code optimizations #1169

Closed
opened 2026-02-25 21:37:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/948
Author: @TheDigitalOrchard
Created: 4/13/2024
Status: Merged
Merged: 4/30/2024
Merged by: @kroky

Base: masterHead: lib-framework-code-optimizations


📝 Commits (8)

  • fe9f5af reduce function calls; fix whitespace
  • 6c378c1 expanded coverage of changes across all lib/ files; updated syntax to more closely adhere to PSR-12; changed array initializers to short-array (square bracket) syntax;
  • 2513658 missed semicolon
  • 8c14259 Merge branch 'master' into lib-framework-code-optimizations
  • 23bc528 Merge branch 'master' into lib-framework-code-optimizations
  • d7fd682 dash
  • 9fef798 fix merge conflicts
  • eb3fdc4 restore original logic for libsodium check, but using else/if statements intead of three separate if statements

📊 Changes

24 files changed (+300 additions, -382 deletions)

View changed files

📝 lib/api.php (+4 -4)
📝 lib/auth.php (+16 -19)
📝 lib/cache.php (+10 -10)
📝 lib/config.php (+48 -58)
📝 lib/crypt.php (+6 -6)
📝 lib/crypt_sodium.php (+2 -2)
📝 lib/db.php (+9 -12)
📝 lib/dispatch.php (+15 -30)
📝 lib/environment.php (+2 -3)
📝 lib/format.php (+8 -12)
📝 lib/framework.php (+9 -12)
📝 lib/ini_set.php (+1 -2)
📝 lib/module.php (+26 -32)
📝 lib/modules.php (+15 -18)
📝 lib/modules_exec.php (+5 -11)
📝 lib/oauth2.php (+3 -3)
📝 lib/output.php (+8 -15)
📝 lib/request.php (+21 -25)
📝 lib/servers.php (+6 -7)
📝 lib/session_base.php (+23 -23)

...and 4 more files

📄 Description

Pullrequest

No functional changes. Code cleanup, whitespace; short-array syntax; single quotes; closer adherence to PSR-12 syntax guidelines.

Now, I understand there may be some clashing with personal preferences, such as how "else" begins on the next line, but I did see some of the newer files already adhering to PSR-12, so figured this was a safe change to make.

(Sidenote, Packagist.org still says this library is compatible back to PHP 5, but that doesn't appear to be true anymore.)

Issues

  • None

Checklist

  • None

How2Test

  • None

Todo

  • None

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/948 **Author:** [@TheDigitalOrchard](https://github.com/TheDigitalOrchard) **Created:** 4/13/2024 **Status:** ✅ Merged **Merged:** 4/30/2024 **Merged by:** [@kroky](https://github.com/kroky) **Base:** `master` ← **Head:** `lib-framework-code-optimizations` --- ### 📝 Commits (8) - [`fe9f5af`](https://github.com/cypht-org/cypht/commit/fe9f5af2ee959bc2601614227a40ffc905642b97) reduce function calls; fix whitespace - [`6c378c1`](https://github.com/cypht-org/cypht/commit/6c378c1d740d117a47c797ec3f15c67ea2bf2b11) expanded coverage of changes across all lib/ files; updated syntax to more closely adhere to PSR-12; changed array initializers to short-array (square bracket) syntax; - [`2513658`](https://github.com/cypht-org/cypht/commit/251365833d8f8c5ab6a6a578ea3c78e2d396aa30) missed semicolon - [`8c14259`](https://github.com/cypht-org/cypht/commit/8c14259c3e4ca4d8992e4fdb3893cc705a03a62f) Merge branch 'master' into lib-framework-code-optimizations - [`23bc528`](https://github.com/cypht-org/cypht/commit/23bc5289947f8fc913dd9cc428a81eaecbda79a9) Merge branch 'master' into lib-framework-code-optimizations - [`d7fd682`](https://github.com/cypht-org/cypht/commit/d7fd682619603cb4b72294b0ed0f1e4d5e0e766c) dash - [`9fef798`](https://github.com/cypht-org/cypht/commit/9fef7983cf085e5a506c3cc112164a8fe2982749) fix merge conflicts - [`eb3fdc4`](https://github.com/cypht-org/cypht/commit/eb3fdc42159b7974b935e63eb357142d62d5d50a) restore original logic for libsodium check, but using `else/if` statements intead of three separate `if` statements ### 📊 Changes **24 files changed** (+300 additions, -382 deletions) <details> <summary>View changed files</summary> 📝 `lib/api.php` (+4 -4) 📝 `lib/auth.php` (+16 -19) 📝 `lib/cache.php` (+10 -10) 📝 `lib/config.php` (+48 -58) 📝 `lib/crypt.php` (+6 -6) 📝 `lib/crypt_sodium.php` (+2 -2) 📝 `lib/db.php` (+9 -12) 📝 `lib/dispatch.php` (+15 -30) 📝 `lib/environment.php` (+2 -3) 📝 `lib/format.php` (+8 -12) 📝 `lib/framework.php` (+9 -12) 📝 `lib/ini_set.php` (+1 -2) 📝 `lib/module.php` (+26 -32) 📝 `lib/modules.php` (+15 -18) 📝 `lib/modules_exec.php` (+5 -11) 📝 `lib/oauth2.php` (+3 -3) 📝 `lib/output.php` (+8 -15) 📝 `lib/request.php` (+21 -25) 📝 `lib/servers.php` (+6 -7) 📝 `lib/session_base.php` (+23 -23) _...and 4 more files_ </details> ### 📄 Description ## Pullrequest No functional changes. Code cleanup, whitespace; short-array syntax; single quotes; closer adherence to PSR-12 syntax guidelines. Now, I understand there may be some clashing with personal preferences, such as how "else" begins on the next line, but I did see some of the newer files already adhering to PSR-12, so figured this was a safe change to make. _(Sidenote, Packagist.org still says this library is compatible back to PHP 5, but that doesn't appear to be true anymore.)_ ### Issues <!-- Which Issues does this fix, which are related? - fixes #XXX - relates #XXX --> - [X] None ### Checklist <!-- Anything important to be thought of when deploying? - [ ] Config Update - [ ] Breaking/critical change --> - [X] None ### How2Test <!-- Give a detailed description how to test your PR and confirm it is working as expected. --> <!-- Maintainers will check the Tests - [ ] Test1 - [ ] Test2 --> - [X] None ### Todo <!-- In case some parts are still missing, list them here. - [ ] Changelog --> - [X] None --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:37:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#1169
No description provided.