STAssigns   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A add() 0 11 1
1
<?php
2
/**
3
 * Setup assigns
4
 * User: moyo
5
 * Date: 2018/5/29
6
 * Time: 10:49 AM
7
 */
8
9
namespace Carno\Web\Chips\Router;
10
11
use Carno\Web\Router\Records;
12
13
trait STAssigns
14
{
15
    use STAMethods, STAHelper;
16
17
    /**
18
     * @param string $method
19
     * @param string $uri
20
     * @param callable $processor
21
     * @return static
22
     */
23
    protected function add(string $method, string $uri, callable $processor) : self
24
    {
25
        /**
26
         * @var Records $r
27
         */
28
29
        $r = $this->records;
30
31
        $r->accept(strtoupper($method), $this->prefix . $uri, $processor);
32
33
        return $this;
34
    }
35
}
36