From e5f4dd3db16097c044945b84c8f08e1e9e762625 Mon Sep 17 00:00:00 2001 From: Ben Bjurstrom Date: Thu, 19 Sep 2024 07:32:25 -0700 Subject: [PATCH] 71 remove unnecessary type check (#75) --- src/Models/Document.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Models/Document.php b/src/Models/Document.php index 165e954..be5e385 100644 --- a/src/Models/Document.php +++ b/src/Models/Document.php @@ -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()