Code Duplication    Length = 8-9 lines in 2 locations

src/Request.php 2 locations

@@ 45-53 (lines=9) @@
42
        return str_replace('_', '', ucwords($str, '_'));
43
    }
44
45
    public function __set($name, $value)
46
    {
47
        $c = $this->camelize($name);
48
        $m = "set$c";
49
        if(method_exists($this, $m)) {
50
            return $this->$m($value);
51
        }
52
        else user_error("undefined property $name");
53
    }
54
55
    public function __get($name) {
56
        $c = $this->camelize($name);
@@ 55-62 (lines=8) @@
52
        else user_error("undefined property $name");
53
    }
54
55
    public function __get($name) {
56
        $c = $this->camelize($name);
57
        $m = "get$c";
58
        if(method_exists($this, $m)) {
59
            return $this->$m();
60
        }
61
        else user_error("undefined property $name");
62
    }
63
64
    /**
65
     * Request constructor.