LaravelOverflow::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace CraftLogan\LaravelOverflow;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Http\Request;
7
use CraftLogan\LaravelOverflow\Overflowable;
8
9
class LaravelOverflow
10
{
11
    use Overflowable;
12
13
    protected $model;
14
    protected $overflow_column;
15
    protected $request;
16
17
    public function __construct(Request $request, Model $model, $overflow_column = "properties")
0 ignored issues
show
Bug introduced by
You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
18
    {
19
        $this->request = $request;
20
        $this->model = $model;
21
        $this->overflow_column = $overflow_column;
22
    }
23
24
}
25