@@ -118,7 +118,7 @@ class AttachmentService {
|
||||
/** @var IAttachmentService $service */
|
||||
$service = $this->getService($attachmentType);
|
||||
if ($service instanceof ICustomAttachmentService) {
|
||||
$attachments = array_merge($attachments, $service->listAttachments($cardId));
|
||||
$attachments = array_merge($attachments, $service->listAttachments((int)$cardId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ class AttachmentService {
|
||||
foreach (array_keys($this->services) as $attachmentType) {
|
||||
$service = $this->getService($attachmentType);
|
||||
if ($service instanceof ICustomAttachmentService) {
|
||||
$count += $service->getAttachmentCount($cardId);
|
||||
$count += $service->getAttachmentCount((int)$cardId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,11 +77,11 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
|
||||
$shares = array_filter($shares, function ($share) {
|
||||
return $share->getPermissions() > 0;
|
||||
});
|
||||
return array_map(function (IShare $share) use ($cardId, $userFolder) {
|
||||
return array_map(function (IShare $share) use ($cardId) {
|
||||
$file = $share->getNode();
|
||||
$attachment = new Attachment();
|
||||
$attachment->setType('file');
|
||||
$attachment->setId($share->getId());
|
||||
$attachment->setId((int)$share->getId());
|
||||
$attachment->setCardId($cardId);
|
||||
$attachment->setCreatedBy($share->getSharedBy());
|
||||
$attachment->setData($file->getName());
|
||||
@@ -179,18 +179,16 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
|
||||
throw new StatusException('Could not read file');
|
||||
}
|
||||
$target->putContent($content);
|
||||
if (is_resource($content)) {
|
||||
fclose($content);
|
||||
}
|
||||
|
||||
$share = $this->shareManager->newShare();
|
||||
$share->setNode($target);
|
||||
$share->setShareType(Share::SHARE_TYPE_DECK);
|
||||
$share->setShareType(ISHARE::TYPE_DECK);
|
||||
$share->setSharedWith((string)$attachment->getCardId());
|
||||
$share->setPermissions(Constants::PERMISSION_READ);
|
||||
$share->setSharedBy($this->userId);
|
||||
$share = $this->shareManager->createShare($share);
|
||||
$attachment->setId($share->getId());
|
||||
$attachment->setId((int)$share->getId());
|
||||
$attachment->setData($target->getName());
|
||||
return $attachment;
|
||||
}
|
||||
@@ -237,9 +235,7 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
|
||||
throw new StatusException('Could not read file');
|
||||
}
|
||||
$target->putContent($content);
|
||||
if (is_resource($content)) {
|
||||
fclose($content);
|
||||
}
|
||||
|
||||
$attachment->setLastModified(time());
|
||||
return $attachment;
|
||||
@@ -249,9 +245,6 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
|
||||
$share = $this->shareProvider->getShareById($attachment->getId());
|
||||
$file = $share->getNode();
|
||||
$attachment->setData($file->getName());
|
||||
if ($file === null) {
|
||||
throw new NotFoundException('File not found');
|
||||
}
|
||||
|
||||
if ($file->getOwner() !== null && $file->getOwner()->getUID() === $this->userId) {
|
||||
$file->delete();
|
||||
|
||||
@@ -114,7 +114,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
|
||||
try {
|
||||
$board = $this->boardMapper->find($boardId);
|
||||
$valid &= !$board->getArchived();
|
||||
$valid = $valid && !$board->getArchived();
|
||||
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) {
|
||||
$valid = false;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
*/
|
||||
private function createShareObject(array $data): IShare {
|
||||
$share = $this->shareManager->newShare();
|
||||
$share->setId((int)$data['id'])
|
||||
$share->setId($data['id'])
|
||||
->setShareType((int)$data['share_type'])
|
||||
->setPermissions((int)$data['permissions'])
|
||||
->setTarget($data['file_target'])
|
||||
@@ -401,7 +401,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
|
||||
$qb->execute();
|
||||
|
||||
return $this->getShareById($share->getId(), $recipient);
|
||||
return $this->getShareById((int)$share->getId(), $recipient);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,6 +456,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @returns
|
||||
*/
|
||||
public function getSharesInFolder($userId, Folder $node, $reshares) {
|
||||
$qb = $this->dbConnection->getQueryBuilder();
|
||||
@@ -755,14 +756,13 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
/**
|
||||
* Get shared with the card
|
||||
*
|
||||
* @param string $userId get shares where this user is the recipient
|
||||
* @param int $cardId
|
||||
* @param int $shareType
|
||||
* @param Node|null $node
|
||||
* @param int $limit The max number of entries returned, -1 for all
|
||||
* @param int $offset
|
||||
* @return IShare[]
|
||||
*/
|
||||
public function getSharedWithByType(string $cardId, int $shareType, $limit, $offset): array {
|
||||
public function getSharedWithByType(int $cardId, int $shareType, $limit, $offset): array {
|
||||
/** @var IShare[] $shares */
|
||||
$shares = [];
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\Service\PermissionService;
|
||||
use OCP\AppFramework\OCS\OCSNotFoundException;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Share\IShare;
|
||||
|
||||
@@ -40,12 +41,14 @@ class ShareAPIHelper {
|
||||
private $timeFactory;
|
||||
private $cardMapper;
|
||||
private $permissionService;
|
||||
private $l10n;
|
||||
|
||||
public function __construct(IURLGenerator $urlGenerator, ITimeFactory $timeFactory, CardMapper $cardMapper, PermissionService $permissionService) {
|
||||
public function __construct(IURLGenerator $urlGenerator, ITimeFactory $timeFactory, CardMapper $cardMapper, PermissionService $permissionService, IL10N $l10n) {
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->timeFactory = $timeFactory;
|
||||
$this->cardMapper = $cardMapper;
|
||||
$this->permissionService = $permissionService;
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
|
||||
public function formatShare(IShare $share): array {
|
||||
@@ -67,7 +70,7 @@ class ShareAPIHelper {
|
||||
$expireDate = $this->parseDate($expireDate);
|
||||
$share->setExpirationDate($expireDate);
|
||||
} catch (\Exception $e) {
|
||||
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD'));
|
||||
throw new OCSNotFoundException($this->l10n->t('Invalid date, date format must be YYYY-MM-DD'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,10 +93,6 @@ class ShareAPIHelper {
|
||||
throw new \Exception('Invalid date. Format must be YYYY-MM-DD');
|
||||
}
|
||||
|
||||
if ($date === false) {
|
||||
throw new \Exception('Invalid date. Format must be YYYY-MM-DD');
|
||||
}
|
||||
|
||||
$date->setTime(0, 0, 0);
|
||||
|
||||
return $date;
|
||||
|
||||
@@ -4,18 +4,6 @@
|
||||
<TypeDoesNotContainType occurrences="1">
|
||||
<code>$message !== null</code>
|
||||
</TypeDoesNotContainType>
|
||||
<UndefinedMagicMethod occurrences="9">
|
||||
<code>getArchived</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getStackId</code>
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Activity/DeckProvider.php">
|
||||
<InvalidScalarArgument occurrences="1">
|
||||
@@ -28,23 +16,9 @@
|
||||
</DuplicateClass>
|
||||
</file>
|
||||
<file src="lib/AppInfo/Application20.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>IBootstrap</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/AppInfo/ApplicationLegacy.php">
|
||||
<UndefinedInterfaceMethod occurrences="2">
|
||||
<code>listen</code>
|
||||
<code>listen</code>
|
||||
</UndefinedInterfaceMethod>
|
||||
</file>
|
||||
<file src="lib/Collaboration/Resources/ResourceProviderCard.php">
|
||||
<UndefinedMagicMethod occurrences="4">
|
||||
<code>getAcl</code>
|
||||
<code>getOwner</code>
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
<RedundantCondition occurrences="1">
|
||||
<code>method_exists($shareManager, 'registerShareProvider')</code>
|
||||
</RedundantCondition>
|
||||
</file>
|
||||
<file src="lib/Command/UserExport.php">
|
||||
<ImplementedReturnTypeMismatch occurrences="1">
|
||||
@@ -90,11 +64,9 @@
|
||||
</InvalidScalarArgument>
|
||||
</file>
|
||||
<file src="lib/Controller/PageController.php">
|
||||
<MissingDependency occurrences="3">
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>LoadSidebar</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Controller/StackApiController.php">
|
||||
<RedundantCondition occurrences="1">
|
||||
@@ -104,21 +76,6 @@
|
||||
<code>Util</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Cron/CardDescriptionActivity.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>Job</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Cron/DeleteCron.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>Job</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Cron/ScheduledNotifications.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>Job</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/DAV/Calendar.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>ExternalCalendar</code>
|
||||
@@ -140,18 +97,6 @@
|
||||
<code>NotFound</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Dashboard/DeckWidget.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>IWidget</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Db/Acl.php">
|
||||
<UndefinedMagicMethod occurrences="3">
|
||||
<code>getPermissionEdit</code>
|
||||
<code>getPermissionManage</code>
|
||||
<code>getPermissionShare</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/AclMapper.php">
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$aclId</code>
|
||||
@@ -161,32 +106,12 @@
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$cardId</code>
|
||||
</ParamNameMismatch>
|
||||
<UndefinedMagicMethod occurrences="9">
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/AttachmentMapper.php">
|
||||
<UndefinedMagicMethod occurrences="2">
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
</UndefinedMagicMethod>
|
||||
<UndefinedVariable occurrences="1">
|
||||
<code>$query</code>
|
||||
</UndefinedVariable>
|
||||
</file>
|
||||
<file src="lib/Db/Board.php">
|
||||
<UndefinedMagicMethod occurrences="1">
|
||||
<code>getLastModified</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/BoardMapper.php">
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$boardId</code>
|
||||
@@ -194,53 +119,20 @@
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="2">
|
||||
<code>setAcl</code>
|
||||
<code>setLabels</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/Card.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>VCalendar</code>
|
||||
<code>VCalendar</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="9">
|
||||
<code>getArchived</code>
|
||||
<code>getArchived</code>
|
||||
<code>getDescription</code>
|
||||
<code>getLabels</code>
|
||||
<code>getLabels</code>
|
||||
<code>getLastModified</code>
|
||||
<code>getLastModified</code>
|
||||
<code>getStackId</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/CardMapper.php">
|
||||
<ImplicitToStringCast occurrences="1">
|
||||
<code>$qb->createNamedParameter($boardIds, IQueryBuilder::PARAM_INT_ARRAY)</code>
|
||||
</ImplicitToStringCast>
|
||||
<InvalidScalarArgument occurrences="1">
|
||||
<code>$entity->getId()</code>
|
||||
</InvalidScalarArgument>
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$cardId</code>
|
||||
</ParamNameMismatch>
|
||||
<UndefinedMagicMethod occurrences="13">
|
||||
<code>getDescription</code>
|
||||
<code>getDescription</code>
|
||||
<code>getDuedate</code>
|
||||
<code>setCreatedAt</code>
|
||||
<code>setDatabaseType</code>
|
||||
<code>setDatabaseType</code>
|
||||
<code>setDescription</code>
|
||||
<code>setDescription</code>
|
||||
<code>setLabels</code>
|
||||
<code>setLastModified</code>
|
||||
<code>setLastModified</code>
|
||||
<code>setNotified</code>
|
||||
<code>setNotified</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/ChangeHelper.php">
|
||||
<UndefinedThisPropertyAssignment occurrences="3">
|
||||
@@ -269,69 +161,26 @@
|
||||
<code>\OCA\Circles\Model\Circle</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="lib/Db/Label.php">
|
||||
<UndefinedMagicMethod occurrences="1">
|
||||
<code>getLastModified</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/LabelMapper.php">
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$labelId</code>
|
||||
</ParamNameMismatch>
|
||||
<UndefinedMagicMethod occurrences="2">
|
||||
<code>setLastModified</code>
|
||||
<code>setLastModified</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/RelationalEntity.php">
|
||||
<UndefinedMagicMethod occurrences="1">
|
||||
<code>getETag</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/Stack.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>VCalendar</code>
|
||||
<code>VCalendar</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="2">
|
||||
<code>getLastModified</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Db/StackMapper.php">
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$stackId</code>
|
||||
</ParamNameMismatch>
|
||||
<UndefinedMagicMethod occurrences="1">
|
||||
<code>getBoardId</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Listeners/BeforeTemplateRenderedListener.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>BeforeTemplateRenderedEvent</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Migration/UnknownUsers.php">
|
||||
<UndefinedMagicMethod occurrences="4">
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Notification/NotificationHelper.php">
|
||||
<InvalidScalarArgument occurrences="1">
|
||||
<code>$board->getId()</code>
|
||||
</InvalidScalarArgument>
|
||||
<MissingDependency occurrences="1">
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<UndefinedMagicMethod occurrences="3">
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Notification/Notifier.php">
|
||||
<RedundantCast occurrences="7">
|
||||
@@ -348,42 +197,12 @@
|
||||
<InvalidPropertyAssignmentValue occurrences="1">
|
||||
<code>[]</code>
|
||||
</InvalidPropertyAssignmentValue>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>IndexDocument</code>
|
||||
<code>SearchTemplate</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Search/BoardSearchResultEntry.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>SearchResultEntry</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Search/CardSearchResultEntry.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>SearchResultEntry</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Search/DeckProvider.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>IProvider</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Service/AssignmentService.php">
|
||||
<InvalidScalarArgument occurrences="2">
|
||||
<code>$cardId</code>
|
||||
<code>$cardId</code>
|
||||
</InvalidScalarArgument>
|
||||
<UndefinedMagicMethod occurrences="9">
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>setCardId</code>
|
||||
<code>setParticipant</code>
|
||||
<code>setType</code>
|
||||
</UndefinedMagicMethod>
|
||||
<UndefinedThisPropertyAssignment occurrences="1">
|
||||
<code>$this->currentUser</code>
|
||||
</UndefinedThisPropertyAssignment>
|
||||
@@ -391,86 +210,11 @@
|
||||
<code>$this->currentUser</code>
|
||||
</UndefinedThisPropertyFetch>
|
||||
</file>
|
||||
<file src="lib/Service/AttachmentService.php">
|
||||
<MissingDependency occurrences="1">
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<UndefinedMagicMethod occurrences="13">
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getData</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>setCardId</code>
|
||||
<code>setCreatedAt</code>
|
||||
<code>setCreatedBy</code>
|
||||
<code>setData</code>
|
||||
<code>setLastModified</code>
|
||||
<code>setLastModified</code>
|
||||
<code>setType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/BoardService.php">
|
||||
<InvalidArgument occurrences="6">
|
||||
<code>'\OCA\Deck\Board::onCreate'</code>
|
||||
<code>'\OCA\Deck\Board::onDelete'</code>
|
||||
<code>'\OCA\Deck\Board::onDelete'</code>
|
||||
<code>'\OCA\Deck\Board::onShareEdit'</code>
|
||||
<code>'\OCA\Deck\Board::onUpdate'</code>
|
||||
<code>'\OCA\Deck\Board::onUpdate'</code>
|
||||
</InvalidArgument>
|
||||
<MissingDependency occurrences="3">
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<TooManyArguments occurrences="2">
|
||||
<code>findAll</code>
|
||||
<code>findAll</code>
|
||||
</TooManyArguments>
|
||||
<UndefinedMagicMethod occurrences="40">
|
||||
<code>getAcl</code>
|
||||
<code>getAcl</code>
|
||||
<code>getAcl</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getType</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setColor</code>
|
||||
<code>setColor</code>
|
||||
<code>setColor</code>
|
||||
<code>setColor</code>
|
||||
<code>setColor</code>
|
||||
<code>setLabels</code>
|
||||
<code>setOwner</code>
|
||||
<code>setOwner</code>
|
||||
<code>setParticipant</code>
|
||||
<code>setPermissionEdit</code>
|
||||
<code>setPermissionEdit</code>
|
||||
<code>setPermissionManage</code>
|
||||
<code>setPermissionManage</code>
|
||||
<code>setPermissionShare</code>
|
||||
<code>setPermissionShare</code>
|
||||
<code>setPermissions</code>
|
||||
<code>setPermissions</code>
|
||||
<code>setPermissions</code>
|
||||
<code>setPermissions</code>
|
||||
<code>setSettings</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/CardService.php">
|
||||
<TooFewArguments occurrences="1">
|
||||
@@ -479,52 +223,6 @@
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\OCP\AppFramework\Db\</code>
|
||||
</UndefinedDocblockClass>
|
||||
<UndefinedMagicMethod occurrences="44">
|
||||
<code>getArchived</code>
|
||||
<code>getArchived</code>
|
||||
<code>getArchived</code>
|
||||
<code>getArchived</code>
|
||||
<code>getArchived</code>
|
||||
<code>getDescription</code>
|
||||
<code>getDescription</code>
|
||||
<code>getDescription</code>
|
||||
<code>getDescriptionPrev</code>
|
||||
<code>getDescriptionPrev</code>
|
||||
<code>getLastEditor</code>
|
||||
<code>getLastEditor</code>
|
||||
<code>getLastEditor</code>
|
||||
<code>getOrder</code>
|
||||
<code>setArchived</code>
|
||||
<code>setArchived</code>
|
||||
<code>setArchived</code>
|
||||
<code>setAssignedUsers</code>
|
||||
<code>setAssignedUsers</code>
|
||||
<code>setAttachmentCount</code>
|
||||
<code>setAttachments</code>
|
||||
<code>setCommentsUnread</code>
|
||||
<code>setDeletedAt</code>
|
||||
<code>setDeletedAt</code>
|
||||
<code>setDescription</code>
|
||||
<code>setDescription</code>
|
||||
<code>setDescriptionPrev</code>
|
||||
<code>setDescriptionPrev</code>
|
||||
<code>setDuedate</code>
|
||||
<code>setDuedate</code>
|
||||
<code>setLabels</code>
|
||||
<code>setLastEditor</code>
|
||||
<code>setOrder</code>
|
||||
<code>setOrder</code>
|
||||
<code>setOwner</code>
|
||||
<code>setOwner</code>
|
||||
<code>setStackId</code>
|
||||
<code>setStackId</code>
|
||||
<code>setStackId</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
<code>setType</code>
|
||||
<code>setType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/CirclesService.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
@@ -533,13 +231,6 @@
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Service/CommentService.php">
|
||||
<MissingDependency occurrences="5">
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<UndefinedThisPropertyAssignment occurrences="2">
|
||||
<code>$this->cardMapper</code>
|
||||
<code>$this->permissionService</code>
|
||||
@@ -555,25 +246,7 @@
|
||||
<code>$this->permissionService</code>
|
||||
</UndefinedThisPropertyFetch>
|
||||
</file>
|
||||
<file src="lib/Service/ConfigService.php">
|
||||
<InvalidScalarArgument occurrences="1">
|
||||
<code>(int)$value</code>
|
||||
</InvalidScalarArgument>
|
||||
<MissingDependency occurrences="7">
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
</file>
|
||||
<file src="lib/Service/DefaultBoardService.php">
|
||||
<MissingDependency occurrences="2">
|
||||
<code>Application</code>
|
||||
<code>Application</code>
|
||||
</MissingDependency>
|
||||
<TypeDoesNotContainNull occurrences="6">
|
||||
<code>$color === false || $color === null</code>
|
||||
<code>$color === null</code>
|
||||
@@ -597,94 +270,46 @@
|
||||
<code>is_resource($content)</code>
|
||||
<code>is_resource($content)</code>
|
||||
</RedundantCondition>
|
||||
<UndefinedMagicMethod occurrences="10">
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getCardId</code>
|
||||
<code>getData</code>
|
||||
<code>getData</code>
|
||||
<code>setData</code>
|
||||
<code>setData</code>
|
||||
<code>setDeletedAt</code>
|
||||
<code>setExtendedData</code>
|
||||
<code>setLastModified</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/FullTextSearchService.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>DocumentAccess</code>
|
||||
<code>IndexDocument</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="4">
|
||||
<code>getDescription</code>
|
||||
<code>getDescription</code>
|
||||
<code>getTitle</code>
|
||||
<code>getTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/LabelService.php">
|
||||
<UndefinedMagicMethod occurrences="4">
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setColor</code>
|
||||
<code>setColor</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/OverviewService.php">
|
||||
<UndefinedMagicMethod occurrences="4">
|
||||
<code>setAssignedUsers</code>
|
||||
<code>setAttachmentCount</code>
|
||||
<code>setCommentsUnread</code>
|
||||
<code>setLabels</code>
|
||||
</UndefinedMagicMethod>
|
||||
<file src="lib/Service/FilesAppService.php">
|
||||
<MissingDependency occurrences="4">
|
||||
<code>$this->rootFolder</code>
|
||||
<code>$this->rootFolder</code>
|
||||
<code>IRootFolder</code>
|
||||
<code>Share\Exceptions\ShareNotFound</code>
|
||||
</MissingDependency>
|
||||
</file>
|
||||
<file src="lib/Service/PermissionService.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
<code>\OCA\Circles\Api\v1\Circles</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="6">
|
||||
<code>getAcl</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getParticipant</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
<code>getType</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Service/StackService.php">
|
||||
<InvalidArgument occurrences="3">
|
||||
<code>'\OCA\Deck\Stack::onCreate'</code>
|
||||
<code>'\OCA\Deck\Stack::onDelete'</code>
|
||||
<code>'\OCA\Deck\Stack::onUpdate'</code>
|
||||
</InvalidArgument>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>BadRquestException</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedMagicMethod occurrences="14">
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getBoardId</code>
|
||||
<code>getOrder</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setBoardId</code>
|
||||
<code>setCards</code>
|
||||
<code>setDeletedAt</code>
|
||||
<code>setDeletedAt</code>
|
||||
<code>setOrder</code>
|
||||
<code>setOrder</code>
|
||||
<code>setTitle</code>
|
||||
<code>setTitle</code>
|
||||
</UndefinedMagicMethod>
|
||||
</file>
|
||||
<file src="lib/Sharing/DeckShareProvider.php">
|
||||
<InvalidReturnStatement occurrences="1">
|
||||
<code>$shares</code>
|
||||
</InvalidReturnStatement>
|
||||
<InvalidReturnType occurrences="1">
|
||||
<code>getSharesInFolder</code>
|
||||
</InvalidReturnType>
|
||||
<MissingDependency occurrences="7">
|
||||
<code>GenericShareException</code>
|
||||
<code>GenericShareException</code>
|
||||
<code>ShareNotFound</code>
|
||||
<code>ShareNotFound</code>
|
||||
<code>ShareNotFound</code>
|
||||
<code>ShareNotFound</code>
|
||||
<code>ShareNotFound</code>
|
||||
</MissingDependency>
|
||||
</file>
|
||||
<file src="lib/Sharing/Listener.php">
|
||||
<InvalidArgument occurrences="1">
|
||||
<code>[self::class, 'listenPreShare']</code>
|
||||
</InvalidArgument>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
@@ -316,10 +316,6 @@ class ActivityManagerTest extends TestCase {
|
||||
$stack->setBoardId(999);
|
||||
$board = new Board();
|
||||
$board->setId(999);
|
||||
$this->attachmentMapper->expects($this->once())
|
||||
->method('find')
|
||||
->with(777)
|
||||
->willReturn($attachment);
|
||||
$this->cardMapper->expects($this->once())
|
||||
->method('find')
|
||||
->with(555)
|
||||
@@ -340,7 +336,7 @@ class ActivityManagerTest extends TestCase {
|
||||
'archived' => $card->getArchived()
|
||||
],
|
||||
'attachment' => $attachment
|
||||
], $this->invokePrivate($this->activityManager, 'findDetailsForAttachment', [777]));
|
||||
], $this->invokePrivate($this->activityManager, 'findDetailsForAttachment', [$attachment]));
|
||||
}
|
||||
|
||||
public function invokePrivate(&$object, $methodName, array $parameters = []) {
|
||||
|
||||
@@ -270,7 +270,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
->method('display')
|
||||
->with($attachment)
|
||||
->willReturn($response);
|
||||
$actual = $this->attachmentService->display(1);
|
||||
$actual = $this->attachmentService->display(1, 1);
|
||||
$this->assertEquals($response, $actual);
|
||||
}
|
||||
|
||||
@@ -286,8 +286,8 @@ class AttachmentServiceTest extends TestCase {
|
||||
$this->attachmentServiceImpl->expects($this->once())
|
||||
->method('display')
|
||||
->with($attachment)
|
||||
->will($this->throwException(new InvalidAttachmentType('deck_file')));
|
||||
$this->attachmentService->display(1);
|
||||
->will($this->throwException(new NotFoundException('deck_file')));
|
||||
$this->attachmentService->display(1, 1);
|
||||
}
|
||||
public function testUpdate() {
|
||||
$attachment = $this->createAttachment('deck_file', 'file_name.jpg');
|
||||
@@ -309,7 +309,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
$a->setExtendedData(['mime' => 'image/jpeg']);
|
||||
});
|
||||
|
||||
$actual = $this->attachmentService->update(1, 'file_name.jpg');
|
||||
$actual = $this->attachmentService->update(1, 1, 'file_name.jpg');
|
||||
|
||||
$expected->setExtendedData(['mime' => 'image/jpeg']);
|
||||
$expected->setLastModified($attachment->getLastModified());
|
||||
@@ -333,7 +333,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
$this->attachmentMapper->expects($this->once())
|
||||
->method('delete')
|
||||
->willReturn($attachment);
|
||||
$actual = $this->attachmentService->delete(1);
|
||||
$actual = $this->attachmentService->delete(1, 1);
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
->method('update')
|
||||
->willReturn($attachment);
|
||||
$expected->setDeletedAt(23);
|
||||
$actual = $this->attachmentService->delete(1);
|
||||
$actual = $this->attachmentService->delete(1, 1);
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
->method('update')
|
||||
->willReturn($attachment);
|
||||
$expected->setDeletedAt(0);
|
||||
$actual = $this->attachmentService->restore(1);
|
||||
$actual = $this->attachmentService->restore(1, 1);
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
@@ -395,6 +395,6 @@ class AttachmentServiceTest extends TestCase {
|
||||
$this->attachmentServiceImpl->expects($this->once())
|
||||
->method('allowUndo')
|
||||
->willReturn(false);
|
||||
$actual = $this->attachmentService->restore(1);
|
||||
$actual = $this->attachmentService->restore(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user