File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed
Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -119,21 +119,14 @@ public function offsetUnset($offset): void {
119119 */
120120 #[\ReturnTypeWillChange]
121121 public function offsetGet ($ offset ) {
122- if ($ offset === 'type ' ) {
123- return $ this ->getType ();
124- } elseif ($ offset === 'etag ' ) {
125- return $ this ->getEtag ();
126- } elseif ($ offset === 'size ' ) {
127- return $ this ->getSize ();
128- } elseif ($ offset === 'mtime ' ) {
129- return $ this ->getMTime ();
130- } elseif ($ offset === 'permissions ' ) {
131- return $ this ->getPermissions ();
132- } elseif (isset ($ this ->data [$ offset ])) {
133- return $ this ->data [$ offset ];
134- } else {
135- return null ;
136- }
122+ return match ($ offset ) {
123+ 'type ' => $ this ->getType (),
124+ 'etag ' => $ this ->getEtag (),
125+ 'size ' => $ this ->getSize (),
126+ 'mtime ' => $ this ->getMTime (),
127+ 'permissions ' => $ this ->getPermissions (),
128+ default => $ this ->data [$ offset ] ?? null ,
129+ };
137130 }
138131
139132 /**
You can’t perform that action at this time.
0 commit comments