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

Specify button renderer callable type #143

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Specify button renderer callable type #143

merged 2 commits into from
Dec 5, 2023

Conversation

vjik
Copy link
Member

@vjik vjik commented Dec 5, 2023

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues comma-separated list of tickets # fixed by the PR, if any

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3495a4b) 92.16% compared to head (1547cea) 92.16%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #143   +/-   ##
=========================================
  Coverage     92.16%   92.16%           
  Complexity      460      460           
=========================================
  Files            29       29           
  Lines          1620     1620           
=========================================
  Hits           1493     1493           
  Misses          127      127           

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

Copy link

what-the-diff bot commented Dec 5, 2023

PR Summary

  • Added new type definition to two classes
    This update brings a new type definition called ButtonRenderer. This has been added to both ActionColumn and ActionColumnRenderer classes.

  • Removed unused statement from a class
    In a housekeeping move, an unused use Closure statement has been removed from the ActionColumnRenderer class. This doesn't make any noticeable changes but helps keep our code clean.

  • Retyped a property
    The defaultButtons property had its type updated from an array of closures (special type of function) to an array of the new ButtonRenderer.

  • Updated Construction method in a class
    The __construct method of ActionColumnRenderer class held an update to accept null for the defaultButtons parameter. Providing null now won't cause any issues when creating objects of this class, increasing flexibility in use.

  • Functionality modification in the class
    The anonymous function within the ActionColumnRenderer class has been enhanced to return the result of $buttons[$name]($url) as a string. This small change guarantees that this function will always produce a string output. This consistency can simplify future development work.

@vjik vjik merged commit 601909c into master Dec 5, 2023
19 checks passed
@vjik vjik deleted the button-closure-type branch December 5, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants