From 3a400f92d1936b2b752d813cbb27632d6acb9904 Mon Sep 17 00:00:00 2001 From: Julius Haertl Date: Mon, 17 Oct 2016 16:31:07 +0200 Subject: Replace null return with NotFoundException Signed-off-by: Julius Haertl --- apps/theming/lib/ImageManager.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apps/theming/lib/ImageManager.php') diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php index 5e1b61e3a92..e7dcfa92190 100644 --- a/apps/theming/lib/ImageManager.php +++ b/apps/theming/lib/ImageManager.php @@ -71,15 +71,12 @@ class ImageManager { * Get a file from AppData * * @param string $filename - * @return null|\OCP\Files\SimpleFS\ISimpleFile + * @throws NotFoundException + * @return \OCP\Files\SimpleFS\ISimpleFile */ public function getCachedImage($filename) { $currentFolder = $this->getCacheFolder(); - if($currentFolder->fileExists($filename)) { - return $currentFolder->getFile($filename); - } else { - return null; - } + return $currentFolder->getFile($filename); } /** -- cgit v1.2.3