Skip to content

Commit

Permalink
Added braces for all control flow statements in lib/src/readers/packa…
Browse files Browse the repository at this point in the history
…ge_reader.dart
  • Loading branch information
orthros committed May 16, 2019
1 parent 9a2e688 commit a1a1e44
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/src/readers/package_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ class PackageReader {
break;
}
});
if (guideReference.Type == null || guideReference.Type.isEmpty)
if (guideReference.Type == null || guideReference.Type.isEmpty) {
throw new Exception("Incorrect EPUB guide: item type is missing");
if (guideReference.Href == null || guideReference.Href.isEmpty)
}
if (guideReference.Href == null || guideReference.Href.isEmpty) {
throw new Exception("Incorrect EPUB guide: item href is missing");
}
result.Items.add(guideReference);
}
});
Expand Down Expand Up @@ -91,13 +93,16 @@ class PackageReader {
}
});

if (manifestItem.Id == null || manifestItem.Id.isEmpty)
if (manifestItem.Id == null || manifestItem.Id.isEmpty) {
throw new Exception("Incorrect EPUB manifest: item ID is missing");
if (manifestItem.Href == null || manifestItem.Href.isEmpty)
}
if (manifestItem.Href == null || manifestItem.Href.isEmpty) {
throw new Exception("Incorrect EPUB manifest: item href is missing");
if (manifestItem.MediaType == null || manifestItem.MediaType.isEmpty)
}
if (manifestItem.MediaType == null || manifestItem.MediaType.isEmpty) {
throw new Exception(
"Incorrect EPUB manifest: item media type is missing");
}
result.Items.add(manifestItem);
}
});
Expand Down

0 comments on commit a1a1e44

Please sign in to comment.