Skip to content

Commit

Permalink
71 remove unnecessary type check (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjurstrom authored Sep 19, 2024
1 parent 27b98f4 commit e5f4dd3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Models/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ protected function frontmatter(): Attribute
throw new TypeError('Front matter class set in prezet.data.frontmatter must be a string');
}

if (! is_subclass_of($fmClass, FrontmatterData::class)) {
throw new TypeError('Front matter class set in prezet.data.frontmatter must extend '.FrontmatterData::class);
}

return $fmClass::fromJson($value);
},
set: fn (FrontmatterData $value) => $value->toJson()
Expand Down

0 comments on commit e5f4dd3

Please sign in to comment.