Proper return types

remotes/origin/poc-doctrine-migrations
Lukas Reschke 10 years ago
parent 20a6073a9f
commit 1cc2aefa46
  1. 4
      lib/private/security/certificatemanager.php
  2. 3
      lib/public/icertificatemanager.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/';

@ -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);

Loading…
Cancel
Save