Code Duplication    Length = 10-10 lines in 4 locations

src/z1haze/Acl/Traits/UserAndLevel.php 4 locations

@@ 122-131 (lines=10) @@
119
     *
120
     * @return \Illuminate\Support\Collection
121
     */
122
    public function getPermissions()
123
    {
124
        return Cache::remember(
125
            'laravel-acl.getPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id,
126
            config('laravel-acl.cacheMinutes'),
127
            function() {
128
                return $this->cachegetPermissions();
129
            }
130
        );
131
    }
132
133
    /**
134
     * USER & LEVEL
@@ 142-151 (lines=10) @@
139
     *
140
     * @return \Illuminate\Support\Collection
141
     */
142
    public function getAllPermissions()
143
    {
144
        return Cache::remember(
145
            'laravel-acl.getAllPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id,
146
            config('laravel-acl.cacheMinutes'),
147
            function() {
148
                return $this->cacheGetAllPermissions();
149
            }
150
        );
151
    }
152
153
    /**
154
     * USER & LEVEL
@@ 162-171 (lines=10) @@
159
     *
160
     * @return \Illuminate\Support\Collection
161
     */
162
    public function getInheritedPermissions()
163
    {
164
        return Cache::remember(
165
            'laravel-acl.getInheritedPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id,
166
            config('laravel-acl.cacheMinutes'),
167
            function() {
168
                return $this->cacheGetInheritedPermissions();
169
            }
170
        );
171
    }
172
173
    /**
174
     * USER & LEVEL
@@ 182-191 (lines=10) @@
179
     *
180
     * @return \Illuminate\Support\Collection
181
     */
182
    public function getAvailablePermissions()
183
    {
184
        return Cache::remember(
185
            'laravel-acl.getAvailablePermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id,
186
            config('laravel-acl.cacheMinutes'),
187
            function() {
188
                return $this->cacheGetAvailablePermissions();
189
            }
190
        );
191
    }
192
193
    /**
194
     * USER & LEVEL