Test Failed
Push — master ( bf20d9...100aa4 )
by Mike
05:28
created

CreatesApplication::refreshApplication()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace GeneaLabs\LaravelCaffeine\Tests;
2
3
use GeneaLabs\LaravelCaffeine\Providers\Service as LaravelCaffeineService;
4
5
trait CreatesApplication
6
{
7
    protected function refreshApplication()
8
    {
9
        putenv('APP_ENV=internaltesting');
10
11
        $this->app = $this->createApplication();
0 ignored issues
show
Bug Best Practice introduced by
The property app does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
Bug introduced by
It seems like createApplication() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
        /** @scrutinizer ignore-call */ 
12
        $this->app = $this->createApplication();
Loading history...
12
    }
13
    
14
    /**
15
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
16
     */
17
    protected function getPackageProviders($app)
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

17
    protected function getPackageProviders(/** @scrutinizer ignore-unused */ $app)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        return [LaravelCaffeineService::class];
20
    }
21
}
22