Passed
Push — main ( 52a7ec...5410b3 )
by Torben
03:32
created

PluginToContentElementUpdater   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 3 1
A getListTypeToCTypeMapping() 0 10 1
A getDescription() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Updates;
13
14
use TYPO3\CMS\Install\Attribute\UpgradeWizard;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Install\Attribute\UpgradeWizard was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
use TYPO3\CMS\Install\Updates\AbstractListTypeToCTypeUpdate;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Install\Update...ctListTypeToCTypeUpdate was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
17
#[UpgradeWizard('sfEventMgtPluginToContentElementUpdate')]
18
class PluginToContentElementUpdater extends AbstractListTypeToCTypeUpdate
19
{
20
    protected function getListTypeToCTypeMapping(): array
21
    {
22
        return [
23
            'sfeventmgt_pieventlist' => 'sfeventmgt_pieventlist',
24
            'sfeventmgt_pieventdetail' => 'sfeventmgt_pieventdetail',
25
            'sfeventmgt_pieventregistration' => 'sfeventmgt_pieventregistration',
26
            'sfeventmgt_pieventsearch' => 'sfeventmgt_pieventsearch',
27
            'sfeventmgt_pieventcalendar' => 'sfeventmgt_pieventcalendar',
28
            'sfeventmgt_piuserreg' => 'sfeventmgt_piuserreg',
29
            'sfeventmgt_pipayment' => 'sfeventmgt_pipayment',
30
        ];
31
    }
32
33
    public function getTitle(): string
34
    {
35
        return 'ext:sf_event_mgt: Migrate plugins to content elements';
36
    }
37
38
    public function getDescription(): string
39
    {
40
        return 'Migrates existing plugin records and backend user permissions used by ext:sf_event_mgt.';
41
    }
42
}
43