GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 24-24 lines in 2 locations

test/phpunit/tests/Loader/XMLWorkflowFactoryTest.php 2 locations

@@ 422-445 (lines=24) @@
419
     *
420
     * @return void
421
     */
422
    public function testSaveWorkflowInvalidBackup()
423
    {
424
        try {
425
            $testDir = $this->setUpTestDir([
426
                'workflows.xml',
427
                'example.xml',
428
                'new-example.xml'
429
            ], Paths::getPathToSaveWorkflowDir());
430
431
432
            XmlWorkflowFactory::addDefaultPathToWorkflows($testDir);
433
            /** @var XmlWorkflowFactory|\PHPUnit_Framework_MockObject_MockObject $xmlWorkflowFactory */
434
            $xmlWorkflowFactory = $this->getMock(XmlWorkflowFactory::class, ['createBackupFile']);
435
            $xmlWorkflowFactory->expects(static::once())->method('createBackupFile')->will(static::returnValue(false));
436
437
            $xmlWorkflowFactory->getProperties()->setProperty(XmlWorkflowFactory::RESOURCE_PROPERTY, 'workflows.xml');
438
439
            $xmlWorkflowFactory->initDone();
440
            $workflow = $xmlWorkflowFactory->getWorkflow('newExample');
441
            $xmlWorkflowFactory->saveWorkflow('example', $workflow, true);
442
        } finally {
443
            $this->tearDownTestDir();
444
        }
445
    }
446
447
448
    /**
@@ 456-479 (lines=24) @@
453
     *
454
     * @return void
455
     */
456
    public function testSaveWorkflowInvalidCreateNewFile()
457
    {
458
        try {
459
            $testDir = $this->setUpTestDir([
460
                'workflows.xml',
461
                'example.xml',
462
                'new-example.xml'
463
            ], Paths::getPathToSaveWorkflowDir());
464
465
466
            XmlWorkflowFactory::addDefaultPathToWorkflows($testDir);
467
            /** @var XmlWorkflowFactory|\PHPUnit_Framework_MockObject_MockObject $xmlWorkflowFactory */
468
            $xmlWorkflowFactory = $this->getMock(XmlWorkflowFactory::class, ['createNewWorkflowFile']);
469
            $xmlWorkflowFactory->expects(static::once())->method('createNewWorkflowFile')->will(static::returnValue(false));
470
471
            $xmlWorkflowFactory->getProperties()->setProperty(XmlWorkflowFactory::RESOURCE_PROPERTY, 'workflows.xml');
472
473
            $xmlWorkflowFactory->initDone();
474
            $workflow = $xmlWorkflowFactory->getWorkflow('newExample');
475
            $xmlWorkflowFactory->saveWorkflow('example', $workflow, true);
476
        } finally {
477
            $this->tearDownTestDir();
478
        }
479
    }
480
481
482