Showing 889 of 1,485 total issues
Method orientImageToOriginalExif
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function orientImageToOriginalExif(InterventionImage $image, string $originalData): void
{
if (!extension_loaded('exif')) {
return;
}
Method handleLoginCallback
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleLoginCallback(string $socialDriver, SocialUser $socialUser)
{
$socialDriver = trim(strtolower($socialDriver));
$socialId = $socialUser->getId();
Method registerUser
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerUser(array $userData, ?SocialAccount $socialAccount = null, bool $emailConfirmed = false): User
{
$userEmail = $userData['email'];
$authSystem = $socialAccount ? $socialAccount->driver : auth()->getDefaultDriver();
Function detailsDialog
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function detailsDialog(editor) {
return {
title: 'Edit collapsible block',
body: {
type: 'panel',
Function createDropListener
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createDropListener(context: EditorUiContext): (event: DragEvent) => boolean {
const editor = context.editor;
return (event: DragEvent): boolean => {
// Template handling
const templateId = event.dataTransfer?.getData('bookstack/template') || '';
Function buildDOM
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected buildDOM(): HTMLElement {
const controls: HTMLElement[] = [];
const contents: HTMLElement[] = [];
const selectTab = (tabIndex: number) => {
Function $createCollabNodeFromLexicalNode
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $createCollabNodeFromLexicalNode(
binding: Binding,
lexicalNode: LexicalNode,
parent: CollabElementNode,
):
Function $dfs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $dfs(
startingNode?: LexicalNode,
endingNode?: LexicalNode,
): Array<DFSNode> {
const nodes = [];
Function restart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function restart(): void {
const currentRootDOMNode = editor.getRootElement();
if (currentRootDOMNode === null) {
return stop();
}
Function $getNodeTriplet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $getNodeTriplet(
source: PointType | LexicalNode | TableCellNode,
): [TableCellNode, TableRowNode, TableNode] {
let cell: TableCellNode;
if (source instanceof TableCellNode) {
Function $createTableNodeWithDimensions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $createTableNodeWithDimensions(
rowCount: number,
columnCount: number,
includeHeaders: InsertTableCommandPayloadHeaders = true,
): TableNode {
Function saveDraft
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async saveDraft() {
const data = {name: this.titleElem.value.trim()};
const editorContent = await this.getEditorComponent().getContent();
Object.assign(data, editorContent);
Method processLoginCallback
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function processLoginCallback(string $samlID, array $samlAttributes): User
{
$userDetails = $this->getUserDetails($samlID, $samlAttributes);
$isLoggedIn = auth()->check();
Method getUserDetailsFromToken
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getUserDetailsFromToken(OidcIdToken $idToken, OidcAccessToken $accessToken, OidcProviderSettings $settings): OidcUserDetails
{
$userDetails = new OidcUserDetails();
$userDetails->populate(
$idToken,
Method update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(Request $request, int $id)
{
$this->preventAccessInDemoMode();
$this->checkPermission('users-manage');
Method loadSettingsFromIssuerDiscovery
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function loadSettingsFromIssuerDiscovery(ClientInterface $httpClient): array
{
$issuerUrl = rtrim($this->issuer, '/') . '/.well-known/openid-configuration';
$request = new Request('GET', $issuerUrl);
$response = $httpClient->sendRequest($request);
Function $setInsetForSelection
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function $setInsetForSelection(editor: LexicalEditor, change: number): void {
const selection = $getSelection();
const listItemsInSelection = getListItemsForSelection(selection);
const isListSelection = listItemsInSelection.length > 0 && !listItemsInSelection.includes(null);
Method containHtml
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function containHtml(string $htmlContent): string
{
$imageTagsOutput = [];
preg_match_all("/\<img.*?src\=(\'|\")(.*?)(\'|\").*?\>/i", $htmlContent, $imageTagsOutput);
Function collapseAtStart
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
collapseAtStart(selection: RangeSelection): true {
const paragraph = $createParagraphNode();
const children = this.getChildren();
children.forEach((child) => paragraph.append(child));
const listNode = this.getParentOrThrow();
Function applyDOMRange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
applyDOMRange(range: StaticRange): void {
const editor = getActiveEditor();
const currentEditorState = editor.getEditorState();
const lastSelection = currentEditorState._selection;
const resolvedSelectionPoints = $internalResolveSelectionPoints(