Skip to content
Permalink
Browse files

Fix #1972 - improve understanding of how setcookie works

  • Loading branch information...
muglug committed Jul 28, 2019
1 parent e58ade5 commit de932c4c18efcbb80d332c4bde4d0fb07305783c
Showing with 15 additions and 0 deletions.
  1. +1 −0 src/Psalm/Internal/CallMap.php
  2. +14 −0 tests/FunctionCallTest.php
'set_magic_quotes_runtime' => ['bool', 'new_setting'=>'bool'],
'set_time_limit' => ['bool', 'seconds'=>'int'],
'setcookie' => ['bool', 'name'=>'string', 'value='=>'string', 'expires='=>'int', 'path='=>'string', 'domain='=>'string', 'secure='=>'bool', 'httponly='=>'bool'],
'setcookie\'1' => ['bool', 'name'=>'string', 'value='=>'string', 'options='=>'array'],
'setLeftFill' => ['void', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'setLine' => ['void', 'width'=>'int', 'red'=>'int', 'green'=>'int', 'blue'=>'int', 'a='=>'int'],
'setlocale' => ['string|false', 'category'=>'int', 'locale'=>'string', '...args='=>'string'],
@@ -1793,6 +1793,20 @@ function foo(int $a, string $b, bool $c) : array {
return compact("a", "b", "c");
}',
],
'PHP73-setCookiePhp73' => [
'<?php
setcookie(
"name",
"value",
[
"path" => "/",
"expires" => 0,
"httponly" => true,
"secure" => true,
"samesite" => "Lax"
]
);',
],
];
}

0 comments on commit de932c4

Please sign in to comment.
You can’t perform that action at this time.