File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1371,7 +1371,7 @@ public function getRequestFormat($default = 'html')
1371
1371
$ this ->format = $ this ->attributes ->get ('_format ' );
1372
1372
}
1373
1373
1374
- return null === $ this ->format ? $ default : $ this -> format ;
1374
+ return $ this ->format ?? $ default ;
1375
1375
}
1376
1376
1377
1377
/**
Original file line number Diff line number Diff line change @@ -94,10 +94,6 @@ public function getParentRequest()
94
94
{
95
95
$ pos = \count ($ this ->requests ) - 2 ;
96
96
97
- if (!isset ($ this ->requests [$ pos ])) {
98
- return null ;
99
- }
100
-
101
- return $ this ->requests [$ pos ];
97
+ return $ this ->requests [$ pos ] ?? null ;
102
98
}
103
99
}
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ public function hasCacheControlDirective($key)
176
176
*/
177
177
public function getCacheControlDirective ($ key )
178
178
{
179
- return \array_key_exists ( $ key , $ this ->computedCacheControl ) ? $ this -> computedCacheControl [$ key ] : null ;
179
+ return $ this ->computedCacheControl [$ key ] ?? null ;
180
180
}
181
181
182
182
public function setCookie (Cookie $ cookie )
Original file line number Diff line number Diff line change @@ -163,6 +163,6 @@ private function stampCreated(int $lifetime = null): void
163
163
{
164
164
$ timeStamp = time ();
165
165
$ this ->meta [self ::CREATED ] = $ this ->meta [self ::UPDATED ] = $ this ->lastUsed = $ timeStamp ;
166
- $ this ->meta [self ::LIFETIME ] = ( null === $ lifetime) ? ini_get ('session.cookie_lifetime ' ) : $ lifetime ;
166
+ $ this ->meta [self ::LIFETIME ] = $ lifetime ?? ini_get ('session.cookie_lifetime ' );
167
167
}
168
168
}
You can’t perform that action at this time.
0 commit comments