File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,26 +92,16 @@ public function getFile(string $name)
9292 {
9393 $ name = explode ('. ' , $ name );
9494 $ uploadedFile = $ this ->getValueDotNotationSyntax ($ name , $ this ->files );
95- if ($ uploadedFile instanceof \CodeIgniter \HTTP \Files \UploadedFile)
96- {
97- return $ uploadedFile ;
98- }
99-
100- return null ;
95+ return ($ uploadedFile instanceof \CodeIgniter \HTTP \Files \UploadedFile) ?
96+ $ uploadedFile : null ;
10197 }
10298
10399 if (array_key_exists ($ name , $ this ->files ))
104100 {
105101 $ uploadedFile = $ this ->files [$ name ];
106- if ($ uploadedFile instanceof \CodeIgniter \HTTP \Files \UploadedFile)
107- {
108- return $ uploadedFile ;
109- }
110-
111- return null ;
102+ return ($ uploadedFile instanceof \CodeIgniter \HTTP \Files \UploadedFile) ?
103+ $ uploadedFile : null ;
112104 }
113-
114- return null ;
115105 }
116106
117107 return null ;
@@ -291,12 +281,7 @@ protected function getValueDotNotationSyntax($index, $value)
291281 return $ this ->getValueDotNotationSyntax ($ index , $ value [$ current_index ]);
292282 }
293283
294- if (isset ($ value [$ current_index ]))
295- {
296- return $ value [$ current_index ];
297- }
298-
299- return null ;
284+ return (isset ($ value [$ current_index ])) ? $ value [$ current_index ] : null ;
300285 }
301286
302287}
You can’t perform that action at this time.
0 commit comments