LangPublisher::getDestinationPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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