AbstractRouteTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setParams() 0 4 1
1
<?php
2
3
namespace Nip\Router\Legacy\Route;
4
5
/**
6
 * Trait AbstractRouteTrait
7
 * @package Nip\Router\Legacy\Route
8
 */
9
trait AbstractRouteTrait
10
{
11
    /**
12
     * @param array $params
13
     * @deprecated Use setDefaults
14
     */
15
    public function setParams($params = [])
16
    {
17
        $this->getParser()->setParams($params);
0 ignored issues
show
Bug introduced by
It seems like getParser() 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

17
        $this->/** @scrutinizer ignore-call */ 
18
               getParser()->setParams($params);
Loading history...
18
        $this->addDefaults($params);
0 ignored issues
show
Bug introduced by
It seems like addDefaults() 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

18
        $this->/** @scrutinizer ignore-call */ 
19
               addDefaults($params);
Loading history...
19
    }
20
}
21