We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dab59cc commit 854d69aCopy full SHA for 854d69a
1 file changed
app/Helper/MWTimestampHelper.php
@@ -15,11 +15,7 @@ class MWTimestampHelper {
15
private const MWTimestampFormat = 'YmdHis';
16
17
public static function getCarbonFromMWTimestamp(string $MWTimestamp): CarbonImmutable {
18
- try {
19
- $carbon = CarbonImmutable::createFromFormat(self::MWTimestampFormat, $MWTimestamp);
20
- } catch (InvalidFormatException $exception) {
21
- throw new InvalidFormatException('Unable to create Carbon object: invalid MW timestamp format', 0, $exception);
22
- }
+ $carbon = CarbonImmutable::createFromFormat(self::MWTimestampFormat, $MWTimestamp);
23
24
if (!$carbon instanceof CarbonImmutable) {
25
throw new InvalidFormatException('Unable to create Carbon object: parser did not return CarbonImmutable');
0 commit comments