Showing 3,235 of 4,504 total issues
Method fixEntriesWithNonExistingParentIdEntry
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function fixEntriesWithNonExistingParentIdEntry(IOutput $out, $storageNumericId = null) {
$qb = $this->connection->getQueryBuilder();
$this->addQueryConditionsNonExistingParentIdEntry($qb, $storageNumericId);
$qb->setMaxResults(self::CHUNK_SIZE);
Method getSharedItemsOwners
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSharedItemsOwners($user, $type, $includeCollections = false, $includeOwner = false) {
// First, we find out if $type is part of a collection (and if that collection is part of
// another one and so on).
$collectionTypes = [];
if (!$includeCollections || !$collectionTypes = self::getCollectionItemTypes($type)) {
Method getChildren
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChildren(\OCP\Share\IShare $parent) {
$children = [];
$qb = $this->dbConn->getQueryBuilder();
$qb->select('*')
Method writeData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeData() {
// Create a php file ...
$content = "<?php\n";
$content .= '$CONFIG = ';
$content .= \var_export($this->cache, true);
Method addUseNameToBlackList
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addUseNameToBlackList($name, $alias) {
$name = \strtolower($name);
$alias = \strtolower($alias);
foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) {
Method addDirRecursive
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addDirRecursive($dir, $internalDir='') {
$dirname = \basename($dir);
$rootDir = $internalDir . $dirname;
if (!empty($rootDir)) {
$dirOpts = [
Method preciseResize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preciseResize($width, $height) {
if (!$this->valid()) {
$this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']);
return false;
}
Method analyzeOC
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function analyzeOC(array $dependencies, array $appInfo) {
$missing = [];
$minVersion = null;
if (isset($dependencies['owncloud']['@attributes']['min-version'])) {
$minVersion = $dependencies['owncloud']['@attributes']['min-version'];
Method rmdirr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function rmdirr($dir, $deleteSelf = true) {
if (\is_dir($dir)) {
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::CHILD_FIRST
Method setStatus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function setStatus($status) {
$protocol = \OC::$server->getRequest()->getHttpProtocol();
switch ($status) {
case self::STATUS_NOT_MODIFIED:
$status = $status . ' Not Modified';
Method getFile
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFile($size) {
$ext = $this->getExtension();
$basePath = "{$this->path}/avatar.$ext";
Method findMigrations
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function findMigrations() {
$directory = \realpath($this->migrationsPath);
$iterator = new \RegexIterator(
new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS),
Method setValues
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []) {
// Try to insert whole record into the table ($toInsert) if predicate NOT EXISTS ($compare) is satisfied
$toInsert = \array_merge($keys, $values);
$compare = \array_keys($keys);
$tableName = $this->tablePrefix . $table;
Method processLines
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processLines(array $params, array &$data) {
static $lastProcessedChar = null;
if (!isset($data['linesNumber'])) {
$data = [
Method loginWithCookie
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function loginWithCookie($uid, $currentToken) {
$this->logger->debug(
'regenerating session id for uid {uid}, currentToken {currentToken}',
['app' => __METHOD__, 'uid' => $uid, 'currentToken' => $currentToken]
);
Method getNumberOfUnreadCommentsForNodes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getNumberOfUnreadCommentsForNodes($objectType, $objectIds, IUser $user) {
$qbMain = $this->dbConn->getQueryBuilder();
$qbSup = $this->dbConn->getQueryBuilder();
$unreadCountsForNodes = [];
Method getTree
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTree($id, $limit = 0, $offset = 0) {
$tree = [];
$tree['comment'] = $this->get($id);
$tree['replies'] = [];
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
// validate the environment
$server = \OC::$server;
$setupHelper = new Setup(
$this->config,
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$configNames = $input->getArgument('name');
$configName = $configNames[0];
if (\sizeof($configNames) > 1) {
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
'@phan-var \OC\Files\MimetypeDetector $this->mimetypeDetector';
$mappings = $this->mimetypeDetector->getAllMappings();
$totalFilecacheUpdates = 0;