use OCP\IConfig;
use OCP\IRequest;
use OCP\IUserSession;
+use OCP\PreConditionNotMetException;
class ConfigController extends OCSController {
*
* @param string $key theme or font
* @return DataResponse
- * @throws Exception
+ * @throws OCSBadRequestException|PreConditionNotMetException
*/
public function setConfig(string $key, $value): DataResponse {
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {
*
* @param string $key theme or font
* @return DataResponse
- * @throws Exception
+ * @throws OCSBadRequestException
*/
public function deleteConfig(string $key): DataResponse {
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {
* Returns a list of addresses that are associated with a principal.
*
* @param string $principal
- * @return string?
+ * @return string|null
*/
protected function getCalendarUserTypeForPrincipal($principal):?string {
$calendarUserType = '{' . self::NS_CALDAV . '}calendar-user-type';
/**
* @return string defining the unique uri
* @since 16.0.0
- * @return string
*/
public function getUri(): string {
return $this->addressBookInfo['uri'];
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\ILogger;
use Sabre\CardDAV\Card;
+use Sabre\VObject\Parameter;
use Sabre\VObject\Property\Binary;
use Sabre\VObject\Reader;
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
//Add OC-Checksum header
- /** @var $node File */
$checksum = $node->getChecksum();
if ($checksum !== null && $checksum !== '') {
$response->addHeader('OC-Checksum', $checksum);
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
$propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) {
- /** @var $node \OCA\DAV\Connector\Sabre\File */
try {
$directDownloadUrl = $node->getDirectDownload();
if (isset($directDownloadUrl['url'])) {
use OCA\Encryption\Hooks\Contracts\IHook;
class HookManager {
+ /** @var IHook[] */
private $hookInstances = [];
/**
foreach ($this->hookInstances as $instance) {
/**
* Fire off the add hooks method of each instance stored in cache
- *
- * @var $instance IHook
*/
$instance->addHooks();
}
*
* @NoAdminRequired
*
- * @param string
+ * @param string $folderpath
* @return string
* @throws \OCP\Files\NotFoundException
*/
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<?php $_['appNavigation']->printPage(); ?>
<div id="app-content">
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
}
protected function execute(InputInterface $input, OutputInterface $output): int {
+ /** @var StorageConfig[] $mounts */
if ($input->getOption('all')) {
- /** @var $mounts StorageConfig[] */
$mounts = $this->globalService->getStorageForAllUsers();
$userId = self::ALL;
} else {
$userId = $input->getArgument('user_id');
$storageService = $this->getStorageService($userId);
-
- /** @var $mounts StorageConfig[] */
$mounts = $storageService->getAllStorages();
}
}
/**
- * @param $userId $userId
+ * @param string $userId
* @param StorageConfig[] $mounts
* @param InputInterface $input
* @param OutputInterface $output
* Override the user from the session
* Unset with ->resetUser() when finished!
*
- * @param IUser
+ * @param IUser $user
* @return self
*/
public function setUser(IUser $user) {
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id="controls">
<div id="file_action_panel"></div>
</div>
/**
* Cleanup the remaining locks
- * @throws @LockedException
+ * @throws LockedException
*/
public function cleanup() {
if ($this->lockedNode !== null) {
*
* @param Node|null $path
* @param boolean $reshares
- * @return void
+ * @return IShare[]
*/
private function getAllShares(?Node $path = null, bool $reshares = false) {
// Get all shares
class ShareesAPIController extends OCSController {
- /** @var userId */
+ /** @var string */
protected $userId;
/** @var IConfig */
/**
* get default share folder
*
- * @param \OC\Files\View
+ * @param \OC\Files\View $view
* @return string
*/
public static function getShareFolder($view = null) {
*/
public function removeMount() {
$mountManager = \OC\Files\Filesystem::getMountManager();
- /** @var $storage \OCA\Files_Sharing\SharedStorage */
+ /** @var \OCA\Files_Sharing\SharedStorage $storage */
$storage = $this->getStorage();
$result = $storage->unshareStorage();
$mountManager->removeMount($this->mountPoint);
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
<?php
-/** @var $l \OCP\IL10N */
-/** @var $_ array */
+/** @var \OCP\IL10N $_ */
+/** @var array $_ */
?>
<div id="app-content">
<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>