LangPublisher   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDestinationPath() 0 6 1
A getSourcePath() 0 6 1
1
<?php
2
3
namespace Consigliere\Components\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
    public function getDestinationPath()
20
    {
21
        $name = $this->component->getLowerName();
0 ignored issues
show
Bug introduced by
The method getLowerName cannot be called on $this->component (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
        return base_path("resources/lang/{$name}");
24
    }
25
26
    /**
27
     * Get source path.
28
     *
29
     * @return string
30
     */
31
    public function getSourcePath()
32
    {
33
        return $this->getComponent()->getExtraPath(
0 ignored issues
show
Bug introduced by
The method getExtraPath cannot be called on $this->getComponent() (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
            $this->repository->config('paths.generator.lang')
35
        );
36
    }
37
}
38