Showing 4,504 of 4,504 total issues
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IUserManager $userManager,
IGroupManager $groupManager,
ILockingProvider $lockingProvider,
IMimeTypeLoader $mimeTypeLoader,
ILogger $logger,
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($params) {
// extract context path from host if specified
// (owncloud install path on host)
$host = $params['host'];
// strip protocol
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function readMetaFile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function readMetaFile(string $diskPath) {
if (!\file_exists($diskPath)) {
return [];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method processUserChunks
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function processUserChunks($input, $output, $users, $inputPath, $shouldRepairStoragesIndividually, $group = null) {
Method getItemsSharedWithUser
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$itemType,
$user,
$format = self::FORMAT_NONE,
$parameters = null,
$limit = -1,
Function getStatusInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getStatusInfo($includeVersion = false, $serverHide = false, $hostnameShort = false) {
$systemConfig = \OC::$server->getSystemConfig();
$installed = (bool) $systemConfig->getValue('installed', false);
$maintenance = (bool) $systemConfig->getValue('maintenance', false);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getSharesBy
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSharesBy($userId, $shareType, $path = null, $reshares = false, $limit = 50, $offset = 0);
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(IFactory $languageFactory, IURLGenerator $URLGenerator, IManager $activityManager, ActivityHelper $helper, IDBConnection $connection, IConfig $config) {
Method translate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode);
Function getFullDomain
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getFullDomain($url) {
$parts = \parse_url($url);
if ($parts === false) {
throw new \InvalidArgumentException('Invalid url "' . $url . '"');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadPanels
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function loadPanels($type) {
// If already loaded just return
if (!empty($this->panels[$type])) {
return $this->panels[$type];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method begin
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function begin($path, $user, $mode, array $header, array $accessList, $sourceFileOfRename);
Function checkConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function checkConfig() {
$l = \OC::$server->getL10N('lib');
// Create config if it does not already exist
$configFilePath = self::$configDir .'/config.php';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IAppManager $appManager = null,
IURLGenerator $urlGenerator = null,
IFactory $l10nFac = null,
IUserSession $userSession = null,
IGroupManager $groupManager = null,
Method translate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode);
Method getSharesBy
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset);
Method translate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode) {
Function sendMail
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function sendMail(
$toaddress,
$toname,
$subject,
$mailtext,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($gid, $backends, $userManager, EventDispatcherInterface $eventDispatcher, $emitter = null, $displayName = null) {
Avoid deeply nested control flow statements. Open
if ($user !== null && \in_array($user->getUID(), $logCondition['users'], true)) {
$this->logConditionSatisfied = true;
if (!empty($logCondition['logfile'])) {
$logConditionFile = $logCondition['logfile'];
}