Completed
Pull Request — master (#2233)
by Revin
64:12
created

Uninstaller   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A uninstall() 0 9 1
A deleteBackendNavigation() 0 4 1
1
<?php
2
3
namespace Backend\Modules\ContentBlocks\Installer;
4
5
/*
6
 * This file is part of Fork CMS.
7
 *
8
 * For the full copyright and license information, please view the license
9
 * file that was distributed with this source code.
10
 */
11
12
use Backend\Core\Installer\ModuleUninstaller;
13
use Backend\Core\Installer\UninstallerInterface;
14
15
/**
16
 * Uninstaller for the content blocks module
17
 */
18
class Uninstaller extends ModuleUninstaller implements UninstallerInterface
19
{
20
    public function uninstall(): void
21
    {
22
        $this->setModule('ContentBlocks');
23
24
        $this->deleteBackendNavigation();
25
26
        $this->dropDatabase('content_blocks');
27
        $this->dropModule();
28
    }
29
30
    private function deleteBackendNavigation(): void
31
    {
32
        $this->deleteNavigation('Modules.' . $this->getModule());
33
    }
34
}
35