Code Duplication    Length = 17-17 lines in 2 locations

components/Helpers.php 1 location

@@ 209-225 (lines=17) @@
206
     *
207
     * @since 2.0
208
     */
209
    public function clear_cache ( $data, $pod = null, $id = null, $groups = null, $post = null ) {
210
        $old_post = $id;
211
212
        if ( !is_object( $id ) )
213
            $old_post = null;
214
215
        if ( is_object( $post ) && $this->object_type != $post->post_type )
216
            return;
217
218
        if ( !is_array( $data ) && 0 < $data ) {
219
            $post = $data;
220
            $post = get_post( $post );
221
        }
222
223
        if ( $this->object_type == $post->object_type )
224
            pods_transient_clear( 'pods_object_helpers' );
225
    }
226
227
    /**
228
     * Change post title placeholder text

components/Templates/Templates.php 1 location

@@ 298-314 (lines=17) @@
295
	 * @param null $groups
296
	 * @param null $post
297
	 */
298
	public function clear_cache( $data, $pod = null, $id = null, $groups = null, $post = null ) {
299
300
		$old_post = $id;
301
302
		if ( ! is_object( $id ) ) {
303
			$old_post = null;
304
		}
305
306
		if ( is_object( $post ) && $this->object_type != $post->post_type ) {
307
			return;
308
		}
309
310
		if ( ! is_array( $data ) && 0 < $data ) {
311
			$post = $data;
312
			$post = get_post( $post );
313
		}
314
315
		if ( $this->object_type == $post->object_type ) {
316
			pods_transient_clear( 'pods_object_templates' );
317
		}