Skip to content

Commit

Permalink
Code checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Aug 27, 2019
1 parent 5219e11 commit c738cc3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Parser/ParserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ public static function parseChildNodes(DomNode $domNode, $nodeName, AbstractMode
* @return DateTime|null Returns the date/time in case of success, null otherwise.
*/
public static function parseDateTime($value) {
$result = DateTime::createFromFormat("YmdHis O", $value);
if (false === $result) {

$dateTime = DateTime::createFromFormat("YmdHis O", $value);
if (false === $dateTime) {
return null;
}
return $result;

return $dateTime;
}

/**
Expand Down

0 comments on commit c738cc3

Please sign in to comment.