[Pkg-owncloud-commits] [owncloud] 104/165: Proper return types
David Prévot
taffit at moszumanska.debian.org
Thu Apr 23 04:06:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 1cc2aefa46a2db29b7bfb8c70fe3c9928d86da25
Author: Lukas Reschke <lukas at owncloud.com>
Date: Wed Apr 15 15:56:10 2015 +0200
Proper return types
---
lib/private/security/certificatemanager.php | 4 ++--
lib/public/icertificatemanager.php | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/private/security/certificatemanager.php b/lib/private/security/certificatemanager.php
index beeb87a..d61c7f2 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/';
diff --git a/lib/public/icertificatemanager.php b/lib/public/icertificatemanager.php
index ec88f32..3014cd8 100644
--- a/lib/public/icertificatemanager.php
+++ b/lib/public/icertificatemanager.php
@@ -38,7 +38,8 @@ interface ICertificateManager {
/**
* @param string $certificate the certificate data
* @param string $name the filename for the certificate
- * @return bool | \OCP\ICertificate
+ * @return \OCP\ICertificate
+ * @throws \Exception If the certificate could not get added
* @since 8.0.0
*/
public function addCertificate($certificate, $name);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list