VMixed   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A mixed() 0 6 1
1
<?php
2
/**
3
 * Request mixed vars (merged from "get" "post" "cookies")
4
 * User: moyo
5
 * Date: 2018/6/11
6
 * Time: 11:23 AM
7
 */
8
9
namespace Carno\Web\Chips\Controller;
10
11
use Carno\Web\Controller\VGetter;
12
13
trait VMixed
14
{
15
    /**
16
     * @var VGetter
17
     */
18
    private $vgm = null;
19
20
    /**
21
     * @return VGetter
22
     */
23
    public function mixed() : VGetter
24
    {
25
        return $this->vgm ?? $this->vgm = new VGetter(array_merge(
26
            (array) $this->get(),
0 ignored issues
show
Bug introduced by
It seems like get() 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

26
            (array) $this->/** @scrutinizer ignore-call */ get(),
Loading history...
27
            (array) $this->post(),
0 ignored issues
show
Bug introduced by
It seems like post() 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

27
            (array) $this->/** @scrutinizer ignore-call */ post(),
Loading history...
28
            (array) $this->cookies()
0 ignored issues
show
Bug introduced by
It seems like cookies() 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

28
            (array) $this->/** @scrutinizer ignore-call */ cookies()
Loading history...
29
        ));
30
    }
31
}
32