Showing 889 of 1,485 total issues
Function setup
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setup() {
this.elem = this.$el;
this.editContainer = this.$refs.editContainer;
this.input = this.$refs.input;
Method getConnection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getConnection()
{
if ($this->ldapConnection !== null) {
return $this->ldapConnection;
}
Function buildForInput
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function buildForInput(options) {
// Set language
window.tinymce.addI18n(options.language, options.translationMap);
// BookStack Version
Function $mergeTableCellsInSelection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $mergeTableCellsInSelection(selection: TableSelection): void {
const selectionShape = selection.getShape();
const cells = $getTableCellsFromSelection(selection);
if (cells.length === 0) {
return;
Function syncPropertiesFromYjs
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function syncPropertiesFromYjs(
binding: Binding,
sharedType: XmlText | YMap<unknown> | XmlElement,
lexicalNode: LexicalNode,
keysChanged: null | Set<string>,
Function $deleteCellHandler
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const $deleteCellHandler = (
event: KeyboardEvent | ClipboardEvent | null,
): boolean => {
const selection = $getSelection();
Function adjustFocusNodeInDirection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const adjustFocusNodeInDirection = (
tableObserver: TableObserver,
tableNode: TableNode,
x: number,
y: number,
Function exportDOM
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exportDOM(editor: LexicalEditor): DOMExportOutput {
let {element} = super.exportDOM(editor);
invariant(
element !== null && isHTMLElement(element),
'Expected TextNode createDOM to always return a HTMLElement',
Method processUsers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processUsers(array $users, UserAvatars $userAvatar): int
{
$dryRun = !$this->option('force');
$this->info(count($users) . " user(s) found to update avatars for.");
Function setupDropTargetHandlers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupDropTargetHandlers() {
let depth = 0;
const reset = () => {
this.hideOverlay();
Function setupListeners
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupListeners() {
this.elem.addEventListener('click', this.onClick.bind(this));
let lastSearch = 0;
this.searchInput.addEventListener('input', () => {
Function createUploadFromFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createUploadFromFile(file) {
const {
dom, status, progress, dismiss,
} = this.createDomForFile(file);
this.statusArea.append(dom);
Method fromRequest
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function fromRequest(Request $request): self
{
if (!$request->has('search') && !$request->has('term')) {
return static::fromString('');
}
Function setupTestCase
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupTestCase = (
cb: (selection: RangeSelection, el: ElementNode) => void,
) => {
const editor = createTestEditor();
Function createRelativePosition
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createRelativePosition(
point: Point,
binding: Binding,
): null | RelativePosition {
const collabNodeMap = binding.collabNodeMap;
Function setupTestCase
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupTestCase = (
cb: (selection: RangeSelection, el: ElementNode) => void,
) => {
const editor = createTestEditor();
Function setupTestCase
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupTestCase = (
cb: (selection: RangeSelection, node: ElementNode) => void,
) => {
const editor = createTestEditor();
Function $shouldPreventDefaultAndInsertText
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $shouldPreventDefaultAndInsertText(
selection: RangeSelection,
domTargetRange: null | StaticRange,
text: string,
timeStamp: number,
Consider simplifying this complex logical expression. Open
Open
if (
$isTextNode(node) &&
textContentSize !== 0 &&
// Exclude empty text nodes at boundaries resulting from user's selection
!(
Consider simplifying this complex logical expression. Open
Open
if (
anchor.type === 'element' &&
anchor.offset === 0 &&
selection.isCollapsed() &&
!$isRootNode(anchorNode) &&