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 default value in InputGroupTrait.php #372

Merged
merged 2 commits into from
May 18, 2022
Merged

Conversation

umer936
Copy link
Contributor

@umer936 umer936 commented Apr 27, 2022

Description

Adds a default null value for templateVars in InputGroupTrait.php so

'templateVars' => $data['templateVars'],
does not print a notice that it is missing.

Fixes #370

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #372 (d6a767f) into master (86fc099) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #372   +/-   ##
=========================================
  Coverage     99.23%   99.23%           
  Complexity      369      369           
=========================================
  Files            21       21           
  Lines          1046     1046           
=========================================
  Hits           1038     1038           
  Misses            8        8           
Impacted Files Coverage Δ
src/View/Widget/InputGroupTrait.php 96.77% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86fc099...d6a767f. Read the comment docs.

@ndm2
Copy link
Collaborator

ndm2 commented Apr 28, 2022

This should ideally have some small tests for the individual input type methods, similar to eg FormHelperTest::testAddOnPrependedText().

@ndm2
Copy link
Collaborator

ndm2 commented May 7, 2022

ping @umer936 Can you add tests for it? If not, I can add some.

@umer936
Copy link
Contributor Author

umer936 commented May 9, 2022

I can, but I think it would be quicker if you get to it bc (tbh) I don't use tests much 😅.
I need to work on making tests for things and then next time I submit a PR, I'll have the test(s) there.
Thanks :)

@ndm2 ndm2 merged commit 32059df into FriendsOfCake:master May 18, 2022
@umer936 umer936 deleted the patch-1 branch May 23, 2022 15:26
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.

Notice of undefined index on using prepend for inputs
2 participants