<?php

namespace {
    use NitroPack\SDK\PurgeType;

    /**
     * Is TheGem delay JS active?
     *
     * @see https://themeforest.net/item/thegem-creative-multipurpose-highperformance-wordpress-theme/16061685
     * @return bool
     */
    function thegem_delay_js_active() {
        // Silence is golden.
    }

    /**
     * Raidboxes caching functions.
     *
     * @method static void getOptions()
     */
    class BunnyCDN {
        // Silence is golden.
    }

    /**
     * Raidboxes caching functions.
     *
     * @method void purge_cache()
     */
    class RaidboxesNginxCacheFunctions {
        // Silence is golden.
    }

    /**
     * NitroPack.
     *
     * @param string[]|string $url
     * @param string[]|string $tag
     * @param string $reason
     * @param string $type
     * @see https://wordpress.org/plugins/nitropack/
     */
    function nitropack_sdk_purge($url = null, $tag = null, $reason = null, $type = PurgeType::COMPLETE) {
        // Silence is golden.
    }

    /**
     * One.com caching.
     *
     * @method void purge_cache()
     */
    class VCachingOC {
        // Silence is golden.
    }

    /**
     * Themify cache.
     *
     * @see https://themify.me/
     */
    class TFCache {
        /**
         * remove cache after some updates
         *
         * @param string $item_id
         * @param string $type
         * @param int $blog_id
         * @return boolean
         */
        public static function remove_cache($item_id = 'blog', $type = false, $blog_id = false) {
            // Silence is golden.
        }
    }

    /**
     * Merge + Minify + Refresh.
     *
     * @see https://wordpress.org/plugins/merge-minify-refresh/
     */
    class MergeMinifyRefresh {}

    /**
     * SG Optimize clear cache.
     *
     * @see https://wordpress.org/plugins/sg-cachepress/
     */
    function sg_cachepress_purge_cache() {
        // Silence is golden.
    }

    /**
     * Swift Performance class.
     *
     * @see https://wordpress.org/plugins/swift-performance-lite/
     * @method static void clear_all_cache()
     */
    class Swift_Performance_Cache {}

    /**
     * Swift Performance AI (v3).
     *
     * @see https://swiftperformance.io/
     * @method static void invalidate_object($url = NULL, $status = -4)
     */
    class Swift3_Cache {}

    /**
     * Breeze admin class.
     *
     * @see https://wordpress.org/plugins/breeze/
     * @method void breeze_clear_all_cache()
     */
    class Breeze_Admin {}

    /**
     * Comet Cache helper class.
     *
     * @see https://wordpress.org/plugins/comet-cache/
     * @method static void clear()
     */
    // phpcs:disable
    class comet_cache {}
    // phpcs:enable

    /**
     * WP Optimize.
     *
     * @see https://wordpress.org/plugins/wp-optimize/
     */
    class WP_Optimize {
        /**
         * Returns instance if WPO_Page_Cache class.
         *
         * @return WPO_Page_Cache
         */
        public function get_page_cache() {
            // Silence is golden.
        }
    }

    /**
     * WP Optimize instance.
     *
     * @return WP_Optimize
     */
    function WP_Optimize() {
        // Silence is golden.
    }

    //
    class WPO_Page_Cache {
        /**
         * Purges the cache
         *
         * @return bool - true on success, false otherwise
         */
        public function purge() {
            // Silence is golden.
        }
    }

    /**
     * Autoptimize cache plugin.
     *
     * @see https://wordpress.org/plugins/autoptimize/
     */
    // phpcs:disable
    class autoptimizeCache {
        public static function clearAll() {}
    }
    // phpcs:enable

    /**
     * Clean cache of WP Super Cache plugin.
     *
     * @see https://wordpress.org/plugins/wp-super-cache/
     */
    function wp_cache_clean_cache() {
        // Silence is golden.
    }

    /**
     * Clean cache of W3 Total Cache.
     *
     * @see https://wordpress.org/plugins/w3-total-cache/
     */
    function w3tc_pgcache_flush() {
        // Silence is golden.
    }

    /**
     * Clear WP Rocket cache.
     *
     * @see https://docs.wp-rocket.me/article/92-rocketcleandomain
     */
    function rocket_clean_domain() {
        // Silence is golden.
    }

    /**
     * Clear WP Fastest Cache cache.
     *
     * @see https://wordpress.org/plugins/wp-fastest-cache/
     */
    function wpfc_clear_all_cache() {
        // Silence is golden.
    }

    /**
     * Get super cache directory
     *
     * @see https://wordpress.org/plugins/wp-super-cache/
     * @return string
     */
    function get_supercache_dir() {
        // Silence is golden.
    }
}

namespace LiteSpeed {
    /**
     * See LiteSpeedCacheImpl.php.
     *
     * @method static void purge_all(string $reason)
     */
    class Purge {}
}

namespace Hummingbird {
    /**
     * Hummingbird.
     *
     * @see https://wordpress.org/plugins/hummingbird-performance/
     */
    class WP_Hummingbird {}
}

namespace Borlabs\Cache\Frontend {
    /**
     * Borlabs Cache.
     *
     * @see @see https://de.borlabs.io/borlabs-cache/
     */
    class Garbage {
        /**
         * Get singleton instance.
         *
         * @return mixed
         */
        public static function getInstance() {
            // Silence is golden.
        }
    }
}

namespace NitroPack\SDK {
    /**
     * NitroPack.
     *
     * @see https://wordpress.org/plugins/nitropack/
     */
    class PurgeType {
        const COMPLETE = 0x1;
        const INVALIDATE = 0x2;
        const PAGECACHE_ONLY = 0x4;
    }
}

namespace Ionos\Performance {
    /**
     * Manager class.
     */
    class Manager {
        /**
         * Flush total cache
         *
         * @param  bool $clear_all_methods  Flush all caching methods (default: FALSE).
         *
         * @since   0.1
         * @change  2.0
         * @change  2.4.0 Do not flush cache for post revisions.
         */
        public static function flush_total_cache($clear_all_methods = false) {
            // Silence is golden.
        }
    }
}

namespace Ionos\Performance\Caching {
    /**
     * Class for HDD based caching.
     *
     * @since 2.0.0
     */
    class Caching {
        /**
         * Flushes total cache.
         *
         * @since 1.0.0
         * @since 2.0.0 Removed param to clear cache for all methods.
         */
        public static function flush_total_cache() {
            // Silence is golden.
        }
    }
}

namespace WpAssetCleanUp\OptimiseAssets {
    /**
     * Class OptimizeCommon.
     */
    class OptimizeCommon {
        /**
         * Clears all CSS & JS cache
         *
         * @param bool $redirectAfter
         */
        public static function clearCache($redirectAfter = false) {
            // Silence is golden.
        }
    }
}

namespace PoweredCache\Utils {
    /**
     * Flush object cache and clean cache directory
     *
     * @since 1.0
     */
    function powered_cache_flush() {
        // Silence is golden.
    }
}

namespace Perfmatters {
    /**
     * Perfmatters CSS handling.
     *
     * @see https://perfmatters.io/
     */
    class CSS {
        /**
         * Delete all files in the css cache directory.
         */
        public static function clear_used_css() {
            // Silence is golden.
        }
    }
}

namespace OPDashboard {
    /**
     * Clear all OP cache
     *
     * @return void
     */
    function clear_all_cache() {
        // Silence is golden.
    }
}

namespace FlyingPress {
    /**
     * FlyingPress purge class.
     *
     * @see https://flyingpress.com/
     * @method static void purge_everything()
     */
    class Purge {
        // Silence is golden.
    }
}

namespace seraph_accel {
    class API {
        const CACHE_OP_REVALIDATE = 0;
        const CACHE_OP_CHECK_REVALIDATE = 3;
        const CACHE_OP_CLEAR = 1;
        const CACHE_OP_DEL = 2;
        const CACHE_OP_SRVDEL = 10;

        /**
         * Operate cache.
         *
         * @param int $op
         * @param string $obj
         * @param string $viewId
         * @param string $userId
         * @param string $geoId
         * @param string $langId
         * @return boolean
         */
        public static function OperateCache(
            $op = API::CACHE_OP_DEL,
            $obj = null,
            $viewId = null,
            $userId = null,
            $geoId = null,
            $langId = null,
        ) {
            // Silence is golden.
        }
    }
}
