File tree 3 files changed +9
-9
lines changed
src/Symfony/Component/HttpFoundation
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ CHANGELOG
16
16
` IniSizeFileException ` , ` NoFileException ` , ` NoTmpDirFileException ` , ` PartialFileException ` to
17
17
handle failed ` UploadedFile ` .
18
18
* added ` MigratingSessionHandler ` for migrating between two session handlers without losing sessions
19
- * added ` HeaderUtility ` .
19
+ * added ` HeaderUtils ` .
20
20
21
21
4.0.0
22
22
-----
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ private function __construct()
40
40
* @return array Nested array with as many levels as there are characters in
41
41
* $separators
42
42
*/
43
- public static function split ($ header , $ separators )
43
+ public static function split (string $ header , string $ separators )
44
44
{
45
45
$ quotedSeparators = preg_quote ($ separators );
46
46
@@ -116,7 +116,7 @@ public static function combineParts(array $parts)
116
116
$ assoc = array ();
117
117
foreach ($ parts as $ part ) {
118
118
$ name = strtolower ($ part [0 ]);
119
- $ value = isset ( $ part [1 ]) ? $ part [ 1 ] : true ;
119
+ $ value = $ part [1 ] ?? true ;
120
120
$ assoc [$ name ] = $ value ;
121
121
}
122
122
Original file line number Diff line number Diff line change @@ -64,12 +64,12 @@ public function testJoinAssoc()
64
64
65
65
public function testQuote ()
66
66
{
67
- $ this ->assertEquals ('foo ' , HeaderUtils::quote ('foo ' ));
68
- $ this ->assertEquals ('az09!#$%& \'*.^_`|~- ' , HeaderUtils::quote ('az09!#$%& \'*.^_`|~- ' ));
69
- $ this ->assertEquals ('"foo bar" ' , HeaderUtils::quote ('foo bar ' ));
70
- $ this ->assertEquals ('"foo [bar]" ' , HeaderUtils::quote ('foo [bar] ' ));
71
- $ this ->assertEquals ('"foo \"bar\"" ' , HeaderUtils::quote ('foo "bar" ' ));
72
- $ this ->assertEquals ('"foo \\\\ bar" ' , HeaderUtils::quote ('foo \\ bar ' ));
67
+ $ this ->assertSame ('foo ' , HeaderUtils::quote ('foo ' ));
68
+ $ this ->assertSame ('az09!#$%& \'*.^_`|~- ' , HeaderUtils::quote ('az09!#$%& \'*.^_`|~- ' ));
69
+ $ this ->assertSame ('"foo bar" ' , HeaderUtils::quote ('foo bar ' ));
70
+ $ this ->assertSame ('"foo [bar]" ' , HeaderUtils::quote ('foo [bar] ' ));
71
+ $ this ->assertSame ('"foo \"bar\"" ' , HeaderUtils::quote ('foo "bar" ' ));
72
+ $ this ->assertSame ('"foo \\\\ bar" ' , HeaderUtils::quote ('foo \\ bar ' ));
73
73
}
74
74
75
75
public function testUnquote ()
You can’t perform that action at this time.
0 commit comments