Showing 3,235 of 4,504 total issues
Function tryAuthModuleLogin
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function tryAuthModuleLogin(IRequest $request) {
foreach ($this->getAuthModules(false) as $authModule) {
$user = $authModule->auth($request);
if ($user !== null) {
if (!$user->isEnabled()) {
- 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 searchInUnicode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function searchInUnicode($unicodePoint) {
$left = 0;
$right = \count($this->unicodeRanges) - 1;
while ($left <= $right) {
$midpoint = \intval(($left + $right) / 2, 10);
- 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 preLoginNameUsedAsUserName
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function preLoginNameUsedAsUserName($param) {
if (!isset($param['uid'])) {
throw new \Exception('key uid is expected to be set in $param');
}
- 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 handleRepairFeedBack
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function handleRepairFeedBack($event) {
if (!$event instanceof GenericEvent) {
return;
}
switch ($event->getSubject()) {
- 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 execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$uid = $input->getArgument('uid');
$key = $input->getArgument('key');
$value = $input->getArgument('value');
- 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 mergeArrayValue
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function mergeArrayValue(array $configNames, $existingValues, $value, $updateOnly) {
$configName = \array_shift($configNames);
if (!\is_array($existingValues)) {
$existingValues = [];
}
- 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 removeSubValue
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function removeSubValue($keys, $currentValue, $throwError) {
$nextKey = \array_shift($keys);
if (\is_array($currentValue)) {
if (isset($currentValue[$nextKey])) {
- 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 beforeController
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function beforeController($controller, $methodName) {
if ($controller instanceof LoginController && $methodName === 'logout') {
// Don't block the logout page, to allow canceling the 2FA
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
Function message
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
message:function(content, title, dialogType, buttons, callback, modal, cssClass) {
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$AppName,
IRequest $request,
IUserSession $userSession,
ILogger $logger,
IURLGenerator $urlGenerator,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$appName,
IRequest $request,
IProvider $tokenProvider,
IUserManager $userManager,
ISession $session,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$AppName,
IRequest $request,
IConfig $config,
IClientService $clientService,
IURLGenerator $urlGenerator,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
DbHandler $dbHandler,
IClientService $httpClientService,
ILogger $logger,
IJobList $jobList,
ISecureRandom $secureRandom,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$appName,
IRequest $request,
ISecureRandom $secureRandom,
IJobList $jobList,
TrustedServers $trustedServers,
Method publishActivity
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$affectedUser,
$subject,
$subjectParams,
$objectType,
$objectId,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
$name,
ICommentsManager $commentsManager,
IUserManager $userManager,
IUserSession $userSession,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
ICommentsManager $commentsManager,
IUserManager $userManager,
IUserSession $userSession,
EventDispatcherInterface $dispatcher,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
IGroupManager $groupManager,
IManager $activityManager,
IUserSession $session,
ISystemTagManager $tagManager,
IAppManager $appManager,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
FederatedShareProvider $federatedShareProvider,
Notifications $notifications,
IUserManager $userManager,
ActivityManager $activityManager,
NotificationManager $notificationManager,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
ISession $session,
Session $userSession,
IRequest $request,
Manager $twoFactorManager,
AccountModuleManager $accountModuleManager,