sabre-io / xml

sabre/xml is an XML library that you may not hate.
http://sabre.io/xml/
BSD 3-Clause "New" or "Revised" License
516 stars 77 forks source link

Prevent infinite loop on empty xml elements #158

Closed DeepDiver1975 closed 5 years ago

DeepDiver1975 commented 5 years ago

refs #132 and #146

About dropping code coverage: it is hard to make reader->read() to return false and hit these 5 lines. The only possibility would be to mock the reader and fake this behavior - which is very unlikly.

I never the less would like to keep these checks since they can cause trouble if the occur.

ToDo

codecov[bot] commented 5 years ago

Codecov Report

Merging #158 into master will decrease coverage by 1.28%. The diff coverage is 62.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #158      +/-   ##
============================================
- Coverage     98.87%   97.58%   -1.29%     
  Complexity      112      112              
============================================
  Files            13       13              
  Lines           444      456      +12     
============================================
+ Hits            439      445       +6     
- Misses            5       11       +6
Impacted Files Coverage Δ Complexity Δ
lib/Deserializer/functions.php 89.69% <62.5%> (-5.61%) 0 <0> (ø)

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 fe7c953...cde4364. Read the comment docs.

staabm commented 5 years ago

after getting in the changes discussed in https://github.com/sabre-io/xml/pull/159 we get move ahead.

thx

rullzer commented 5 years ago

:+1: good stuff @DeepDiver1975