Skip to content
Snippets Groups Projects
Commit 08499267 authored by Erick Hitter's avatar Erick Hitter
Browse files

Coding standards

parent cc5b79a1
Branches
No related tags found
No related merge requests found
...@@ -378,8 +378,8 @@ class WP_Object_Cache { ...@@ -378,8 +378,8 @@ class WP_Object_Cache {
// Check if conditions are right to continue // Check if conditions are right to continue
if ( if (
( $add && isset( $this->cache[$derived_key] ) ) || ( $add && isset( $this->cache[ $derived_key ] ) ) ||
( ! $add && ! isset( $this->cache[$derived_key] ) ) ( ! $add && ! isset( $this->cache[ $derived_key ] ) )
) { ) {
return false; return false;
} }
...@@ -420,8 +420,8 @@ class WP_Object_Cache { ...@@ -420,8 +420,8 @@ class WP_Object_Cache {
// Remove from no_redis_groups array // Remove from no_redis_groups array
if ( in_array( $group, $this->no_redis_groups ) || ! $this->can_redis() ) { if ( in_array( $group, $this->no_redis_groups ) || ! $this->can_redis() ) {
if ( isset( $this->cache[$derived_key] ) ) { if ( isset( $this->cache[ $derived_key ] ) ) {
unset( $this->cache[$derived_key] ); unset( $this->cache[ $derived_key ] );
return true; return true;
} else { } else {
...@@ -431,7 +431,7 @@ class WP_Object_Cache { ...@@ -431,7 +431,7 @@ class WP_Object_Cache {
$result = $this->parse_predis_response( $this->redis->del( $derived_key ) ); $result = $this->parse_predis_response( $this->redis->del( $derived_key ) );
unset( $this->cache[$derived_key] ); unset( $this->cache[ $derived_key ] );
return $result; return $result;
} }
...@@ -470,9 +470,9 @@ class WP_Object_Cache { ...@@ -470,9 +470,9 @@ class WP_Object_Cache {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
if ( in_array( $group, $this->no_redis_groups ) || ! $this->can_redis() ) { if ( in_array( $group, $this->no_redis_groups ) || ! $this->can_redis() ) {
if ( isset( $this->cache[$derived_key] ) ) { if ( isset( $this->cache[ $derived_key ] ) ) {
$this->cache_hits++; $this->cache_hits++;
return is_object( $this->cache[$derived_key] ) ? clone $this->cache[$derived_key] : $this->cache[$derived_key]; return is_object( $this->cache[ $derived_key ] ) ? clone $this->cache[ $derived_key ] : $this->cache[ $derived_key ];
} else { } else {
$this->cache_misses++; $this->cache_misses++;
return false; return false;
...@@ -680,7 +680,7 @@ class WP_Object_Cache { ...@@ -680,7 +680,7 @@ class WP_Object_Cache {
* @param mixed $value Object value. * @param mixed $value Object value.
*/ */
public function add_to_internal_cache( $derived_key, $value ) { public function add_to_internal_cache( $derived_key, $value ) {
$this->cache[$derived_key] = $value; $this->cache[ $derived_key ] = $value;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment