Completed
Pull Request — master (#333)
by
unknown
59:20
created

Module::getCachedServicesPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nwidart\Modules\Lumen;
4
5
use Illuminate\Support\Str;
6
use Nwidart\Modules\Module as BaseModule;
7
8
class Module extends BaseModule
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 1
    public function getCachedServicesPath()
14
    {
15 1
        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->basePath('storage/app/') . 'services.php');
0 ignored issues
show
Unused Code introduced by
The call to Application::basePath() has too many arguments starting with 'storage/app/'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function registerProviders()
22
    {
23
        foreach ($this->get('providers', []) as $provider) {
24
            $this->app->register($provider);
25
        }
26
    }
27
}
28