src/Resource/File.php
File File.php
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Seafile\Client\Resource;
use Exception;
Method copy
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function copy(
LibraryType $srcLibrary,
string $srcFilePath,
LibraryType $dstLibrary,
string $dstDirectoryPath,
Method rename
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function rename(LibraryType $library, DirectoryItem $dirItem, string $newFilename): bool
{
$filePath = $dirItem->dir . $dirItem->name;
if (empty($filePath)) {
Method getMultiPartParams
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMultiPartParams(
string $localFilePath,
string $dir,
bool $newFile = true,
$newFilename = false
Method upload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
LibraryType $library,
string $localFilePath,
string $dir = '/',
$newFilename = false,
bool $newFile = true
Method downloadFromDir
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
LibraryType $library,
DirectoryItem $item,
string $localFilePath,
string $dir,
int $reuse = 1
Method copy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
LibraryType $srcLibrary,
string $srcFilePath,
LibraryType $dstLibrary,
string $dstDirectoryPath,
int $operation = self::OPERATION_COPY