diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-15 15:56:10 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-20 13:00:02 +0200 |
commit | 1cc2aefa46a2db29b7bfb8c70fe3c9928d86da25 (patch) | |
tree | 1b9a7252fd415128724cf044eab5df9f16a51607 /lib/private/security | |
parent | 20a6073a9feb6b0eb4c004e58bb47912c447fef9 (diff) | |
download | nextcloud-server-1cc2aefa46a2db29b7bfb8c70fe3c9928d86da25.tar.gz nextcloud-server-1cc2aefa46a2db29b7bfb8c70fe3c9928d86da25.zip |
Proper return types
Diffstat (limited to 'lib/private/security')
-rw-r--r-- | lib/private/security/certificatemanager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/security/certificatemanager.php b/lib/private/security/certificatemanager.php index beeb87a8316..d61c7f29327 100644 --- a/lib/private/security/certificatemanager.php +++ b/lib/private/security/certificatemanager.php @@ -107,12 +107,12 @@ class CertificateManager implements ICertificateManager { * * @param string $certificate the certificate data * @param string $name the filename for the certificate - * @return \OCP\ICertificate|void|bool + * @return \OCP\ICertificate * @throws \Exception If the certificate could not get added */ public function addCertificate($certificate, $name) { if (!Filesystem::isValidPath($name) or Filesystem::isFileBlacklisted($name)) { - return false; + throw new \Exception('Filename is not valid'); } $dir = $this->getPathToCertificates() . 'uploads/'; |