// Is the file writeable?
if ((isFileReadable($FQFN)) && (!is_writeable($FQFN)) && (!changeMode($FQFN, 0644))) {
// Not writeable!
- logDebugMessage(__FUNCTION__, __LINE__, sprintf("File %s not writeable or cannot change CHMOD to 0644.", basename($FQFN)));
+ logDebugMessage(__FUNCTION__, __LINE__, sprintf('File %s not writeable or cannot change CHMOD to 0644.', basename($FQFN)));
// Failed! :(
return FALSE;
reportBug(__FUNCTION__, __LINE__, 'No arrays provided!');
} elseif (!is_array($array1)) {
// Left one is not an array
- reportBug(__FUNCTION__, __LINE__, sprintf("array1 is not an array. array != %s", gettype($array1)));
+ reportBug(__FUNCTION__, __LINE__, sprintf('array1 is not an array. array != %s', gettype($array1)));
} elseif (!is_array($array2)) {
// Right one is not an array
- reportBug(__FUNCTION__, __LINE__, sprintf("array2 is not an array. array != %s", gettype($array2)));
+ reportBug(__FUNCTION__, __LINE__, sprintf('array2 is not an array. array != %s', gettype($array2)));
}
// Maintain index of array2?
// Wrapper to check if the first element to be shifted is set to given value
function shift_array (&$array, $value, $key = '0') {
// Is the element set and value matches?
- assert(is_array($array), 'array[]=' . gettype($array), ',expected: array');
- assert(isset($array[$key]), 'array[' . $key . '] not set.');
- assert(($array[$key] === $value), ',array[' . $key . ']=' . $array[$key] . ',value=' . $value);
+ assert(is_array($array));
+ assert(isset($array[$key]));
+ assert($array[$key] === $value);
// Shift it
array_shift($array);