Issues (105)

legacy/Route/AbstractRouteTrait.php (2 issues)

Labels
Severity
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
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
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