Skip to content

Commit 7ee84b5

Browse files
committed
Inline simplified method
1 parent 26b2104 commit 7ee84b5

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

packages/framework/src/Framework/Actions/CreatesNewPublicationType.php

+4-14
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ protected function handleCreate(): void
3939
(new PublicationType(
4040
$this->name,
4141
$this->canonicalField ?? '__createdAt',
42-
$this->detailTemplateName(),
43-
$this->listTemplateName(),
42+
'detail',
43+
'list',
4444
[
4545
$this->sortField ?? '__createdAt',
4646
$this->sortAscending ?? true,
@@ -54,16 +54,6 @@ protected function handleCreate(): void
5454
$this->createListTemplate();
5555
}
5656

57-
protected function detailTemplateName(): string
58-
{
59-
return 'detail';
60-
}
61-
62-
protected function listTemplateName(): string
63-
{
64-
return 'list';
65-
}
66-
6757
protected function createDetailTemplate(): void
6858
{
6959
$contents = <<<'BLADE'
@@ -97,7 +87,7 @@ protected function createDetailTemplate(): void
9787
@endsection
9888
BLADE;
9989

100-
$this->savePublicationFile("{$this->detailTemplateName()}.blade.php", $contents);
90+
$this->savePublicationFile("detail.blade.php", $contents);
10191
}
10292

10393
protected function createListTemplate(): void
@@ -121,7 +111,7 @@ protected function createListTemplate(): void
121111
@endsection
122112
BLADE;
123113

124-
$this->savePublicationFile("{$this->listTemplateName()}.blade.php", $contents);
114+
$this->savePublicationFile("list.blade.php", $contents);
125115
}
126116

127117
protected function savePublicationFile(string $filename, string $contents): int

0 commit comments

Comments
 (0)