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 @@ -1387,7 +1387,7 @@ public function getRequestFormat(?string $default = 'html')
13871387 $ this ->format = $ this ->attributes ->get ('_format ' );
13881388 }
13891389
1390- return null === $ this ->format ? $ default : $ this -> format ;
1390+ return $ this ->format ?? $ default ;
13911391 }
13921392
13931393 /**
Original file line number Diff line number Diff line change @@ -94,10 +94,6 @@ public function getParentRequest()
9494 {
9595 $ pos = \count ($ this ->requests ) - 2 ;
9696
97- if (!isset ($ this ->requests [$ pos ])) {
98- return null ;
99- }
100-
101- return $ this ->requests [$ pos ];
97+ return $ this ->requests [$ pos ] ?? null ;
10298 }
10399}
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ public function hasCacheControlDirective(string $key)
174174 */
175175 public function getCacheControlDirective (string $ key )
176176 {
177- return \array_key_exists ( $ key , $ this ->computedCacheControl ) ? $ this -> computedCacheControl [$ key ] : null ;
177+ return $ this ->computedCacheControl [$ key ] ?? null ;
178178 }
179179
180180 public function setCookie (Cookie $ cookie )
Original file line number Diff line number Diff line change @@ -161,6 +161,6 @@ private function stampCreated(int $lifetime = null): void
161161 {
162162 $ timeStamp = time ();
163163 $ this ->meta [self ::CREATED ] = $ this ->meta [self ::UPDATED ] = $ this ->lastUsed = $ timeStamp ;
164- $ this ->meta [self ::LIFETIME ] = ( null === $ lifetime) ? ini_get ('session.cookie_lifetime ' ) : $ lifetime ;
164+ $ this ->meta [self ::LIFETIME ] = $ lifetime ?? ini_get ('session.cookie_lifetime ' );
165165 }
166166}
You can’t perform that action at this time.
0 commit comments