Code Duplication    Length = 8-8 lines in 2 locations

src/think/response/View.php 1 location

@@ 99-106 (lines=8) @@
96
     * @param  string $name 模板变量
97
     * @return mixed
98
     */
99
    public function getVars(string $name = null)
100
    {
101
        if (is_null($name)) {
102
            return $this->vars;
103
        } else {
104
            return $this->vars[$name] ?? null;
105
        }
106
    }
107
108
    /**
109
     * 模板变量赋值

src/think/Route.php 1 location

@@ 701-708 (lines=8) @@
698
     * @param string $name 方法名称
699
     * @return array|null
700
     */
701
    public function getRest(string $name = null)
702
    {
703
        if (is_null($name)) {
704
            return $this->rest;
705
        }
706
707
        return $this->rest[$name] ?? null;
708
    }
709
710
    /**
711
     * 注册未匹配路由规则后的处理