DumperFacade   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
eloc 5
dl 0
loc 38
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommands() 0 3 1
A dump() 0 3 1
A clear() 0 3 1
A restore() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexus\Dumper\Business;
5
6
7
use DataProvider\DumperConfigDataProvider;
8
use Xervice\Core\Business\Model\Facade\AbstractFacade;
9
10
/**
11
 * @method \Nexus\Dumper\Business\DumperBusinessFactory getFactory()
12
 * @method \Nexus\Dumper\DumperConfig getConfig()
13
 */
14
class DumperFacade extends AbstractFacade implements DumperFacadeInterface
15
{
16
    /**
17
     * @return array
18
     */
19
    public function getCommands(): array
20
    {
21
        return $this->getFactory()->getCommandList();
22
    }
23
24
    /**
25
     * @param \DataProvider\DumperConfigDataProvider $configDataProvider
26
     *
27
     * @return string
28
     */
29
    public function dump(DumperConfigDataProvider $configDataProvider): string
30
    {
31
        return $this->getFactory()->createDumper($configDataProvider)->dump();
32
    }
33
34
    /**
35
     * @param \DataProvider\DumperConfigDataProvider $configDataProvider
36
     *
37
     * @return string
38
     */
39
    public function restore(DumperConfigDataProvider $configDataProvider): string
40
    {
41
        return $this->getFactory()->createDumper($configDataProvider)->restore();
42
    }
43
44
    /**
45
     * @param \DataProvider\DumperConfigDataProvider $configDataProvider
46
     *
47
     * @return string
48
     */
49
    public function clear(DumperConfigDataProvider $configDataProvider): string
50
    {
51
        return $this->getFactory()->createDumper($configDataProvider)->clear();
52
    }
53
}