Showing 889 of 1,485 total issues
Function $insertTableColumn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
tableNode: TableNode,
targetIndex: number,
shouldInsertAfter = true,
columnCount: number,
table: TableDOMTable,
Function moveSelectionPointToSibling
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
point: PointType,
node: LexicalNode,
parent: ElementNode,
prevSibling: LexicalNode | null,
nextSibling: LexicalNode | null,
Function adjustPointOffsetForMergedSibling
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
point: PointType,
isBefore: boolean,
key: NodeKey,
target: TextNode,
textLength: number,
Function markCollapsedSelectionFormat
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
format: number,
style: string,
offset: number,
key: NodeKey,
timeStamp: number,
Function $shouldPreventDefaultAndInsertText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
selection: RangeSelection,
domTargetRange: null | StaticRange,
text: string,
timeStamp: number,
isBeforeInput: boolean,
Function $updateTextNodeFromDOMContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
textNode: TextNode,
textContent: string,
anchorOffset: null | number,
focusOffset: null | number,
compositionEnd: boolean,
Function setTextThemeClassNames
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
tag: string,
prevFormat: number,
nextFormat: number,
dom: HTMLElement,
textClassNames: TextNodeThemeClasses,
Function isDeleteForward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
key: string,
ctrlKey: boolean,
shiftKey: boolean,
altKey: boolean,
metaKey: boolean,
Function isMoveToStart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
key: string,
ctrlKey: boolean,
shiftKey: boolean,
altKey: boolean,
metaKey: boolean,
Function triggerMutationListeners
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
editor: LexicalEditor,
mutatedNodes: MutatedNodes,
updateTags: Set<string>,
dirtyLeaves: Set<string>,
prevEditorState: EditorState,
Function setMutatedNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
mutatedNodes: MutatedNodes,
registeredNodes: RegisteredNodes,
mutationListeners: MutationListeners,
node: LexicalNode,
mutation: NodeMutation,
Function isMoveToEnd
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
key: string,
ctrlKey: boolean,
shiftKey: boolean,
altKey: boolean,
metaKey: boolean,
Function handleLoginCallback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handleLoginCallback(string $socialDriver, SocialUser $socialUser)
{
$socialDriver = trim(strtolower($socialDriver));
$socialId = $socialUser->getId();
- 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 rebuildForEntity
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function rebuildForEntity(Entity $entity)
{
$entities = [$entity];
if ($entity instanceof Book) {
$books = $this->bookFetchQuery()->where('id', '=', $entity->id)->get();
- 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 loadFromJwkArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFromJwkArray(array $jwk)
{
// 'alg' is optional for a JWK, but we will still attempt to validate if
// it exists otherwise presume it will be compatible.
$alg = $jwk['alg'] ?? null;
- 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 attempt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function attempt(array $credentials = [], $remember = false)
{
$username = $credentials['username'];
$userDetails = $this->ldapService->getUserDetails($username);
- 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 selectItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
selectItem(item) {
const isDblClick = this.isDoubleClick();
const type = item.getAttribute('data-entity-type');
const id = item.getAttribute('data-entity-id');
const isSelected = (!item.classList.contains('selected') || isDblClick);
- 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 createManyJointPermissions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function createManyJointPermissions(array $originalEntities, array $roles)
{
$entities = $this->entitiesToSimpleEntities($originalEntities);
$jointPermissions = [];
- 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 validate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function validate(): void
{
$this->validateInitial();
$required = ['keys', 'tokenEndpoint', 'authorizationEndpoint'];
- 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 filterElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected static function filterElement(DOMElement $element): void
{
$elType = strtolower($element->tagName);
$allowedAttrs = static::$allowedAttrsByElements[$elType] ?? null;
if (is_null($allowedAttrs)) {
- 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"