Code Duplication    Length = 11-11 lines in 4 locations

src/Accessor/ReflectionAccessor.php 2 locations

@@ 79-89 (lines=11) @@
76
     *
77
     * @return \ReflectionProperty
78
     */
79
    private function getReflectionProperty($object, $property)
80
    {
81
        if (isset($this->properties[$key = $this->getCacheKey($object, $property)])) {
82
            return $this->properties[$key];
83
        }
84
85
        $reflection = new \ReflectionProperty($object, $property);
86
        $reflection->setAccessible(true);
87
88
        return $this->properties[$key] = $reflection;
89
    }
90
91
    /**
92
     * @param object $object
@@ 97-107 (lines=11) @@
94
     *
95
     * @return \ReflectionMethod
96
     */
97
    private function getReflectionMethod($object, $method)
98
    {
99
        if (isset($this->methods[$key = $this->getCacheKey($object, $method)])) {
100
            return $this->methods[$key];
101
        }
102
103
        $reflection = new \ReflectionMethod($object, $method);
104
        $reflection->setAccessible(true);
105
106
        return $this->methods[$key] = $reflection;
107
    }
108
109
    /**
110
     * @param object $object

src/Mutator/ReflectionMutator.php 2 locations

@@ 82-92 (lines=11) @@
79
     *
80
     * @return \ReflectionProperty
81
     */
82
    private function getReflectionProperty($object, $property)
83
    {
84
        if (isset($this->properties[$key = $this->getCacheKey($object, $property)])) {
85
            return $this->properties[$key];
86
        }
87
88
        $reflection = new \ReflectionProperty($object, $property);
89
        $reflection->setAccessible(true);
90
91
        return $this->properties[$key] = $reflection;
92
    }
93
94
    /**
95
     * @param object $object
@@ 100-110 (lines=11) @@
97
     *
98
     * @return \ReflectionMethod
99
     */
100
    private function getReflectionMethod($object, $method)
101
    {
102
        if (isset($this->methods[$key = $this->getCacheKey($object, $method)])) {
103
            return $this->methods[$key];
104
        }
105
106
        $reflection = new \ReflectionMethod($object, $method);
107
        $reflection->setAccessible(true);
108
109
        return $this->methods[$key] = $reflection;
110
    }
111
112
    /**
113
     * @param object $object