Code Duplication    Length = 7-7 lines in 3 locations

src/MetaDataHelper.php 3 locations

@@ 65-71 (lines=7) @@
62
     * @param string $className
63
     * @return array
64
     */
65
    public function classRules(string $className) : array
66
    {
67
        if(!isset($this->cache[$className][__FUNCTION__])) {
68
            $this->cache[$className][__FUNCTION__] = $this->prepareRules($this->classMeta($className));
69
        }
70
        return $this->cache[$className][__FUNCTION__];
71
    }
72
    
73
    /**
74
     * Metadata for methods
@@ 101-107 (lines=7) @@
98
     * @param string $className
99
     * @return array
100
     */
101
    public function methodsRules(string $className) : array
102
    {
103
        if(!isset($this->cache[$className][__FUNCTION__])) {
104
            $this->cache[$className][__FUNCTION__] = $this->prepareRulesArray($this->methodsMeta($className));
105
        }
106
        return $this->cache[$className][__FUNCTION__];
107
    }
108
    
109
    /**
110
     * Metadata for fields
@@ 137-143 (lines=7) @@
134
     * @param string $className
135
     * @return array
136
     */
137
    public function fieldsRules(string $className) : array
138
    {
139
        if(!isset($this->cache[$className][__FUNCTION__])) {
140
            $this->cache[$className][__FUNCTION__] = $this->prepareRulesArray($this->fieldsMeta($className));
141
        }
142
        return $this->cache[$className][__FUNCTION__];
143
    }
144
    
145
    protected function prepareRulesArray(array $data) : array
146
    {