Skip to content

Commit

Permalink
Showing 2 changed files with 21 additions and 23 deletions.
8 changes: 3 additions & 5 deletions system/Common.php
Original file line number Diff line number Diff line change
@@ -199,7 +199,7 @@ function env(string $key, $default = null)
case 'empty':
return '';
case 'null':
return;
return null;
}

return $value;
@@ -488,9 +488,7 @@ function is_cli()
*/
function route_to(string $method, ...$params): string
{
$routes = Services::routes();

return $routes->reverseRoute($method, ...$params);
return Services::routes()->reverseRoute($method, ...$params);
}
}

@@ -713,7 +711,7 @@ function csrf_field()
*
* Not testable, as it will exit!
*
* @throws \CodeIgniter\HTTP\RedirectException
* @throws \CodeIgniter\HTTP\Exceptions\HTTPException
* @codeCoverageIgnore
*/
function force_https(int $duration = 31536000, RequestInterface $request = null, ResponseInterface $response = null)
36 changes: 18 additions & 18 deletions system/Log/Logger.php
Original file line number Diff line number Diff line change
@@ -146,8 +146,8 @@ class Logger implements LoggerInterface
/**
* Constructor.
*
* @param type $config
* @param boolean $debug
* @param \Config\Logger $config
* @param boolean $debug
* @throws \RuntimeException
*/
public function __construct($config, bool $debug = CI_DEBUG)
@@ -194,11 +194,11 @@ public function __construct($config, bool $debug = CI_DEBUG)
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function emergency($message, array $context = [])
{
$this->log('emergency', $message, $context);
return $this->log('emergency', $message, $context);
}

//--------------------------------------------------------------------
@@ -212,11 +212,11 @@ public function emergency($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function alert($message, array $context = [])
{
$this->log('alert', $message, $context);
return $this->log('alert', $message, $context);
}

//--------------------------------------------------------------------
@@ -229,11 +229,11 @@ public function alert($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function critical($message, array $context = [])
{
$this->log('critical', $message, $context);
return $this->log('critical', $message, $context);
}

//--------------------------------------------------------------------
@@ -245,11 +245,11 @@ public function critical($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function error($message, array $context = [])
{
$this->log('error', $message, $context);
return $this->log('error', $message, $context);
}

//--------------------------------------------------------------------
@@ -263,11 +263,11 @@ public function error($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function warning($message, array $context = [])
{
$this->log('warning', $message, $context);
return $this->log('warning', $message, $context);
}

//--------------------------------------------------------------------
@@ -278,11 +278,11 @@ public function warning($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function notice($message, array $context = [])
{
$this->log('notice', $message, $context);
return $this->log('notice', $message, $context);
}

//--------------------------------------------------------------------
@@ -295,11 +295,11 @@ public function notice($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function info($message, array $context = [])
{
$this->log('info', $message, $context);
return $this->log('info', $message, $context);
}

//--------------------------------------------------------------------
@@ -310,11 +310,11 @@ public function info($message, array $context = [])
* @param string $message
* @param array $context
*
* @return null
* @return boolean
*/
public function debug($message, array $context = [])
{
$this->log('debug', $message, $context);
return $this->log('debug', $message, $context);
}

//--------------------------------------------------------------------

0 comments on commit 40ec26b

Please sign in to comment.