Code Duplication    Length = 9-11 lines in 2 locations

src/ObjectFacade.php 2 locations

@@ 83-93 (lines=11) @@
80
     *
81
     * @return bool
82
     */
83
    final public function setValueByMethod(string $name, $value): bool
84
    {
85
        $method = $this->getSetterMethod($name);
86
        if ($method !== null && Validator::new($this)->validateSetterMethod($method, $value)) {
87
            $method->invoke($this->object, $value);
88
89
            return true;
90
        }
91
92
        return false;
93
    }
94
95
    /**
96
     * @param string $name
@@ 100-108 (lines=9) @@
97
     *
98
     * @return mixed|null
99
     */
100
    final public function getValueByMethod(string $name)
101
    {
102
        $method = $this->getGetterMethod($name);
103
        if ($method !== null && Validator::new($this)->validateGetterMethod($method)) {
104
            return $method->invoke($this->object);
105
        }
106
107
        return null;
108
    }
109
110
    /**
111
     * @param string $name