Showing 65 of 86 total issues
Function clearProxySettings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function clearProxySettings($wrapper = null)
{
$wrappers = isset($wrapper) ? array($wrapper) : array_keys($this->_streamContextOptions);
$clearedWrappers = 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 draw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function draw( $tpl_name, $return_string = false ){
try {
// compile the template if necessary and set the template filepath
$this->check_template( $tpl_name );
- 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 const_replace
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function const_replace( $html, $tag_left_delimiter, $tag_right_delimiter, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level = null, $echo = null ){
Method func_replace
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function func_replace( $html, $tag_left_delimiter, $tag_right_delimiter, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level = null, $echo = null ){
Method var_replace
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function var_replace( $html, $tag_left_delimiter, $tag_right_delimiter, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level = null, $echo = null ){
Avoid deeply nested control flow statements. Open
while (!feof($remote_handler)) {
$file .= fgets($remote_handler);
}
Function shouldCacheBeUpdated
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function shouldCacheBeUpdated()
{
// Load the cache at the first request
if ($this->_cacheLoaded) {
return false;
- 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 deeply nested control flow statements. Open
if (typeof q === OBJ_TYPE && q.length > 0) {
if (q.length === 2) {
if (typeof q[1] == FUNC_TYPE) {
// assign modified match
this[q[0]] = q[1].call(this, match);
Method _strlan_
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _strlan_($__string,$__strip=FALSE,$__par1=FALSE,$__par2=FALSE,$__par3=FALSE,$__par4=FALSE){
Function check_template
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function check_template( $tpl_name ){
if( !isset($this->tpl['checked']) ){
$tpl_basename = basename( $tpl_name ); // template basename
- 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 deeply nested control flow statements. Open
if($aux__bcap["Browser"]!=$par__brname){
$__agent = $par__brname;
}
Function _domains_
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _domains_($__data){
settype($__data,"array");
$__domains=array("#?"=>(array_key_exists("#?",$__data))?$__data["#?"]:0,"#!"=>(array_key_exists("#!",$__data))?$__data["#!"]:0);
unset($__data["#?"],$__data["#!"]);
- 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 deeply nested control flow statements. Open
while(count($dat__entry)>$cnf__last_entries){
ksort($dat__entry,SORT_NUMERIC);
reset($dat__entry);
unset($dat__entry[key($dat__entry)]);
}
Function _getUpdateMethod
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _getUpdateMethod()
{
// Caches the result
if ($this->updateMethod === null) {
if ($this->localFile !== 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
Method compileFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function compileFile( $tpl_basename, $tpl_basedir, $tpl_filename, $cache_dir, $compiled_filename ){
Method addProxySettings
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addProxySettings($server, $port = 3128, $wrapper = 'http', $username = null, $password = null)
Function updateCache
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function updateCache()
{
$lockfile = $this->cacheDir . 'cache.lock';
$lockRes = fopen($lockfile, 'w+');
- 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 _fcopy_
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _fcopy_($__source,$__target){
settype($__source,"string");
settype($__target,"string");
clearstatcache();
- 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 _ls_
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _ls_($__dir="./",$__pattern="*.*"){
settype($__dir,"string");
settype($__pattern,"string");
clearstatcache();
- 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 0;