Code Duplication    Length = 8-8 lines in 2 locations

src/Tests/Bind.php 2 locations

@@ 14-21 (lines=8) @@
11
     *
12
     * @return mixed
13
     */
14
    public static function getProperty($object, $attr)
15
    {
16
        $closure = \Closure::bind(function () use ($attr) {
17
            return $this->$attr;
18
        }, $object, \get_class($object));
19
20
        return $closure();
21
    }
22
23
    /**
24
     * @param object $object
@@ 30-37 (lines=8) @@
27
     *
28
     * @return mixed
29
     */
30
    public static function setProperty($object, $attr, $value)
31
    {
32
        $closure = \Closure::bind(function ($value) use ($attr) {
33
            $this->$attr = $value;
34
        }, $object, \get_class($object));
35
36
        return $closure($value);
37
    }
38
39
}
40