Completed
Push — master ( 758c52...a36606 )
by Nicolas
05:12
created

LangPublisher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 2
cbo 2
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDestinationPath() 0 6 1
A getSourcePath() 0 6 1
1
<?php
2
3
namespace Nwidart\Modules\Publishing;
4
5
class LangPublisher extends Publisher
6
{
7
    /**
8
     * Determine whether the result message will shown in the console.
9
     *
10
     * @var bool
11
     */
12
    protected $showMessage = false;
13
14
    /**
15
     * Get destination path.
16
     *
17
     * @return string
18
     */
19 1
    public function getDestinationPath()
20
    {
21 1
        $name = $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...
22
23 1
        return base_path("resources/lang/{$name}");
24
    }
25
26
    /**
27
     * Get source path.
28
     *
29
     * @return string
30
     */
31 1
    public function getSourcePath()
32
    {
33 1
        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 1
            $this->repository->config('paths.generator.lang')
35 1
        );
36
    }
37
}
38