Showing 3,235 of 4,504 total issues
Method update
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function update(IComment $comment) {
return $this->emittingCall(function () use (&$comment) {
$qb = $this->dbConn->getQueryBuilder();
$affectedRows = $qb
->update('comments')
Method getFileSizeViaCurl
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFileSizeViaCurl($fileName) {
if (\OC::$server->getIniWrapper()->getString('open_basedir') === '') {
$pathParts = \explode('/', $fileName);
$encodedPathParts = \array_map('rawurlencode', $pathParts);
$encodedFileName = \implode('/', $encodedPathParts);
Method insert
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function insert(IComment &$comment) {
$qb = $this->dbConn->getQueryBuilder();
$affectedRows = $qb
->insert('comments')
->values([
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
// collate config setting to the end, to avoid partial configuration
$toBeSet = [];
if ($backend = $input->getOption('backend')) {
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute($command, $token, $params = []) {
try {
$this->validateRequest($command, $token);
$output = new BufferedOutput();
Function processSharesToConfirm
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
processSharesToConfirm: function() {
var fileList = this.filesApp.fileList;
// check for new server-to-server shares which need to be approved
$.get(OC.generateUrl('/apps/files_sharing/api/externalShares'),
{},
Function processIncomingShareFromUrl
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
processIncomingShareFromUrl: function() {
var fileList = this.filesApp.fileList;
var params = OC.Util.History.parseUrlQuery();
//manually add server-to-server share
if (params.remote && params.token && params.owner && params.name) {
Function initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function() {
Files.bindKeyboardShortcuts(document, $);
// TODO: move file list related code (upload) to OCA.Files.FileList
$('#file_action_panel').attr('activeAction', false);
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var templateVars = {
closeLabel: t('files', 'Close')
};
Function setFilter
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setFilter:function(filter) {
var total = 0;
if (this._filter === filter) {
return;
}
Function reload
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reload: function() {
this._selectedFiles = {};
this._selectionSummary.clear();
if (this._currentFileModel) {
this._currentFileModel.off();
Function unlock
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
unlock: function(path, token, options) {
if (!path) {
throw 'Missing argument "path"';
}
if (!token) {
Method splitUserRemote
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function splitUserRemote($address) {
if (\strpos($address, '@') === false) {
throw new \Exception('Invalid Federated Cloud ID');
}
Method sendRemoteShare
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendRemoteShare(
Address $shareWithAddress,
Address $ownerAddress,
Address $sharedByAddress,
$token,
Method getSharePermissions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSharePermissions($user) {
// check of we access a federated share
if ($user !== null) {
try {
$share = $this->shareManager->getShareByToken($user);
Method getACL
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getACL() {
$acl = [
[
'privilege' => '{DAV:}all',
'principal' => '{DAV:}owner',
Method getSearchResultIterator
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getSearchResultIterator($filesUri, $searchResults, $requestedProps, $maxResults) {
$paths = [];
foreach ($searchResults as $searchResult) {
$paths[$filesUri . $searchResult->path] = $searchResult;
}
Method httpPost
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath();
// Only handling xml
$contentType = $request->getHeader('Content-Type');
Method registerHooks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerHooks() {
/** @var HookManager $hm */
$hm = $this->getContainer()->query(HookManager::class);
$hm->setup();
Method vCard2Array
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function vCard2Array($uri, VCard $vCard) {
$result = [
'URI' => $uri,
];