Code Duplication    Length = 9-9 lines in 2 locations

traits/Jetget.php 1 location

@@ 24-32 (lines=9) @@
21
     */
22
    public function __get($name)
23
    {
24
        if (property_exists($this, $name)) {
25
            // First let's see if we've got a specific method for this.
26
            if (method_exists($this, $method = 'get'.ucfirst($name))) {
27
                return $this->$method();
28
            }
29
30
            // Otherwise let's just run some generic automagic.
31
            return $this->$name;
32
        }
33
34
        return null;
35
    }

traits/Jetset.php 1 location

@@ 24-32 (lines=9) @@
21
     */
22
    public function __set($name, $value)
23
    {
24
        if (property_exists($this, $name)) {
25
            // First let's see if we've got a specific method for this.
26
            if (method_exists($this, $method = 'set'.ucfirst($name))) {
27
                return $this->$method($value);
28
            }
29
30
            // Otherwise let's just run some generic automagic.
31
            $this->$name = $value;
32
        }
33
    }
34
}
35