Showing 889 of 1,485 total issues
Function getSetupCallback
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getSetupCallback(options) {
return function setupCallback(editor) {
function editorChange() {
if (options.darkMode) {
editor.contentDocument.documentElement.classList.add('dark-mode');
Function handleDropdown
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function handleDropdown(options: HandleDropdownParams) {
const {menu, toggle, onClose, onOpen, showOnHover} = options;
let clickListener: Function|null = null;
const hide = () => {
Method show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show(string $bookSlug, string $pageSlug)
{
try {
$page = $this->queries->findVisibleBySlugsOrFail($bookSlug, $pageSlug);
} catch (NotFoundException $e) {
Method loadModelsFromSortMap
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function loadModelsFromSortMap(BookSortMap $sortMap): array
{
$modelMap = [];
$ids = [
'chapter' => [],
Function updateDOM
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateDOM(
prevNode: LinkNode,
anchor: LinkHTMLElementType,
config: EditorConfig,
): boolean {
Function $handleNormalizationMergeConflicts
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $handleNormalizationMergeConflicts(
binding: Binding,
normalizedNodes: Set<NodeKey>,
): void {
// We handle the merge operations here
Function moveSelectionPointToSibling
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function moveSelectionPointToSibling(
point: PointType,
node: LexicalNode,
parent: ElementNode,
prevSibling: LexicalNode | null,
Function simpleDiffWithCursor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function simpleDiffWithCursor(
a: string,
b: string,
cursor: number,
): {index: number; insert: string; remove: number} {
Function setupListeners
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupListeners() {
const keyboardNavHandler = new KeyboardNavigationHandler(this.container, event => {
this.hide();
this.toggle.focus();
if (!this.bubbleEscapes) {
Function setupListeners
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupListeners() {
// Copy on copy button click
this.includeButton.addEventListener('click', () => copyTextToClipboard(this.includeInput.value));
this.linkButton.addEventListener('click', () => copyTextToClipboard(this.linkInput.value));
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(PermissionsUpdater $permissionsUpdater, BookshelfQueries $queries): int
{
$shelfSlug = $this->option('slug');
$cascadeAll = $this->option('all');
$shelves = null;
Function action
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async action(formData, context: EditorUiContext) {
const selectedNode: MediaNode|null = await (new Promise((res, rej) => {
context.editor.getEditorState().read(() => {
const node = $getNodeFromSelection($getSelection(), $isMediaNode);
res(node as MediaNode|null);
Method renderUsingCommand
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function renderUsingCommand(string $html): string
{
$command = config('exports.pdf_command');
$inputHtml = tempnam(sys_get_temp_dir(), 'bs-pdfgen-html-');
$outputPdf = tempnam(sys_get_temp_dir(), 'bs-pdfgen-output-');
Method searchEntities
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchEntities(SearchOptions $searchOpts, string $entityType = 'all', int $page = 1, int $count = 20): array
{
$entityTypes = array_keys($this->entityProvider->all());
$entityTypesToSearch = $entityTypes;
Function $syncEvent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $syncEvent(binding: Binding, event: any): void {
const {target} = event;
const collabNode = $getOrInitCollabNodeFromSharedType(binding, target);
if (collabNode instanceof CollabElementNode && event instanceof YTextEvent) {
Function $getOrInitCollabNodeFromSharedType
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $getOrInitCollabNodeFromSharedType(
binding: Binding,
sharedType: XmlText | YMap<unknown> | XmlElement,
parent?: CollabElementNode,
):
Function syncLexicalUpdateToYjs
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function syncLexicalUpdateToYjs(
binding: Binding,
provider: Provider,
prevEditorState: EditorState,
currEditorState: EditorState,
Function $removeSegment
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $removeSegment(
node: TextNode,
isBackward: boolean,
offset: number,
): void {
Function collectBuildInformation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function collectBuildInformation(): string {
let compatibleEditors = 0;
const incompatibleEditors = new Set<string>();
const thisVersion = LexicalEditor.version;
if (typeof window !== 'undefined') {
Function setupCallback
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function setupCallback(editor) {
function editorChange() {
if (options.darkMode) {
editor.contentDocument.documentElement.classList.add('dark-mode');
}