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