@@ -22,9 +22,9 @@ public function setUp(): void
2222 try {
2323 /** @var Model&HasPageAttributes $page */
2424 $ page = $ this ->getRecord ();
25- if (method_exists ( $ page , ' isPublished ' ) && ! $ page ->isPublished ()) {
25+ if (! $ page ->isPublished ()) {
2626 $ page ->setAttribute ('publishing_begins_at ' , Carbon::now ());
27- if (method_exists ( $ page , ' wasUnpublished ' ) && $ page ->wasUnpublished ()) {
27+ if ($ page ->wasUnpublished ()) {
2828 $ page ->setAttribute ('publishing_ends_at ' , null );
2929 }
3030 $ page ->save ();
@@ -56,18 +56,18 @@ public function setUp(): void
5656 return response ();
5757 });
5858 $ this ->label (function () {
59- /* @var Model| HasPageAttributes $page */
59+ /** @var Model& HasPageAttributes $page */
6060 $ page = $ this ->getRecord ();
61- if (method_exists ( $ page , ' isPublished ' ) && $ page ->isPublished ()) {
61+ if ($ page ->isPublished ()) {
6262 return trans ('filament-flexible-content-blocks::filament-flexible-content-blocks.table_action.publish.unpublish_lbl ' );
6363 } else {
6464 return trans ('filament-flexible-content-blocks::filament-flexible-content-blocks.table_action.publish.publish_lbl ' );
6565 }
6666 });
6767 $ this ->icon (function () {
68- /** @var Model| HasPageAttributes $page */
68+ /** @var Model& HasPageAttributes $page */
6969 $ page = $ this ->getRecord ();
70- if (method_exists ( $ page , ' isPublished ' ) && $ page ->isPublished ()) {
70+ if ($ page ->isPublished ()) {
7171 return 'heroicon-o-eye-slash ' ;
7272 } else {
7373 return 'heroicon-o-eye ' ;
0 commit comments