8000 Remove getRequestContentType as it's only used once · symfony/symfony@d21f2c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit d21f2c2

Browse files
committed
Remove getRequestContentType as it's only used once
1 parent 9b94dde commit d21f2c2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,9 @@ public function getContentType()
273273
return $this->data['content_type'];
274274
}
275275

276-
public function getRequestContentType()
277-
{
278-
return $this->data['request_headers']['content-type'];
279-
}
280-
281276
public function isRequestJSON()
282277
{
283-
return 1 === preg_match('{^application/[a-z]*?\+?json$}i', $this->getRequestContentType());
278+
return 1 === preg_match('{^application/[a-z]*?\+?json$}i', $this->data['request_headers']['content-type']);
284279
}
285280

286281
public function getStatusText()

0 commit comments

Comments
 (0)
0