Code Duplication    Length = 10-10 lines in 2 locations

typo3/sysext/workspaces/Classes/Service/WorkspaceService.php 2 locations

@@ 313-322 (lines=10) @@
310
            )
311
        ];
312
313
        if ($pageList) {
314
            $pidField = $table === 'pages' ? 'uid' : 'pid';
315
            $constraints[] = $queryBuilder->expr()->in(
316
                'B.' . $pidField,
317
                $queryBuilder->createNamedParameter(
318
                    GeneralUtility::intExplode(',', $pageList, true),
319
                    Connection::PARAM_INT_ARRAY
320
                )
321
            );
322
        }
323
324
        if ($isTableLocalizable && MathUtility::canBeInterpretedAsInteger($language)) {
325
            $constraints[] = $queryBuilder->expr()->eq(
@@ 486-495 (lines=10) @@
483
            );
484
        }
485
486
        if ($pageList) {
487
            $pidField = $table === 'pages' ? 'B.uid' : 'A.pid';
488
            $constraints[] =  $queryBuilder->expr()->in(
489
                $pidField,
490
                $queryBuilder->createNamedParameter(
491
                    GeneralUtility::intExplode(',', $pageList, true),
492
                    Connection::PARAM_INT_ARRAY
493
                )
494
            );
495
        }
496
497
        $rows = $queryBuilder
498
            ->select('A.pid AS wspid', 'B.uid AS t3ver_oid', 'C.uid AS uid', 'B.pid AS livepid')