HasRequestTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 23
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequest() 0 3 1
A setRequest() 0 4 1
1
<?php
2
3
namespace Nip\Utility\Traits;
4
5
use Nip\Request;
0 ignored issues
show
Bug introduced by
The type Nip\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * Class HasRequest
9
 * @package Nip\Utility\Traits
10
 */
11
trait HasRequestTrait
12
{
13
    /**
14
     * @var Request
15
     */
16
    protected $_request;
17
18
    /**
19
     * @return Request
20
     */
21
    public function getRequest()
22
    {
23
        return $this->_request;
24
    }
25
26
    /**
27
     * @param Request $request
28
     * @return $this
29
     */
30
    public function setRequest($request)
31
    {
32
        $this->_request = $request;
33
        return $this;
34
    }
35
}
36