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

Add trap()->code() sugar #103

Merged
merged 4 commits into from
May 29, 2024
Merged

Conversation

lee-to
Copy link
Contributor

@lee-to lee-to commented May 26, 2024

What was changed

Nothing changes, just sugar

Before

trap()->context(language: 'php')

After

trap()->code('php')

Why?

The presence of a method will give you an immediate understanding of the presence of this feature even without referring to the documentation, it will be easier to remember, and it will be immediately clear what’s what

Checklist

  • Tested
    • Tested manually
    • Unit tests added
  • Documentation

@lotyp lotyp requested a review from roxblnfk May 26, 2024 09:03
Copy link

codecov bot commented May 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.25%. Comparing base (78873fb) to head (4852dfd).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #103      +/-   ##
============================================
+ Coverage     24.21%   24.25%   +0.04%     
- Complexity     1122     1123       +1     
============================================
  Files           129      129              
  Lines          3403     3405       +2     
============================================
+ Hits            824      826       +2     
  Misses         2579     2579              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roxblnfk roxblnfk added the enhancement New feature or request label May 27, 2024
@roxblnfk roxblnfk added this to the 1.8.0 milestone May 27, 2024
@roxblnfk
Copy link
Member

roxblnfk commented May 27, 2024

Need to think about the meaning.
Does ->highlight('php') look clear?
Or something like ->language('php'), ->syntax('php') are more clear.

Also tests and a function description are required.

@lee-to
Copy link
Contributor Author

lee-to commented May 27, 2024

Need to think about the meaning. Does ->highlight('php') look clear? Or something like ->language('php'), ->syntax('php') are more clear.

Also tests and a function description are required.

I think highlight because even in the documentation the section is called highlight and we are talking about output

If we speak syntax or language, it is not immediately clear what exactly this affects

@roxblnfk roxblnfk changed the title chore: Syntax sugar highlight Add trap()->code() sugar May 27, 2024
src/Client/TrapHandle.php Outdated Show resolved Hide resolved
src/Client/TrapHandle.php Outdated Show resolved Hide resolved
Co-authored-by: Aleksei Gagarin <roxblnfk@ya.ru>
@roxblnfk roxblnfk merged commit 043e632 into buggregator:master May 29, 2024
19 of 21 checks passed
@roxblnfk
Copy link
Member

Thanks
I think the bug with named arguments in Buggregator Server shouldn't block us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants