Skip to content

Commit

Permalink
refactor: Remove dead block of code
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyvdSluijs committed May 21, 2024
1 parent b580100 commit 67cff3b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/JsonSchema/Constraints/FormatConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@ protected function validateDateTime($datetime, $format)
return true;
}

// handles the case where a non-6 digit microsecond datetime is passed
// which will fail the above string comparison because the passed
// $datetime may be '2000-05-01T12:12:12.123Z' but format() will return
// '2000-05-01T12:12:12.123000Z'
if ((strpos('u', $format) !== -1) && (preg_match('/\.\d+Z$/', $datetime))) {
return true;
}

return false;
}

Expand Down

0 comments on commit 67cff3b

Please sign in to comment.