buggregator / trap

Buggregator local debug server for PHP projects as composer package
https://buggregator.dev
BSD 3-Clause "New" or "Revised" License
102 stars 8 forks source link

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

Closed lee-to closed 1 month ago

lee-to commented 1 month ago

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

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

roxblnfk commented 1 month ago

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

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

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