- application/core/* -> CS compliant

- application/libraries/* -> CS compliant
- FHC_Model isEntitled method now return error() or success()
- Updated all code that uses isEntitled method from FHC_Model
- Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset
- Removed depracated method replace from DB_Model
- Removed unused method pgArrayPhp from DB_Model
- Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private
- Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
This commit is contained in:
Paolo
2017-08-22 16:24:51 +02:00
parent 36ab348951
commit d8cd786079
35 changed files with 672 additions and 768 deletions
+14 -10
View File
@@ -17,24 +17,25 @@ class LogLib
const LINE_SEPARATOR = ':';
/**
* Object initialization
* format
*/
public function __construct() {}
private function format($class, $function, $line)
{
$formatted = LogLib::CALLER_PREFIX;
if (!is_null($class) && $class != '')
{
$formatted .= $class . LogLib::CLASS_POSTFIX;
$formatted .= $class.LogLib::CLASS_POSTFIX;
}
$formatted .= $function . LogLib::LINE_SEPARATOR . $line . LogLib::CALLER_POSTFIX . ' ';
$formatted .= $function.LogLib::LINE_SEPARATOR.$line.LogLib::CALLER_POSTFIX.' ';
return $formatted;
}
/**
* getCaller
*/
private function getCaller()
{
$classIndex = 3;
@@ -62,13 +63,16 @@ class LogLib
return $this->format($class, $function, $line);
}
/**
* log
*/
private function log($level, $message)
{
log_message($level, $this->getCaller() . $message);
log_message($level, $this->getCaller().$message);
}
/**
*
* logDebug
*/
public function logDebug($message)
{
@@ -76,7 +80,7 @@ class LogLib
}
/**
*
* logInfo
*/
public function logInfo($message)
{
@@ -84,10 +88,10 @@ class LogLib
}
/**
*
* logError
*/
public function logError($message)
{
$this->log(LogLib::ERROR, $message);
}
}
}