Code Duplication    Length = 8-9 lines in 2 locations

src/Collections/PopoloCollection.php 1 location

@@ 54-61 (lines=8) @@
51
     *
52
     * @return mixed
53
     */
54
    public function __get($prop)
55
    {
56
        if (in_array($prop, $this->properties)) {
57
            $getter = 'get' . ucfirst($prop);
58
            return $this->$getter();
59
        }
60
        trigger_error('Undefined property: '.__CLASS__.'::$'.$prop, E_USER_ERROR);
61
    }
62
63
    /**
64
     * Get the first item in this collection

src/Objects/PopoloObject.php 1 location

@@ 35-43 (lines=9) @@
32
     *
33
     * @return mixed
34
     */
35
    public function __get($prop)
36
    {
37
        $properties = array_merge($this->baseProperties, $this->properties);
38
        if (in_array($prop, $properties)) {
39
            $getter = 'get' . ucfirst($prop);
40
            return $this->$getter();
41
        }
42
        trigger_error('Undefined property: '.__CLASS__.'::$'.$prop, E_USER_ERROR);
43
    }
44
45
    protected function getKeyForHash()
46
    {