* @param $keyGroup Main group for the key
* @return $count Count of given group
*/
- protected final function countGenericArray ($keyGroup) {
+ protected final function countGenericArray (string $keyGroup) {
// Debug message
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
* @param $keyGroup Key group to get
* @return $array Whole generic array group
*/
- protected final function getGenericArray ($keyGroup) {
+ protected final function getGenericArray (string $keyGroup) {
// Debug message
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
* @return $translated Translated boolean value
*/
public static final function translateBooleanToYesNo (bool $boolean) {
- // Make sure it is really boolean
- assert(is_bool($boolean));
-
// "Translate" it
$translated = ($boolean === true) ? 'Y' : 'N';
* @return $streamData The compressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function compressStream ($streamData) {
+ public function compressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The decompressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function decompressStream ($streamData) {
+ public function decompressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The compressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function compressStream ($streamData) {
+ public function compressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The decompressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function decompressStream ($streamData) {
+ public function decompressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The compressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function compressStream ($streamData) {
+ public function compressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The decompressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function decompressStream ($streamData) {
+ public function decompressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The compressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function compressStream ($streamData) {
+ public function compressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @return $streamData The decompressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- public function decompressStream ($streamData) {
+ public function decompressStream (string $streamData) {
// Validate parameter
if (is_object($streamData) || is_resource($streamData)) {
// Throw an exception
* @param $amount Amount of points to store
* @return void
*/
- public final function setAmount ($amount) {
+ public final function setAmount (float $amount) {
$this->amount = (float) $amount;
}
* @return $hasRequired Whether the user has the required points
* @todo Finish loading part of points
*/
- public function ifUserHasRequiredPoints ($action) {
+ public function ifUserHasRequiredPoints (string $action) {
// Default is that everyone is poor... ;-)
$hasRequired = false;
* @param $amount Amount of points we shall book
* @return void
*/
- public function bookPointsDirectly ($amount) {
+ public function bookPointsDirectly (float $amount) {
// Rewind always
$this->getResultInstance()->rewind();
* @return $streamData The compressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- function compressStream ($streamData);
+ function compressStream (string $streamData);
/**
* A decompression stream
* @return $streamData The decompressed stream data
* @throws InvalidArgumentException If the stream is not compressable or decompressable
*/
- function decompressStream ($streamData);
+ function decompressStream (string $streamData);
/**
* Getter for the file extension of this compressor
* @param $action The action or configuration entry plus prefix the user wants to perform
* @return $hasRequired Whether the user has the required points
*/
- function ifUserHasRequiredPoints ($action);
+ function ifUserHasRequiredPoints (string $action);
/**
* "Books" the given points amount on the current user's account
* @param $amount Amount of points we shall book
* @return void
*/
- function bookPointsDirectly ($amount);
+ function bookPointsDirectly (float $amount);
}