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

AssetPublisher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 31
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDestinationPath() 0 4 1
A getSourcePath() 0 6 1
1
<?php
2
3
namespace Nwidart\Modules\Publishing;
4
5
use Nwidart\Modules\Support\Config\GenerateConfigReader;
6
7
class AssetPublisher extends Publisher
8
{
9
    /**
10
     * Determine whether the result message will shown in the console.
11
     *
12
     * @var bool
13
     */
14
    protected $showMessage = false;
15
16
    /**
17
     * Get destination path.
18
     *
19
     * @return string
20
     */
21
    public function getDestinationPath()
22
    {
23
        return $this->repository->assetPath($this->module->getLowerName());
0 ignored issues
show
Bug introduced by
The method getLowerName cannot be called on $this->module (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
24
    }
25
26
    /**
27
     * Get source path.
28
     *
29
     * @return string
30
     */
31
    public function getSourcePath()
32
    {
33
        return $this->getModule()->getExtraPath(
0 ignored issues
show
Bug introduced by
The method getExtraPath cannot be called on $this->getModule() (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
34
            GenerateConfigReader::read('assets')->getPath()
35
        );
36
    }
37
}
38