env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_SERVER. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
unregister_globals accesses the super-global variable $GLOBALS. Open
function unregister_globals()
{
$args = func_get_args();
foreach($args as $k => $v)
if(array_key_exists($k, $GLOBALS)) unset($GLOBALS[$k]);
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_REQUEST. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_SERVER. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_ENV. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_SERVER. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
unregister_globals accesses the super-global variable $GLOBALS. Open
function unregister_globals()
{
$args = func_get_args();
foreach($args as $k => $v)
if(array_key_exists($k, $GLOBALS)) unset($GLOBALS[$k]);
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_SESSION. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_POST. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_FILES. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_COOKIE. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_POST. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $_POST. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
env accesses the super-global variable $GLOBALS. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
flash_now accesses the super-global variable $_SESSION. Open
function flash_now($name = null, $value = null)
{
static $messages = null;
if(is_null($messages))
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
http_response_status_code accesses the super-global variable $_SERVER. Open
function http_response_status_code($num)
{
$protocole = empty($_SERVER["SERVER_PROTOCOL"]) ? "HTTP/1.1" : $_SERVER["SERVER_PROTOCOL"];
if($str = http_response_status($num)) return "$protocole $num $str";
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
flash_sweep accesses the super-global variable $_SESSION. Open
function flash_sweep()
{
if(defined('SID'))
{
$fkey = LIM_SESSION_FLASH_KEY;
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
flash_now accesses the super-global variable $_SESSION. Open
function flash_now($name = null, $value = null)
{
static $messages = null;
if(is_null($messages))
{
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
http_response_status_code accesses the super-global variable $_SERVER. Open
function http_response_status_code($num)
{
$protocole = empty($_SERVER["SERVER_PROTOCOL"]) ? "HTTP/1.1" : $_SERVER["SERVER_PROTOCOL"];
if($str = http_response_status($num)) return "$protocole $num $str";
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
File limonade.php
has 1635 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
# ============================================================================ #
/**
Function request_uri
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function route_build
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method mime_type
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mime_type($ext = null)
{
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
Function run
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function env
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
Method request_uri
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
Method route_build
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
Function render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function error_handler_dispatcher
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function url_for
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function route_find
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method http_response_status
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function http_response_status($num = null)
{
$status = array(
100 => 'Continue',
101 => 'Switching Protocols',
Method env
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
Method render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
Method url_for
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
Method error_handler_dispatcher
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
Function stop_and_exit
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function stop_and_exit($exit = true)
{
call_if_exists('before_exit', $exit);
$headers = headers_list();
if(request_is_head())
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method route_find
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
Function array_replace
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function array_replace( array &$array, array &$array1 )
{
$args = func_get_args();
$count = func_num_args();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function redirect_to
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function redirect_to($params)
{
# [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to ยป Location:
# including the scheme, hostname and absolute path, but some clients accept
# relative URIs. You can usually use $_SERVER['HTTP_HOST'],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function flash_now
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function flash_now($name = null, $value = null)
{
static $messages = null;
if(is_null($messages))
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function route
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function route()
{
static $routes = array();
$nargs = func_num_args();
if( $nargs > 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function debug
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function debug($var, $output_as_html = true)
{
if ( is_null($var) ) { return '<span class="null-value">[NULL]</span>'; };
$out = '';
switch ($var)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function halt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function halt($errno = SERVER_ERROR, $msg = '', $debug_args = null)
{
$args = func_get_args();
$error = array_shift($args);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function http_ua_accepts
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function http_ua_accepts($type, $env = null)
{
if(is_null($env)) $env = env();
$accept = array_key_exists('HTTP_ACCEPT', $env['SERVER']) ? $env['SERVER']['HTTP_ACCEPT'] : null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function file_mime_content_type
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function file_mime_content_type($filename)
{
$ext = file_extension($filename); /* strtolower isn't necessary */
if($mime = mime_type($ext)) return $mime;
elseif (function_exists('finfo_open'))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function file_list_dir
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function file_list_dir($dir)
{
$files = array();
if ($handle = opendir($dir))
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function params
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function params($name_or_array_or_null = null, $value = null)
{
static $params = array();
$args = func_get_args();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return $messages;
Avoid too many return
statements within this method. Open
return $messages;
Function flash
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function flash($name = null, $value = null)
{
if(!defined('SID')) trigger_error("Flash messages can't be used because session isn't enabled", E_USER_WARNING);
static $messages = array();
$args = func_get_args();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function file_read_chunked
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function file_read_chunked($filename, $retbytes = true)
{
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$cnt = 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function request_uri() has an NPath complexity of 918. The configured NPath complexity threshold is 200. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function run() has 122 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Exclude checks
The function run() has an NPath complexity of 16704. The configured NPath complexity threshold is 200. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function mime_type() has 169 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function mime_type($ext = null)
{
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
- Exclude checks
The function route_build() has an NPath complexity of 356. The configured NPath complexity threshold is 200. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function render() has an NPath complexity of 480. The configured NPath complexity threshold is 200. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function url_for() has an NPath complexity of 208. The configured NPath complexity threshold is 200. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function run() has a Cyclomatic Complexity of 19. The configured cyclomatic complexity threshold is 10. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function route_build() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function env() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function request_uri() has a Cyclomatic Complexity of 26. The configured cyclomatic complexity threshold is 10. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function error_handler_dispatcher() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function render() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function url_for() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method error_layout has a boolean flag argument $layout, which is a certain sign of a Single Responsibility Principle violation. Open
function error_layout($layout = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method error_notice has a boolean flag argument $errno, which is a certain sign of a Single Responsibility Principle violation. Open
function error_notice($errno = false, $errstr = null, $errfile = null, $errline = null)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Remove error control operator '@' on line 1039. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method stop_and_exit has a boolean flag argument $exit, which is a certain sign of a Single Responsibility Principle violation. Open
function stop_and_exit($exit = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Remove error control operator '@' on line 1040. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method file_read has a boolean flag argument $return, which is a certain sign of a Single Responsibility Principle violation. Open
function file_read($filename, $return = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method send_header has a boolean flag argument $code, which is a certain sign of a Single Responsibility Principle violation. Open
function send_header($header = null, $replace = true, $code = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method require_once_dir has a boolean flag argument $prevents_output, which is a certain sign of a Single Responsibility Principle violation. Open
function require_once_dir($path, $pattern = "*.php", $prevents_output = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method file_read_chunked has a boolean flag argument $retbytes, which is a certain sign of a Single Responsibility Principle violation. Open
function file_read_chunked($filename, $retbytes = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method send_header has a boolean flag argument $replace, which is a certain sign of a Single Responsibility Principle violation. Open
function send_header($header = null, $replace = true, $code = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method render_file has a boolean flag argument $return, which is a certain sign of a Single Responsibility Principle violation. Open
function render_file($filename, $return = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Duplicated array key atom, first declared at line 2294. Open
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
- Read upRead up
- Exclude checks
DuplicatedArrayKey
Defining another value for the same key in an array literal overrides the previous key/value, which makes it effectively an unused code. If it's known from the beginning that the key will have different value, there is usually no point in defining first one.
Example
function createArray() {
return [
'non-associative 0element', // not applied
0 => 'associative 0-element', // applied
false => 'associative 0-element', // applied
'foo' => 'bar', // not applied
"foo" => 'baz', // applied
];
}
Source http://phpmd.org/rules/cleancode.html#duplicatedarraykey
The method debug has a boolean flag argument $output_as_html, which is a certain sign of a Single Responsibility Principle violation. Open
function debug($var, $output_as_html = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid assigning values to variables in if clauses and the like (line '369', column '6'). Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method error_handler_dispatcher uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
# Other errors will stop application
static $handlers = array();
if(empty($handlers))
{
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method request_uri uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
$app_file = app_file();
$path_info = isset($env['SERVER']['PATH_INFO']) ? $env['SERVER']['PATH_INFO'] : @getenv('PATH_INFO');
$query_string = isset($env['SERVER']['QUERY_STRING']) ? $env['SERVER']['QUERY_STRING'] : @getenv('QUERY_STRING');
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '401', column '6'). Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method env uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
parse_str(file_get_contents('php://input'), $GLOBALS[$varname]);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '409', column '8'). Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method stop_and_exit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$flash_sweep = true;
foreach($headers as $header)
{
// If a Content-Type header exists, flash_sweep only if is text/html
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '2469', column '10'). Open
function file_mime_content_type($filename)
{
$ext = file_extension($filename); /* strtolower isn't necessary */
if($mime = mime_type($ext)) return $mime;
elseif (function_exists('finfo_open'))
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method array_replace uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
trigger_error(
__FUNCTION__ . '(): Argument #' . ($i+1) . ' is not an array',
E_USER_WARNING
);
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method route_build uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
$path = $path_or_array;
$names = array();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method route_build uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
$parsed = array();
$elts = explode('/', $path);
$parameters_count = 0;
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method route_build uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else:
$parsed[] = "/".preg_quote($elt, "#");
endif;
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '2593', column '7'). Open
function file_list_dir($dir)
{
$files = array();
if ($handle = opendir($dir))
{
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method render uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
if(substr_count($content_or_func, '%') !== count($vars)) $content = $content_or_func;
else $content = vsprintf($content_or_func, $vars);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method route uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
{
$method = $args[0];
$path_or_array = $args[1];
$func = $args[2];
$options = $nargs > 3 ? $args[3] : array();
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '2554', column '6'). Open
function file_is_text($filename)
{
if($mime = file_mime_content_type($filename)) return substr($mime,0,5) == "text/";
return null;
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '2464', column '6'). Open
function file_mime_content_type($filename)
{
$ext = file_extension($filename); /* strtolower isn't necessary */
if($mime = mime_type($ext)) return $mime;
elseif (function_exists('finfo_open'))
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '2467', column '8'). Open
function file_mime_content_type($filename)
{
$ext = file_extension($filename); /* strtolower isn't necessary */
if($mime = mime_type($ext)) return $mime;
elseif (function_exists('finfo_open'))
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '2234', column '6'). Open
function http_response_status_code($num)
{
$protocole = empty($_SERVER["SERVER_PROTOCOL"]) ? "HTTP/1.1" : $_SERVER["SERVER_PROTOCOL"];
if($str = http_response_status($num)) return "$protocole $num $str";
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The function stop_and_exit() contains an exit expression. Open
if($exit) exit;
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function error_handler_dispatcher() contains an exit expression. Open
exit;
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused parameters such as '$errno'. Open
function not_found($errno, $errstr, $errfile=null, $errline=null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$callback'. Open
function autoload_controller($callback)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$error'. Open
$error = array_shift($args);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$v'. Open
foreach($args as $k => $v)
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$errline'. Open
function not_found($errno, $errstr, $errfile=null, $errline=null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$errfile'. Open
function not_found($errno, $errstr, $errfile=null, $errline=null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The function redirect_to() contains an exit expression. Open
exit;
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$options'. Open
$options = array( "options" => array("regexp" => $regexp ));
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
TODO found Open
# TODO cleanup / refactoring
- Exclude checks
TODO found Open
# TODO implements X-SENDFILE headers
- Exclude checks
TODO found Open
# TODO make absolute uri
- Exclude checks
Avoid excessively long variable names like $name_or_array_or_null. Keep variable name length under 20. Open
function params($name_or_array_or_null = null, $value = null)
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $path_as_no_question_mark. Keep variable name length under 20. Open
$path_as_no_question_mark = strpos($path, '?') === false;
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $no_slash_asterisk_subpattern. Keep variable name length under 20. Open
$no_slash_asterisk_subpattern = "(?:([^\/]*))?";
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $single_asterisk_subpattern. Keep variable name length under 20. Open
$single_asterisk_subpattern = "(?:/([^\/]*))?";
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $optionnal_slash_subpattern. Keep variable name length under 20. Open
$optionnal_slash_subpattern = "(?:/*?)";
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $double_asterisk_subpattern. Keep variable name length under 20. Open
$double_asterisk_subpattern = "(?:/(.*))?";
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid using short method names like ::js(). The configured minimum method name length is 3. Open
function js($content_or_func, $layout = '', $locals = array())
{
send_header('Content-Type: application/javascript; charset='.strtolower(option('encoding')));
$args = func_get_args();
return call_user_func_array('render', $args);
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
Avoid using short method names like ::h(). The configured minimum method name length is 3. Open
function h($str, $quote_style = ENT_NOQUOTES, $charset = null)
{
if(is_null($charset)) $charset = strtoupper(option('encoding'));
return htmlspecialchars($str, $quote_style, $charset);
}
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
Avoid using short method names like ::v(). The configured minimum method name length is 3. Open
function v($value, $default)
{
return value_or_default($value, $default);
}
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
The parameter $request_uri is not named in camelCase. Open
function route_missing($request_method, $request_uri)
{
halt(NOT_FOUND, "($request_method) $request_uri");
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $m. Configured minimum length is 3. Open
function request_method_is_allowed($m = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $path_or_array is not named in camelCase. Open
function dispatch_get($path_or_array, $callback, $options = array())
{
route("GET", $path_or_array, $callback, $options);
route("HEAD", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $k. Configured minimum length is 3. Open
list($k, $v) = explode('=', $param);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $e. Configured minimum length is 3. Open
$e = is_array($handler['errno']) ? $handler['errno'] : array($handler['errno']);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $debug_args is not named in camelCase. Open
function halt($errno = SERVER_ERROR, $msg = '', $debug_args = null)
{
$args = func_get_args();
$error = array_shift($args);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $o. Configured minimum length is 3. Open
$o = render('_notices.html.php', null, array('notices' => $notices));
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $path_or_array is not named in camelCase. Open
function dispatch_post($path_or_array, $callback, $options = array())
{
route("POST", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $m. Configured minimum length is 3. Open
$m = array_key_exists('REQUEST_METHOD', $env['SERVER']) ? $env['SERVER']['REQUEST_METHOD'] : null;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $path_or_array is not named in camelCase. Open
function dispatch_delete($path_or_array, $callback, $options = array())
{
route("DELETE", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $name_or_array_or_null is not named in camelCase. Open
function params($name_or_array_or_null = null, $value = null)
{
static $params = array();
$args = func_get_args();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $request_method is not named in camelCase. Open
function route_missing($request_method, $request_uri)
{
halt(NOT_FOUND, "($request_method) $request_uri");
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $ee. Configured minimum length is 3. Open
while($ee = array_shift($e))
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $rm. Configured minimum length is 3. Open
if($rm = request_method($env))
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $v. Configured minimum length is 3. Open
list($k, $v) = explode('=', $param);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $path_or_array is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $path_or_array is not named in camelCase. Open
function dispatch($path_or_array, $callback, $options = array())
{
dispatch_get($path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $path_or_array is not named in camelCase. Open
function dispatch_put($path_or_array, $callback, $options = array())
{
route("PUT", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $content_or_func is not named in camelCase. Open
function css($content_or_func, $layout = '', $locals = array())
{
send_header('Content-Type: text/css; charset='.strtolower(option('encoding')));
$args = func_get_args();
return call_user_func_array('render', $args);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $quote_style is not named in camelCase. Open
function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
return limonade_htmlspecialchars_decode($string, $quote_style);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $content_or_func is not named in camelCase. Open
function html($content_or_func, $layout = '', $locals = array())
{
send_header('Content-Type: text/html; charset='.strtolower(option('encoding')));
$args = func_get_args();
return call_user_func_array('render', $args);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $path_or_array is not named in camelCase. Open
function dispatch_patch($path_or_array, $callback, $options = array())
{
route("PATCH", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $content_or_func is not named in camelCase. Open
function txt($content_or_func, $layout = '', $locals = array())
{
send_header('Content-Type: text/plain; charset='.strtolower(option('encoding')));
$args = func_get_args();
return call_user_func_array('render', $args);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $ds. Configured minimum length is 3. Open
$ds = '/';
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $json_option is not named in camelCase. Open
function json($data, $json_option = 0)
{
send_header('Content-Type: application/json; charset='.strtolower(option('encoding')));
return version_compare(PHP_VERSION, '5.3.0', '>=') ? json_encode($data, $json_option) : json_encode($data);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $quote_style is not named in camelCase. Open
function h($str, $quote_style = ENT_NOQUOTES, $charset = null)
{
if(is_null($charset)) $charset = strtoupper(option('encoding'));
return htmlspecialchars($str, $quote_style, $charset);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $prevents_output is not named in camelCase. Open
function require_once_dir($path, $pattern = "*.php", $prevents_output = true)
{
if($path[strlen($path) - 1] != "/") $path .= "/";
$filenames = glob($path.$pattern);
if(!is_array($filenames)) $filenames = array();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $output_as_html is not named in camelCase. Open
function debug($var, $output_as_html = true)
{
if ( is_null($var) ) { return '<span class="null-value">[NULL]</span>'; };
$out = '';
switch ($var)
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $a. Configured minimum length is 3. Open
$a = array_fill(0, $n_names - $n_matches, null);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $content_or_func is not named in camelCase. Open
function js($content_or_func, $layout = '', $locals = array())
{
send_header('Content-Type: application/javascript; charset='.strtolower(option('encoding')));
$args = func_get_args();
return call_user_func_array('render', $args);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $content_or_func is not named in camelCase. Open
function partial($content_or_func, $locals = array())
{
return render($content_or_func, null, $locals);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $quote_style is not named in camelCase. Open
function limonade_htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
$table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
if($quote_style === ENT_QUOTES)
$table['''] = $table['''] = '\'';
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $function_or_file is not named in camelCase. Open
function layout($function_or_file = null)
{
static $layout = null;
if(func_num_args() > 0) $layout = $function_or_file;
return $layout;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $p. Configured minimum length is 3. Open
$p = explode('/',$param);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $r. Configured minimum length is 3. Open
$r = http_response_status($num);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flash_sweep is not named in camelCase. Open
function stop_and_exit($exit = true)
{
call_if_exists('before_exit', $exit);
$headers = headers_list();
if(request_is_head())
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $debug_args is not named in camelCase. Open
function halt($errno = SERVER_ERROR, $msg = '', $debug_args = null)
{
$args = func_get_args();
$error = array_shift($args);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_http_err is not named in camelCase. Open
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_uri is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_get($path_or_array, $callback, $options = array())
{
route("GET", $path_or_array, $callback, $options);
route("HEAD", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flash_sweep is not named in camelCase. Open
function stop_and_exit($exit = true)
{
call_if_exists('before_exit', $exit);
$headers = headers_list();
if(request_is_head())
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $back_trace is not named in camelCase. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $back_trace is not named in camelCase. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_http_err is not named in camelCase. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $app_file is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_uri is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_put($path_or_array, $callback, $options = array())
{
route("PUT", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flash_sweep is not named in camelCase. Open
function stop_and_exit($exit = true)
{
call_if_exists('before_exit', $exit);
$headers = headers_list();
if(request_is_head())
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $glo_names is not named in camelCase. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $http_error_code is not named in camelCase. Open
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $c_view_dir is not named in camelCase. Open
function error_notices_render()
{
if(option('debug') && option('env') > ENV_PRODUCTION)
{
$notices = error_notice();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_uri is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lim_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $glo_names is not named in camelCase. Open
function env($reset = null)
{
static $env = array();
if(func_num_args() > 0)
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $debug_args is not named in camelCase. Open
function halt($errno = SERVER_ERROR, $msg = '', $debug_args = null)
{
$args = func_get_args();
$error = array_shift($args);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $http_error_code is not named in camelCase. Open
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_http_error is not named in camelCase. Open
function server_error($errno, $errstr, $errfile=null, $errline=null)
{
$is_http_error = http_response_status_is_valid($errno);
$args = compact('errno', 'errstr', 'errfile', 'errline', 'is_http_error');
option('views_dir', option('limonade_views_dir'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_uri is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_patch($path_or_array, $callback, $options = array())
{
route("PATCH", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $query_string is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_uri is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_post($path_or_array, $callback, $options = array())
{
route("POST", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_uri is not named in camelCase. Open
function route_missing($request_method, $request_uri)
{
halt(NOT_FOUND, "($request_method) $request_uri");
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $debug_backtrace is not named in camelCase. Open
function app_file()
{
static $file;
if(empty($file))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $query_string is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route()
{
static $routes = array();
$nargs = func_num_args();
if( $nargs > 0)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lim_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $o_layout is not named in camelCase. Open
function error_layout($layout = false)
{
static $o_layout = 'default_layout.php';
if($layout !== false)
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch($path_or_array, $callback, $options = array())
{
dispatch_get($path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lim_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $root_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_file is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $query_string is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parsed_sub is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_uri is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_path is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $request_method is not named in camelCase. Open
function route_missing($request_method, $request_uri)
{
halt(NOT_FOUND, "($request_method) $request_uri");
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_file is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_get($path_or_array, $callback, $options = array())
{
route("GET", $path_or_array, $callback, $options);
route("HEAD", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $double_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_file is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lim_dir is not named in camelCase. Open
function run($env = null)
{
if(is_null($env)) $env = env();
# 0. Set default configuration
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $debug_backtrace is not named in camelCase. Open
function app_file()
{
static $file;
if(empty($file))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $c_view_dir is not named in camelCase. Open
function error_notices_render()
{
if(option('debug') && option('env') > ENV_PRODUCTION)
{
$notices = error_notice();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_info is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $http_error_code is not named in camelCase. Open
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_http_err is not named in camelCase. Open
function error_handler_dispatcher($errno, $errstr, $errfile, $errline)
{
$back_trace = debug_backtrace();
while($trace = array_shift($back_trace))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_http_err is not named in camelCase. Open
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $query_string is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $query_string is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $o_layout is not named in camelCase. Open
function error_layout($layout = false)
{
static $o_layout = 'default_layout.php';
if($layout !== false)
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $app_file is not named in camelCase. Open
function request_uri($env = null)
{
static $uri = null;
if(is_null($env))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $no_slash_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sub_elt is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_matches is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $arr_comb is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lower_ext is not named in camelCase. Open
function mime_type($ext = null)
{
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $win_ds is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $single_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $single_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_first_qs_param is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parsed_sub is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_names is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $no_slash_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $view_path is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $view_path is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $single_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $double_asterisk_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_names is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $optionnal_slash_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $json_option is not named in camelCase. Open
function json($data, $json_option = 0)
{
send_header('Content-Type: application/json; charset='.strtolower(option('encoding')));
return version_compare(PHP_VERSION, '5.3.0', '>=') ? json_encode($data, $json_option) : json_encode($data);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sub_elts is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $GET_params is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_names is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $qs_separator is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_first_qs_param is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_mem_usage is not named in camelCase. Open
function benchmark()
{
$res = array( 'execution_time' => (microtime(true) - LIM_START_MICROTIME) );
if(defined('LIM_START_MEMORY'))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $view_path is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_name is not named in camelCase. Open
function content_for($name = null, $content = null)
{
static $_name = null;
if(is_null($name) && !is_null($_name))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_names is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_name is not named in camelCase. Open
function content_for($name = null, $content = null)
{
static $_name = null;
if(is_null($name) && !is_null($_name))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $quote_style is not named in camelCase. Open
function limonade_htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
$table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
if($quote_style === ENT_QUOTES)
$table['''] = $table['''] = '\'';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_name is not named in camelCase. Open
function content_for($name = null, $content = null)
{
static $_name = null;
if(is_null($name) && !is_null($_name))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $output_as_html is not named in camelCase. Open
function debug($var, $output_as_html = true)
{
if ( is_null($var) ) { return '<span class="null-value">[NULL]</span>'; };
$out = '';
switch ($var)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_matches is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $GET_params is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $type_parts is not named in camelCase. Open
function http_ua_accepts($type, $env = null)
{
if(is_null($env)) $env = env();
$accept = array_key_exists('HTTP_ACCEPT', $env['SERVER']) ? $env['SERVER']['HTTP_ACCEPT'] : null;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $win_ds is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $arr_comb is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $qs_separator is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $prevents_output is not named in camelCase. Open
function require_once_dir($path, $pattern = "*.php", $prevents_output = true)
{
if($path[strlen($path) - 1] != "/") $path .= "/";
$filenames = glob($path.$pattern);
if(!is_array($filenames)) $filenames = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $prevents_output is not named in camelCase. Open
function require_once_dir($path, $pattern = "*.php", $prevents_output = true)
{
if($path[strlen($path) - 1] != "/") $path .= "/";
$filenames = glob($path.$pattern);
if(!is_array($filenames)) $filenames = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $quote_style is not named in camelCase. Open
function limonade_htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
$table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
if($quote_style === ENT_QUOTES)
$table['''] = $table['''] = '\'';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $quote_style is not named in camelCase. Open
function h($str, $quote_style = ENT_NOQUOTES, $charset = null)
{
if(is_null($charset)) $charset = strtoupper(option('encoding'));
return htmlspecialchars($str, $quote_style, $charset);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_params is not named in camelCase. Open
function redirect_to($params)
{
# [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to ยป Location:
# including the scheme, hostname and absolute path, but some clients accept
# relative URIs. You can usually use $_SERVER['HTTP_HOST'],
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_names is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $back_trace is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sub_elt is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $infinite_loop is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function dispatch_delete($path_or_array, $callback, $options = array())
{
route("DELETE", $path_or_array, $callback, $options);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $infinite_loop is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function partial($content_or_func, $locals = array())
{
return render($content_or_func, null, $locals);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route()
{
static $routes = array();
$nargs = func_num_args();
if( $nargs > 0)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_type is not named in camelCase. Open
function render_file($filename, $return = false)
{
# TODO implements X-SENDFILE headers
// if($x-sendfile = option('x-sendfile'))
// {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_or_array is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $optionnal_slash_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_name is not named in camelCase. Open
function content_for($name = null, $content = null)
{
static $_name = null;
if(is_null($name) && !is_null($_name))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $win_ds is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_text is not named in camelCase. Open
function file_is_binary($filename)
{
$is_text = file_is_text($filename);
return is_null($is_text) ? null : !$is_text;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $view_path is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $back_trace is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $GET_params is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_as_no_question_mark is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_mem_usage is not named in camelCase. Open
function benchmark()
{
$res = array( 'execution_time' => (microtime(true) - LIM_START_MICROTIME) );
if(defined('LIM_START_MEMORY'))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_text is not named in camelCase. Open
function file_is_binary($filename)
{
$is_text = file_is_text($filename);
return is_null($is_text) ? null : !$is_text;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sub_elts is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_matches is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_uri is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $GET_params is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $path_as_no_question_mark is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_params is not named in camelCase. Open
function redirect_to($params)
{
# [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to ยป Location:
# including the scheme, hostname and absolute path, but some clients accept
# relative URIs. You can usually use $_SERVER['HTTP_HOST'],
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_matches is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parsed_sub is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $type_parts is not named in camelCase. Open
function http_ua_accepts($type, $env = null)
{
if(is_null($env)) $env = env();
$accept = array_key_exists('HTTP_ACCEPT', $env['SERVER']) ? $env['SERVER']['HTTP_ACCEPT'] : null;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $optionnal_slash_subpattern is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lower_ext is not named in camelCase. Open
function mime_type($ext = null)
{
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $infinite_loop is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_matches is not named in camelCase. Open
function route_find($method, $path)
{
$routes = route();
$method = strtoupper($method);
foreach($routes as $route)
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $GET_params is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $lower_ext is not named in camelCase. Open
function mime_type($ext = null)
{
$types = array(
'ai' => 'application/postscript',
'aif' => 'audio/x-aiff',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $view_path is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $function_or_file is not named in camelCase. Open
function layout($function_or_file = null)
{
static $layout = null;
if(func_num_args() > 0) $layout = $function_or_file;
return $layout;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_type is not named in camelCase. Open
function render_file($filename, $return = false)
{
# TODO implements X-SENDFILE headers
// if($x-sendfile = option('x-sendfile'))
// {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parameters_count is not named in camelCase. Open
function route_build($method, $path_or_array, $callback, $options = array())
{
$method = strtoupper($method);
if(!in_array($method, request_methods()))
trigger_error("'$method' request method is unkown or unavailable.", E_USER_WARNING);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $content_or_func is not named in camelCase. Open
function render($content_or_func, $layout = '', $locals = array())
{
$args = func_get_args();
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $base_uri is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_first_qs_param is not named in camelCase. Open
function url_for($params = null)
{
$paths = array();
$params = func_get_args();
$GET_params = array();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_mem_usage is not named in camelCase. Open
function benchmark()
{
$res = array( 'execution_time' => (microtime(true) - LIM_START_MICROTIME) );
if(defined('LIM_START_MEMORY'))
{
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_params is not named in camelCase. Open
function redirect_to($params)
{
# [NOTE]: (from php.net) HTTP/1.1 requires an absolute URI as argument to ยป Location:
# including the scheme, hostname and absolute path, but some clients accept
# relative URIs. You can usually use $_SERVER['HTTP_HOST'],
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $n_path is not named in camelCase. Open
function file_path($path)
{
$args = func_get_args();
$ds = '/';
$win_ds = '\\';
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_text is not named in camelCase. Open
function file_is_binary($filename)
{
$is_text = file_is_text($filename);
return is_null($is_text) ? null : !$is_text;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $quote_style is not named in camelCase. Open
function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
return limonade_htmlspecialchars_decode($string, $quote_style);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}