Skip to content

Commit

Permalink
pedantic cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceWonderMiscreations committed Mar 19, 2018
1 parent 1813685 commit 806131e
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 222 deletions.
8 changes: 1 addition & 7 deletions lib/SimpleCacheAPCu.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
declare(strict_types = 1);
declare(strict_types=1);

/**
* An implementation of the PSR-16 SimpleCache Interface for APCu.
Expand Down Expand Up @@ -40,7 +40,6 @@ protected function cacheFetch($realKey, $default)
return $default;
}//end cacheFetch()


/**
* A wrapper for the actual store of key => value pair in the cache.
*
Expand All @@ -56,7 +55,6 @@ protected function cacheStore($realKey, $value, $ttl): bool
return apcu_store($realKey, $value, $seconds);
}//end cacheStore()


/**
* A wrapper for the actual delete of a key => value pair in the cache.
*
Expand All @@ -69,7 +67,6 @@ protected function cacheDelete($realKey): bool
return apcu_delete($realKey);
}//end cacheDelete()


/**
* Wipes clean the entire cache's keys. This implementation only wipes for matching
* webappPrefix (custom NON PSR-16 feature set during constructor).
Expand Down Expand Up @@ -105,7 +102,6 @@ public function clear(): bool
return false;
}//end clear()


/**
* Wipes clean the entire cache's keys regardless of webappPrefix.
*
Expand All @@ -123,7 +119,6 @@ public function clearAll(): bool
return $return;
}//end clearAll()


/**
* Determines whether an item is present in the cache.
*
Expand All @@ -145,7 +140,6 @@ public function has($key): bool
return false;
}//end has()


/**
* Class constructor function. Takes three arguments with defaults.
*
Expand Down
10 changes: 1 addition & 9 deletions lib/SimpleCacheAPCuSodium.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
declare(strict_types = 1);
declare(strict_types=1);

/**
* An implementation of the PSR-16 SimpleCache Interface for APCu that uses AEAD
Expand Down Expand Up @@ -42,7 +42,6 @@ protected function cacheFetch($realKey, $default)
return $default;
}//end cacheFetch()


/**
* A wrapper for the actual store of key => value pair in the cache.
*
Expand Down Expand Up @@ -70,7 +69,6 @@ protected function cacheStore($realKey, $value, $ttl): bool
return apcu_store($realKey, $obj, $seconds);
}//end cacheStore()


/**
* A wrapper for the actual delete of a key => value pair in the cache.
*
Expand All @@ -82,7 +80,6 @@ protected function cacheDelete($realKey): bool
{
return apcu_delete($realKey);
}//end cacheDelete()


/**
* Wipes clean the entire cache's keys. This implementation only wipes for matching
Expand Down Expand Up @@ -119,7 +116,6 @@ public function clear(): bool
return false;
}//end clear()


/**
* Wipes clean the entire cache's keys regardless of webappPrefix.
*
Expand All @@ -137,7 +133,6 @@ public function clearAll(): bool
return $return;
}//end clearAll()


/**
* Determines whether an item is present in the cache.
*
Expand All @@ -159,7 +154,6 @@ public function has($key): bool
return false;
}//end has()


/**
* Zeros and then removes the cryptokey from a var_dump of the object.
* Also removes nonce from var_dump.
Expand All @@ -175,7 +169,6 @@ public function __debugInfo()
return $result;
}//end __debugInfo()


/**
* Zeros the cryptokey property on class destruction.
*
Expand All @@ -186,7 +179,6 @@ public function __destruct()
sodium_memzero($this->cryptokey);
}//end __destruct()


/**
* The class constructor function
*
Expand Down
Loading

0 comments on commit 806131e

Please sign in to comment.