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

Throw exception when empty inputs found #169

Closed DeepDiver1975 closed 4 years ago

DeepDiver1975 commented 5 years ago

When input retrieved from stream_get_contents is empty string, then it would be safe to throw exceptions from the parse and expect methods.

Signed-off-by: Sujith H sharidasan@owncloud.com

master version of #166

codecov[bot] commented 5 years ago

Codecov Report

Merging #169 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #169      +/-   ##
===========================================
+ Coverage     97.58%   97.6%   +0.02%     
- Complexity      112     114       +2     
===========================================
  Files            13      13              
  Lines           456     460       +4     
===========================================
+ Hits            445     449       +4     
  Misses           11      11
Impacted Files Coverage Δ Complexity Δ
lib/Service.php 100% <100%> (ø) 20 <0> (+2) :arrow_up:

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 e8e9bb3...cafb5c0. Read the comment docs.

DeepDiver1975 commented 4 years ago

@staabm mind reviewing? THX

DeepDiver1975 commented 4 years ago

FYI - this is just the merge of the original PR which targeted 2.1 - see #166