Code Duplication    Length = 10-10 lines in 4 locations

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

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