Code Duplication    Length = 21-29 lines in 2 locations

core/domain/services/admin/events/editor/AdvancedEditorData.php 2 locations

@@ 446-474 (lines=29) @@
443
     * @return array|null
444
     * @since $VID:$
445
     */
446
    protected function getGraphQLCurrentUser()
447
    {
448
        $field_key = 'viewer';
449
        $query = <<<QUERY
450
        query GET_CURRENT_USER {
451
            {$field_key} {
452
                description
453
                email
454
                firstName
455
                id
456
                name
457
                nicename
458
                nickname
459
                lastName
460
                locale
461
                userId
462
                username
463
                __typename
464
            }
465
        }
466
QUERY;
467
        $data = [
468
            'operation_name' => 'GET_CURRENT_USER',
469
            'query' => $query,
470
        ];
471
472
        $responseData = $this->makeGraphQLRequest($data);
473
        return !empty($responseData[ $field_key ]) ? $responseData[ $field_key ] : null;
474
    }
475
476
477
    /**
@@ 481-501 (lines=21) @@
478
     * @return array|null
479
     * @since $VID:$
480
     */
481
    protected function getGraphQLGeneralSettings()
482
    {
483
        $field_key = 'generalSettings';
484
        $query = <<<QUERY
485
        query GET_GENERAL_SETTINGS {
486
            {$field_key} {
487
                dateFormat
488
                timeFormat
489
                timezone
490
                __typename
491
            }
492
        }
493
QUERY;
494
        $data = [
495
            'operation_name' => 'GET_CURRENT_USER',
496
            'query' => $query,
497
        ];
498
499
        $responseData = $this->makeGraphQLRequest($data);
500
        return !empty($responseData[ $field_key ]) ? $responseData[ $field_key ] : null;
501
    }
502
503
504
    /**