Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -29,7 +29,7 @@ class Cache_Manager {
* @since 2.1.2
* @return void
*/
public function flush_known_caches() {
public function flush_known_caches(): void {
/**
* Iterate through known caching plugins methods and flush them
@ -38,7 +38,7 @@ class Cache_Manager {
* To support more caching plugins, just add a method to this class suffixed with '_cache_flush'
*/
foreach (get_class_methods($this) as $method) {
if (substr_compare($method, '_cache_flush', -strlen('_cache_flush')) === 0) {
if (str_ends_with($method, '_cache_flush')) {
$this->$method();
}
}