Skip to content

Commit 3a88438

Browse files
hopleusbackportbot[bot]
authored andcommitted
Refactoring getName function
Signed-off-by: hopleus <hopleus@gmail.com>
1 parent fe79686 commit 3a88438

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/private/Files/FileInfo.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,9 @@ public function getMimePart() {
185185
* @return string
186186
*/
187187
public function getName() {
188-
if (isset($this->data['name']) && !empty($this->data['name'])) {
189-
return $this->data['name'];
190-
}
191-
192-
return basename($this->getPath());
188+
return empty($this->data['name'])
189+
? basename($this->getPath())
190+
: $this->data['name'];
193191
}
194192

195193
/**

0 commit comments

Comments
 (0)