psalm: remove more dead code
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/877/head
parent
f992d19932
commit
6a58a10c86
|
@ -57,15 +57,12 @@ class ArchiveController extends GenericApiController
|
|||
|
||||
// Create archive folder in the root of the user's configured timeline
|
||||
$configPaths = Util::getTimelinePaths(Util::getUID());
|
||||
$timelineFolders = [];
|
||||
$timelinePaths = [];
|
||||
|
||||
// Get all timeline paths
|
||||
foreach ($configPaths as $path) {
|
||||
try {
|
||||
$f = $userFolder->get($path);
|
||||
$timelineFolders[] = $f;
|
||||
$timelinePaths[] = $f->getPath();
|
||||
$timelinePaths[] = $userFolder->get($path)->getPath();
|
||||
} catch (\OCP\Files\NotFoundException $e) {
|
||||
throw Exceptions::NotFound("timeline folder {$path}");
|
||||
}
|
||||
|
|
|
@ -70,10 +70,8 @@ class ShareController extends GenericApiController
|
|||
return Util::guardEx(function () use ($id, $path) {
|
||||
$file = $this->getNodeByIdOrPath($id, $path);
|
||||
|
||||
/** @var \OCP\Share\IManager $shareManager */
|
||||
$shareManager = \OC::$server->get(\OCP\Share\IManager::class);
|
||||
|
||||
/** @var \OCP\Share\IShare $share */
|
||||
$share = $shareManager->newShare();
|
||||
$share->setNode($file);
|
||||
$share->setShareType(\OCP\Share\IShare::TYPE_LINK);
|
||||
|
|
|
@ -170,6 +170,10 @@ class Util
|
|||
|
||||
/**
|
||||
* Check if link sharing is allowed.
|
||||
*
|
||||
* @todo Check if link sharing is enabled to show the button
|
||||
*
|
||||
* @psalm-suppress PossiblyUnusedMethod
|
||||
*/
|
||||
public static function isLinkSharingEnabled(): bool
|
||||
{
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
cacheDirectory=".cache/psalm-ls"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="false"
|
||||
>
|
||||
<!--
|
||||
Duplication is due to differences in language server and CLI
|
||||
|
@ -36,6 +38,11 @@
|
|||
<referencedClass name="Doctrine\DBAL\Platforms\AbstractPlatform" />
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
<PossiblyUnusedMethod>
|
||||
<errorLevel type="suppress">
|
||||
<file name="lib/Service/FileRobotMagick.php" />
|
||||
</errorLevel>
|
||||
</PossiblyUnusedMethod>
|
||||
</issueHandlers>
|
||||
<forbiddenFunctions>
|
||||
<function name="var_dump" />
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
cacheDirectory=".cache/psalm"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="false"
|
||||
>
|
||||
<!-- The language server works slightly differently and has a different file -->
|
||||
<projectFiles>
|
||||
|
@ -35,6 +37,11 @@
|
|||
<referencedClass name="Doctrine\DBAL\Platforms\AbstractPlatform" />
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
<PossiblyUnusedMethod>
|
||||
<errorLevel type="suppress">
|
||||
<file name="lib/Service/FileRobotMagick.php" />
|
||||
</errorLevel>
|
||||
</PossiblyUnusedMethod>
|
||||
</issueHandlers>
|
||||
<forbiddenFunctions>
|
||||
<function name="var_dump" />
|
||||
|
|
Loading…
Reference in New Issue