LangPublisher   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDestinationPath() 0 5 1
A getSourcePath() 0 4 1
1
<?php
2
3
namespace Rawilk\LaravelModules\Publishing;
4
5
use Rawilk\LaravelModules\Support\Config\GenerateConfigReader;
6
7
class LangPublisher extends Publisher
8
{
9
    /** @var bool */
10
    protected $showMessage = false;
11
12
    public function getDestinationPath(): string
13
    {
14
        $name = $this->module->getLowerName();
15
16
        return base_path("resources/lang/{$name}");
17
    }
18
19
    public function getSourcePath(): string
20
    {
21
        return $this->getModule()->getExtraPath(
22
            GenerateConfigReader::read('lang')->getPath()
23
        );
24
    }
25
}
26