Skip to content

Commit 8221c19

Browse files
Fix return type
1 parent bcb4001 commit 8221c19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Configuration/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Bolt\Collection\DeepCollection;
88
use Bolt\Common\Arr;
9+
use Bolt\Configuration\Content\ContentType;
910
use Bolt\Configuration\Parser\BaseParser;
1011
use Bolt\Configuration\Parser\ContentTypesParser;
1112
use Bolt\Configuration\Parser\GeneralParser;
@@ -198,15 +199,15 @@ public function getMediaTypes(): Collection
198199
return new Collection($this->get('general/accept_media_types'));
199200
}
200201

201-
public function getContentType(string $name): ?Collection
202+
public function getContentType(string $name): ?ContentType
202203
{
203204
$name = mb_trim($name);
204205

205206
if ($this->has('contenttypes/' . $name)) {
206207
return $this->get('contenttypes/' . $name);
207208
}
208209

209-
/** @var Collection $cts */
210+
/** @var Collection<int, ContentType> $cts */
210211
$cts = $this->get('contenttypes');
211212

212213
foreach (['singular_slug', 'name', 'singular_name'] as $key) {

0 commit comments

Comments
 (0)