Code Duplication    Length = 8-16 lines in 2 locations

module/Core/src/Core/Entity/AbstractEntity.php 2 locations

@@ 38-53 (lines=16) @@
35
     * @return mixed
36
     * @throws OutOfBoundsException
37
     */
38
    public function __set($property, $value)
39
    {
40
//        trigger_error(
41
//            sprintf(
42
//                'Accessing entity properties is deprecated. Use setter method instead. ( Tried to access "%s" on %s )',
43
//                $property, get_class($this)
44
//            ),
45
//            E_USER_DEPRECATED
46
//        );
47
        $method = "set$property";
48
        if (method_exists($this, $method)) {
49
            return $this->$method($value);
50
        }
51
        
52
        throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this). "'");
53
    }
54
    
55
    /**
56
     * Gets a property through the getter method.
@@ 65-72 (lines=8) @@
62
     * @return mixed
63
     * @throws OutOfBoundsException
64
     */
65
    public function __get($property)
66
    {
67
//        $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
68
//        trigger_error(
69
//            sprintf(
70
//                'Accessing entity properties is deprecated. Use getter method instead. ( Tried to access "%s" on %s in %s on line %s )',
71
//                $property, get_class($this), $trace[0]['file'], $trace[0]['line']
72
//            ),
73
//            E_USER_DEPRECATED
74
//        );
75
        $method = "get$property";