refactor: extract the duplicated timespan lookup in cycle.php - #30
Draft
somethingwithproof wants to merge 1 commit into
Draft
refactor: extract the duplicated timespan lookup in cycle.php#30somethingwithproof wants to merge 1 commit into
somethingwithproof wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Cycle plugin’s PHP files by enabling strict typing and updating some legacy syntax to PHP 7.4-era constructs.
Changes:
- Added
declare(strict_types=1);across plugin PHP entrypoints. - Converted some
array(...)usages to short array syntax ([...]) and updated prepared-statement parameter arrays accordingly. - Introduced two
.omc/sessions/*.jsonfiles (appear to be local tooling artifacts).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.php | Adds strict typing and updates a couple of arrays to short syntax. |
| functions.php | Adds strict typing and partially modernizes arrays/params in several functions. |
| cycle.php | Adds strict typing and updates a few array() initializations / prepared params. |
| index.php | Adds strict typing to the plugin redirect entrypoint. |
| images/index.php | Adds strict typing to the redirect stub. |
| locales/index.php | Adds strict typing to the redirect stub. |
| locales/LC_MESSAGES/index.php | Adds strict typing to the redirect stub. |
| .omc/sessions/859688d5-ece7-4d1e-ab13-c82d820e7440.json | New session JSON file (likely unintended). |
| .omc/sessions/42a5a3ed-3430-434f-addf-dc7423bda6d8.json | New session JSON file (likely unintended). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
somethingwithproof
marked this pull request as draft
April 11, 2026 00:09
Member
Author
|
Converted to draft to serialize the stack in this repo. Blocked by #27; will un-draft after that merges to avoid cross-PR merge conflicts. |
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
refactor/modernization
branch
from
August 20, 2026 08:47
289ff04 to
bec4b04
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cycle_graphs()andcycle()built the graph timespan with the same three lines. This moves them intocycle_get_timespan()and calls it from both.Also drops a stray space before a comma at the second call site.
Rebuilt on current develop. The earlier version of this branch predated #27, which had already converted the array syntax, so most of it was redundant and it no longer rebased cleanly.
No behaviour change.