GravityPDF / querypath

A fork of QueryPath: a PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP8.3 support
Other
21 stars 2 forks source link

Fix return value of wrapAll() when count() is 0 #44

Open jakejackson1 opened 1 year ago

jakejackson1 commented 1 year ago

When $this->matches->count() is 0 in QueryMutators::wrapAll() it returns void, but the method is type hinted to return DOMQuery (the current object).

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

-

-

Does this introduce a breaking change?

Other information

TODO: Unit Test, manual testing, ensure no breaking changes

codecov[bot] commented 1 year ago

Codecov Report

Merging #44 (c6699f9) into main (4280f56) will not change coverage. The diff coverage is 0.00%.

@@            Coverage Diff            @@
##               main      #44   +/-   ##
=========================================
  Coverage     88.40%   88.40%           
  Complexity     1349     1349           
=========================================
  Files            26       26           
  Lines          3088     3088           
=========================================
  Hits           2730     2730           
  Misses          358      358           
Impacted Files Coverage Δ
src/Helpers/QueryMutators.php 95.34% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.