\IncludesGenerate

Functions for 'Generate' script.

Summary

Methods
Properties
Constants
generateAndSaveRandomNumbers()
checkSwitchMinMax()
setTesting()
getTesting()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getMinMaxNumberSize()
$testingMode
N/A

Properties

$testingMode

$testingMode : boolean

Type

boolean — If true - print less information for eg. Travis or CircleCI to avoid big log file.

Methods

generateAndSaveRandomNumbers()

generateAndSaveRandomNumbers(integer|float  $min, integer|float  $max, integer|float  $decimalPlaces, integer  $maxFileSize, string  $filename, string  $fileExtension = '.dat', string|mixed  $delimiter = ' ') 

Generate string with randomized numbers.

Parameters

integer|float $min

Minimum allowed number to generate

integer|float $max

Maximum allowed number to generate

integer|float $decimalPlaces

Number of decimal places

integer $maxFileSize

Maximum file size in bytes

string $filename

Output filename without extension

string $fileExtension

File extension. Default is '.dat'

string|mixed $delimiter

Delimiter. Default is ' '

checkSwitchMinMax()

checkSwitchMinMax(float  $min, float  $max) : array

Switch min and max if min > max.

Parameters

float $min

Minimum

float $max

Maximum

Returns

array

setTesting()

setTesting(boolean  $value) 

Set $testingMode property value.

Parameters

boolean $value

getTesting()

getTesting() : boolean

Get $testingMode property value.

Returns

boolean

getMinMaxNumberSize()

getMinMaxNumberSize(integer|float  $min, integer|float  $max, integer|float  $decimalPlaces) : array

Switch min and max if min > max.

Parameters

integer|float $min

Minimum allowed number to generate

integer|float $max

Maximum allowed number to generate

integer|float $decimalPlaces

Number of decimal places

Returns

array