Showing 889 of 1,485 total issues
Consider simplifying this complex logical expression. Open
Open
if (
nodeName === 'h1' ||
nodeName === 'h2' ||
nodeName === 'h3' ||
nodeName === 'h4' ||
Consider simplifying this complex logical expression. Open
Open
if (
offset === 0 &&
delCount === 1 &&
nodeIndex > 0 &&
prevCollabNode instanceof CollabTextNode &&
Consider simplifying this complex logical expression. Open
Open
if (
(_$isTextNode && anchorOffset === anchorNode.textContent.length) ||
(!_$isTextNode &&
(anchorNode.childNodes.length === anchorOffset ||
(anchorNode.childNodes.length === 1 &&
Consider simplifying this complex logical expression. Open
Open
if (
// We might have removed a node that no longer exists
!anchorNode.isAttached() ||
!focusNode.isAttached() ||
// If we've split a node, then the offset might not be right
Consider simplifying this complex logical expression. Open
Open
} else if ($isRangeSelection(selection)) {
const tableCellNode = $findMatchingParent(
selection.anchor.getNode(),
(n) => $isTableCellNode(n),
);
Consider simplifying this complex logical expression. Open
Open
if (
nextAnchorNode &&
prevAnchorNode &&
!prevEditorState._nodeMap.has(nextAnchorNode.__key) &&
$isTextNode(nextAnchorNode) &&
Consider simplifying this complex logical expression. Open
Open
if (
selection &&
!selection.is(prevSelection) &&
($isTableSelection(selection) || $isTableSelection(prevSelection)) &&
tableObserver.tableSelection &&
Consider simplifying this complex logical expression. Open
Open
if (
isCollapsed &&
(prevSelection === null ||
anchorFormatOrStyleChanged ||
($isRangeSelection(prevSelection) &&
Consider simplifying this complex logical expression. Open
Open
if (
// If it has been 30ms since the last keydown, then we should
// apply the empty space heuristic. We can't do this for Safari,
// as the keydown fires after composition start.
event.timeStamp < lastKeyDownTimeStamp + ANDROID_COMPOSITION_LATENCY ||
Consider simplifying this complex logical expression. Open
Open
if (
!tags.has('skip-scroll-into-view') &&
nextSelection.isCollapsed() &&
rootElement !== null &&
rootElement === document.activeElement
Consider simplifying this complex logical expression. Open
Open
if (
isPossiblyAndroidKeyPress(event.timeStamp) &&
editor.isComposing() &&
isSelectionAnchorSameAsFocus
) {
Consider simplifying this complex logical expression. Open
Open
if (
anchorOffset === nextAnchorOffset &&
focusOffset === nextFocusOffset &&
anchorDOMNode === nextAnchorNode &&
focusDOMNode === nextFocusNode && // Badly interpreted range selection when collapsed - #1482
Consider simplifying this complex logical expression. Open
Open
} else if (
(isCollapsed || isBackward) &&
nextSibling === null &&
$isElementNode(parent) &&
parent.isInline() &&
Consider simplifying this complex logical expression. Open
Open
if (
nodeName === 'h1' ||
nodeName === 'h2' ||
nodeName === 'h3' ||
nodeName === 'h4' ||
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$name,
UserProvider $provider,
Session $session,
LdapService $ldapService,
RegistrationService $registrationService
Method resizeImageData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $imageData,
?int $width,
?int $height,
bool $keepRatio,
?string $format = null,
Method resizeToThumbnailUrl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Image $image,
?int $width,
?int $height,
bool $keepRatio = false,
bool $shouldCreate = false
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(string $event, Webhook $webhook, string|Loggable $detail, User $initiator, int $initiatedTime)
Function showPopup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function showPopup(editor, code, language, direction, callback) {
Method createJointPermissionData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function createJointPermissionData(SimpleEntityData $entity, int $roleId, MassEntityPermissionEvaluator $permissionMap, array $rolePermissionMap, bool $isAdminRole): array