@@ -37,10 +37,10 @@ |
||
| 37 | 37 | |
| 38 | 38 | foreach ($controllerFiles as $oneController) { |
| 39 | 39 | |
| 40 | - if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController) && $oneController != '..' && $oneController != '.') { |
|
| 40 | + if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/'.$oneController) && $oneController != '..' && $oneController != '.') { |
|
| 41 | 41 | |
| 42 | 42 | $unitTest = new \PHPUnit_TextUI_Command; |
| 43 | - $unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController]); |
|
| 43 | + $unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/'.$oneController]); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | * |
| 15 | 15 | * new version with SPL to have the capacity to add external autoload |
| 16 | 16 | */ |
| 17 | -spl_autoload_register(function (string $sClassName) |
|
| 17 | +spl_autoload_register(function(string $sClassName) |
|
| 18 | 18 | { |
| 19 | 19 | |
| 20 | 20 | $sClassName = ltrim($sClassName, '\\'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $sNamespace = substr($sClassName, 0, $iLastNsPos); |
| 28 | 28 | $sClassName = substr($sClassName, $iLastNsPos + 1); |
| 29 | - $sFileName = str_replace('\\', DIRECTORY_SEPARATOR, $sNamespace).DIRECTORY_SEPARATOR; |
|
| 29 | + $sFileName = str_replace('\\', DIRECTORY_SEPARATOR, $sNamespace).DIRECTORY_SEPARATOR; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $sFileName = str_replace('/', '\\', $sFileName); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @param int $iTimeout expiration of cache |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
| 64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
| 65 | 65 | { |
| 66 | 66 | return parent::get($sName); |
| 67 | 67 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @param int $iTimeout expiration of cache |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
| 64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
| 65 | 65 | { |
| 66 | 66 | return parent::get($sName); |
| 67 | 67 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @param int $iTimeout expiration of cache |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
| 64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
| 65 | 65 | { |
| 66 | 66 | return parent::get($sName); |
| 67 | 67 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @param int $iTimeout expiration of cache |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
| 64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
| 65 | 65 | { |
| 66 | 66 | return parent::get($sName); |
| 67 | 67 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | error_reporting($iLevel); |
| 153 | 153 | |
| 154 | - set_error_handler(function ($iErrNo, $sErrStr, $sErrFile, $iErrLine) |
|
| 154 | + set_error_handler(function($iErrNo, $sErrStr, $sErrFile, $iErrLine) |
|
| 155 | 155 | { |
| 156 | 156 | $aContext = array('file' => $sErrFile, 'line' => $iErrLine); |
| 157 | 157 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | self::_initLogFile(); |
| 217 | 217 | self::$_bActivateException = true; |
| 218 | 218 | |
| 219 | - set_exception_handler(function (\Exception $oException) |
|
| 219 | + set_exception_handler(function(\Exception $oException) |
|
| 220 | 220 | { |
| 221 | 221 | $aContext = array('file' => $oException->getFile(), 'line' => $oException->getLine()); |
| 222 | 222 | self::getInstance()->critical($oException->getMessage(), $aContext); |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | else { |
| 413 | 413 | |
| 414 | 414 | if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) { |
| 415 | - error_log(Bash::setColor('############### ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ' ###############', 'cyan')); |
|
| 415 | + error_log(Bash::setColor('############### '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].' ###############', 'cyan')); |
|
| 416 | 416 | } |
| 417 | 417 | } |
| 418 | 418 | } |
@@ -148,6 +148,6 @@ |
||
| 148 | 148 | */ |
| 149 | 149 | private static function _applyCode(string $sContent, string $sCode) : string |
| 150 | 150 | { |
| 151 | - return "\033[" . $sCode . "m" . $sContent . "\033[0m\n"; |
|
| 151 | + return "\033[".$sCode."m".$sContent."\033[0m\n"; |
|
| 152 | 152 | } |
| 153 | 153 | } |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public static function object_to_array($mObject) : array |
| 37 | 37 | { |
| 38 | - if ( is_object($mObject)) { |
|
| 38 | + if (is_object($mObject)) { |
|
| 39 | 39 | |
| 40 | - $mObject = (array) $mObject; |
|
| 40 | + $mObject = (array)$mObject; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $aNew = array(); |
| 47 | 47 | |
| 48 | - foreach($mObject as $sKey => $mValues) { |
|
| 48 | + foreach ($mObject as $sKey => $mValues) { |
|
| 49 | 49 | |
| 50 | 50 | $sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey); |
| 51 | 51 | $aNew[$sKey] = self::object_to_array($mValues); |