Skip to content

Start using Timing class in more places #1074

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

Merged
merged 2 commits into from
May 6, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 3, 2025

Description

Timing: add new getDurationSince() method

This method doesn't use the "system" run start time, but uses an arbitrary start time as provided via a parameter.

This allows for removing some duplicate code in various places.

Includes making the class final and explicitly marking this class as an internal class to allow for further changes in the future.

Start using Timing class in more places

... which allows for removing some duplicate code and streamlining consistent display of timing information.

Suggested changelog entry

Changed:

  • The PHP_CodeSniffer\Util\Timing class is now final and marked as an internal class.

jrfnl added 2 commits May 3, 2025 05:36
This method doesn't use the "system" run start time, but uses an arbitrary starttime as provided via a parameter.

This allows for removing some duplicate code in various places.

Includes making the class `final` and explicitly marking this class as an internal class to allow for further changes in the future.
... which allows for removing some duplicate code and streamlining consistent display of timing information.
@jrfnl jrfnl added this to the 4.0.0 milestone May 3, 2025
@jrfnl jrfnl requested a review from fredden May 3, 2025 03:39
@jrfnl jrfnl merged commit 292322b into 4.x May 6, 2025
164 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/use-timing-class-in-more-places branch May 6, 2025 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant