-
Notifications
You must be signed in to change notification settings - Fork 53
add missing type declarations #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,15 +91,13 @@ public function handleRequest(RequestInterface $request, callable $next, callabl | |
/** | ||
* Creates a cookie from a string. | ||
* | ||
* @param $setCookie | ||
* | ||
* @return Cookie|null | ||
* | ||
* @throws TransferException | ||
*/ | ||
private function createCookie(RequestInterface $request, $setCookie) | ||
private function createCookie(RequestInterface $request, string $setCookieHeader) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we'd need PHP 7.1 for that. Is there any reason why 2.x is php 7.0+ and not 7.1+. 7.0 is EOL already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thats why i did not do it. but i wondered the same. happy to move to 7.1+. wdyt @Nyholm ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. Lets do PHP7.1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool! however, i'd prefer to do that in a separate pull request, as it will entail quite a lot of changes. |
||
{ | ||
$parts = array_map('trim', explode(';', $setCookie)); | ||
$parts = array_map('trim', explode(';', $setCookieHeader)); | ||
|
||
if (empty($parts) || !strpos($parts[0], '=')) { | ||
return null; | ||
|
@@ -169,11 +167,9 @@ private function createCookie(RequestInterface $request, $setCookie) | |
/** | ||
* Separates key/value pair from cookie. | ||
* | ||
* @param $part | ||
* | ||
* @return array | ||
* @param string $part A single cookie value in format key=value | ||
*/ | ||
private function createValueKey($part) | ||
private function createValueKey(string $part): array | ||
{ | ||
$parts = explode('=', $part, 2); | ||
$key = trim($parts[0]); | ||
|
Uh oh!
There was an error while loading. Please reload this page.