Completed
Pull Request — master (#666)
by reallyli
02:28
created

MigrationPublisher::getDestinationPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nwidart\Modules\Publishing;
4
5
use Nwidart\Modules\Migrations\Migrator;
6
7
class MigrationPublisher extends AssetPublisher
8
{
9
    /**
10
     * @var Migrator
11
     */
12
    private $migrator;
13
14
    /**
15
     * MigrationPublisher constructor.
16
     * @param Migrator $migrator
17
     */
18
    public function __construct(Migrator $migrator)
19
    {
20
        $this->migrator = $migrator;
21
        parent::__construct($migrator->getModule());
22
    }
23
24
    /**
25
     * Get destination path.
26
     *
27
     * @return string
28
     */
29
    public function getDestinationPath()
30
    {
31
        return $this->repository->config('paths.migration');
32
    }
33
34
    /**
35
     * Get source path.
36
     *
37
     * @return string
38
     */
39
    public function getSourcePath()
40
    {
41
        return $this->migrator->getPath();
42
    }
43
}
44