diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 13:43:21 +0330 |
---|---|---|
committer | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-09-28 17:44:19 +0330 |
commit | ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0 (patch) | |
tree | 91e5cd5b937877bcc6aafac1c7cff24e6f1589a2 /lib/private/AppFramework/Http/Request.php | |
parent | 45cac164322d6ce4d10db07b9207b7079694e2a4 (diff) | |
download | nextcloud-server-ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0.tar.gz nextcloud-server-ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0.zip |
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'lib/private/AppFramework/Http/Request.php')
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 408e88583a0..26a76e0da27 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -193,9 +193,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { */ #[\ReturnTypeWillChange] public function offsetGet($offset) { - return isset($this->items['parameters'][$offset]) - ? $this->items['parameters'][$offset] - : null; + return $this->items['parameters'][$offset] ?? null; } /** @@ -255,9 +253,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { case 'cookies': case 'urlParams': case 'method': - return isset($this->items[$name]) - ? $this->items[$name] - : null; + return $this->items[$name] ?? null; case 'parameters': case 'params': if ($this->isPutStreamContent()) { |