Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/accessibility/lib/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use OCP\IConfig;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\PreConditionNotMetException;

class ConfigController extends OCSController {

Expand Down Expand Up @@ -103,7 +104,7 @@ public function getConfig(): DataResponse {
*
* @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') {
Expand Down Expand Up @@ -137,7 +138,7 @@ public function setConfig(string $key, $value): DataResponse {
*
* @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') {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Schedule/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) {
* 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';
Expand Down
1 change: 0 additions & 1 deletion apps/dav/lib/CardDAV/AddressBookImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function getKey() {
/**
* @return string defining the unique uri
* @since 16.0.0
* @return string
*/
public function getUri(): string {
return $this->addressBookInfo['uri'];
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CardDAV/PhotoCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\ILogger;
use Sabre\CardDAV\Card;
use Sabre\VObject\Parameter;
Copy link
Collaborator Author

@kesselb kesselb Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import class for

/** @var Parameter $typeParam */

use Sabre\VObject\Property\Binary;
use Sabre\VObject\Reader;

Expand Down
2 changes: 0 additions & 2 deletions apps/dav/lib/Connector/Sabre/FilesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ public function httpGet(RequestInterface $request, ResponseInterface $response)

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);
Expand Down Expand Up @@ -383,7 +382,6 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)

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'])) {
Expand Down
3 changes: 1 addition & 2 deletions apps/encryption/lib/HookManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use OCA\Encryption\Hooks\Contracts\IHook;

class HookManager {
/** @var IHook[] */
private $hookInstances = [];

/**
Expand All @@ -51,8 +52,6 @@ public function fireHooks() {
foreach ($this->hookInstances as $instance) {
/**
* Fire off the add hooks method of each instance stored in cache
*
* @var $instance IHook
*/
$instance->addHooks();
}
Expand Down
2 changes: 1 addition & 1 deletion apps/files/lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function toggleShowFolder(int $show, string $key) {
*
* @NoAdminRequired
*
* @param string
* @param string $folderpath
* @return string
* @throws \OCP\Files\NotFoundException
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/files/templates/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var $l \OCP\IL10N */ ?>
<?php /** @var \OCP\IL10N $l */ ?>
<?php $_['appNavigation']->printPage(); ?>
<div id="app-content">

Expand Down
2 changes: 1 addition & 1 deletion apps/files/templates/recentlist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var $l \OCP\IL10N */ ?>
<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>

<div id="emptycontent" class="hidden"></div>
Expand Down
6 changes: 2 additions & 4 deletions apps/files_external/lib/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ protected function configure() {
}

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();
}

Expand All @@ -114,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

/**
* @param $userId $userId
* @param string $userId
* @param StorageConfig[] $mounts
* @param InputInterface $input
* @param OutputInterface $output
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Service/UserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getUser() {
* Override the user from the session
* Unset with ->resetUser() when finished!
*
* @param IUser
* @param IUser $user
* @return self
*/
public function setUser(IUser $user) {
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/templates/list.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var $l \OCP\IL10N */ ?>
<?php /** @var \OCP\IL10N $l */ ?>
<div id="controls">
<div id="file_action_panel"></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ private function lock(\OCP\Files\Node $node) {

/**
* Cleanup the remaining locks
* @throws @LockedException
* @throws LockedException
*/
public function cleanup() {
if ($this->lockedNode !== null) {
Expand Down Expand Up @@ -1642,7 +1642,7 @@ private function shareProviderResharingRights(string $userId, IShare $share, $no
*
* @param Node|null $path
* @param boolean $reshares
* @return void
* @return IShare[]
*/
private function getAllShares(?Node $path = null, bool $reshares = false) {
// Get all shares
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

class ShareesAPIController extends OCSController {

/** @var userId */
/** @var string */
protected $userId;

/** @var IConfig */
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function generateUniqueTarget($path, $excludeList, $view) {
/**
* get default share folder
*
* @param \OC\Files\View
* @param \OC\Files\View $view
* @return string
*/
public static function getShareFolder($view = null) {
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/SharedMount.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function moveMount($target) {
*/
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);
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/templates/list.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /** @var $l \OCP\IL10N */ ?>
<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>

<div id="emptycontent" class="hidden"></div>
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/templates/public.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/** @var $l \OCP\IL10N */
/** @var $_ array */
/** @var \OCP\IL10N $_ */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** @var array $_ */
?>
<div id="app-content">
<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
Expand Down
18 changes: 9 additions & 9 deletions lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function __construct($webRoot, \OC\Config $config) {
return new PreviewManager(
$c->getConfig(),
$c->getRootFolder(),
new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview'),
new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig()),
$c->getEventDispatcher(),
$c->getGeneratorHelper(),
$c->getSession()->get('user_id')
Expand All @@ -301,7 +301,7 @@ public function __construct($webRoot, \OC\Config $config) {

$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
return new \OC\Preview\Watcher(
new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview')
new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig())
);
});

Expand Down Expand Up @@ -519,15 +519,15 @@ public function __construct($webRoot, \OC\Config $config) {
$dispatcher->dispatchTyped(new BeforeUserCreatedEvent($uid, $password));
});
$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]);

/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->query(IEventDispatcher::class);
$dispatcher->dispatchTyped(new UserCreatedEvent($user, $password));
});
$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]);
$legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));

Expand All @@ -536,23 +536,23 @@ public function __construct($webRoot, \OC\Config $config) {
$dispatcher->dispatchTyped(new BeforeUserDeletedEvent($user));
});
$userSession->listen('\OC\User', 'postDelete', function ($user) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]);

/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->query(IEventDispatcher::class);
$dispatcher->dispatchTyped(new UserDeletedEvent($user));
});
$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);

/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->query(IEventDispatcher::class);
$dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword));
});
$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);

/** @var IEventDispatcher $dispatcher */
Expand All @@ -567,7 +567,7 @@ public function __construct($webRoot, \OC\Config $config) {
$dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password));
});
$userSession->listen('\OC\User', 'postLogin', function ($user, $password, $isTokenLogin) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'isTokenLogin' => $isTokenLogin]);

/** @var IEventDispatcher $dispatcher */
Expand Down Expand Up @@ -600,7 +600,7 @@ public function __construct($webRoot, \OC\Config $config) {
$dispatcher->dispatchTyped(new UserLoggedOutEvent($user));
});
$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
/** @var $user \OC\User\User */
/** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]);

/** @var IEventDispatcher $dispatcher */
Expand Down