Showing 889 of 1,485 total issues
Function updateDOM
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateDOM(prevNode: ImageNode, dom: HTMLElement) {
if (prevNode.__src !== this.__src) {
dom.setAttribute('src', this.__src);
}
Function $pasteClipboardColumns
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $pasteClipboardColumns(editor: LexicalEditor, isBefore: boolean): void {
const selection = $getSelection();
const table = $getTableFromSelection(selection);
const cells = $getTableCellsFromSelection(selection);
const referenceCell = cells[isBefore ? 0 : cells.length - 1];
Method getConverterEnvironment
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getConverterEnvironment(): Environment
{
$environment = new Environment([
'header_style' => 'atx', // Set to 'atx' to output H1 and H2 headers as # Header1 and ## Header2
'suppress_errors' => true, // Set to false to show warnings when loading malformed HTML
Function updateContextToolbars
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected updateContextToolbars(update: EditorUiStateUpdate): void {
for (let i = this.activeContextToolbars.length - 1; i >= 0; i--) {
const toolbar = this.activeContextToolbars[i];
toolbar.destroy();
this.activeContextToolbars.splice(i, 1);
Function $syncLocalCursorPosition
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $syncLocalCursorPosition(
binding: Binding,
provider: Provider,
): void {
const awareness = provider.awareness;
Function $setBlocksType
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $setBlocksType(
selection: BaseSelection | null,
createElement: () => ElementNode,
): void {
if (selection === null) {
Function $createListOrMerge
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $createListOrMerge(node: ElementNode, listType: ListType): ListNode {
if ($isListNode(node)) {
return node;
}
Function $splitNodeAtPoint
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $splitNodeAtPoint(
node: LexicalNode,
offset: number,
): [parent: ElementNode, offset: number] {
const parent = node.getParent();
Function processNestedUpdates
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processNestedUpdates(
editor: LexicalEditor,
initialSkipTransforms?: boolean,
): boolean {
const queuedUpdates = editor._updates;
Function registerCommand
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerCommand<P>(
command: LexicalCommand<P>,
listener: CommandListener<P>,
priority: CommandListenerPriority,
): () => void {
Function $splitNode
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $splitNode(
node: ElementNode,
offset: number,
): [ElementNode | null, ElementNode] {
let startNode = node.getChildAtIndex(offset);
Function setup
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setup() {
this.elem = this.$el;
this.pageId = this.$opts.pageId;
this.textDirection = this.$opts.textDirection;
Method queryWithTotals
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function queryWithTotals(SimpleListOptions $listOptions, string $nameFilter): Builder
{
$searchTerm = $listOptions->getSearch();
$sort = $listOptions->getSort();
if ($sort === 'name' && $nameFilter) {
Method saveNew
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveNew(string $imageName, string $imageData, string $type, int $uploadedTo = 0): Image
{
$disk = $this->storage->getDisk($type);
$secureUploads = setting('app-secure-images');
$fileName = $this->storage->cleanImageFileName($imageName);
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(UserRepo $userRepo): int
{
$details = $this->snakeCaseOptions();
if (empty($details['email'])) {
Function build
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
build() {
return new EditorFormTabs([
{
label: 'General',
contents: [
Method applySortUpdates
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function applySortUpdates(BookSortMapItem $sortMapItem, array $modelMap): void
{
/** @var BookChild $model */
$model = $modelMap[$sortMapItem->type . ':' . $sortMapItem->id] ?? null;
if (!$model) {
Method build
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function build(): array
{
$page = clone $this->page;
$isDraft = boolval($this->page->draft);
$templates = $this->queries->pages->visibleTemplates()
Function $onCompositionEndImpl
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $onCompositionEndImpl(editor: LexicalEditor, data?: string): void {
const compositionKey = editor._compositionKey;
$setCompositionKey(null);
// Handle termination of composition.
Function findTextInLine
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findTextInLine(text: Text, forward: boolean): null | Text {
let node: Node = text;
// eslint-disable-next-line no-constant-condition
while (true) {
let sibling: null | Node;