Showing 889 of 1,089 total issues
Method yylex3
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex3()
{
$tokenMap = array (
1 => 0,
2 => 0,
Method write
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function write($chars)
{
if (!isset($this->_charReader)) {
$this->_charReader = $this->_charReaderFactory->getReaderFor(
$this->_charset);
Method appendFootnotes
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function appendFootnotes($text) {
#
# Append footnote list to text.
#
$text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}',
Method decodeProperties
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function decodeProperties($properties, $cache = false)
{
$this->has_nocache_code = $properties['has_nocache_code'];
$this->properties['nocache_hash'] = $properties['nocache_hash'];
if (isset($properties['cache_lifetime'])) {
Method isTrustedResourceDir
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function isTrustedResourceDir($filepath)
{
$_template = false;
$_config = false;
$_secure = false;
Method doTables
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doTables($text) {
#
# Form HTML tables.
#
$less_than_tab = $this->tab_width - 1;
Method smarty_function_math
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_function_math($params, $template)
{
static $_allowed_funcs = array(
'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,
Method mobileGrade
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mobileGrade()
{
$isMobile = $this->isMobile();
if (
Method __construct
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($search, $replace)
{
$this->_search = $search;
$this->_index = array();
$this->_tree = array();
Method yylex5
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex5()
{
$tokenMap = array (
1 => 0,
2 => 0,
Method yylex6
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex6()
{
$tokenMap = array (
1 => 0,
2 => 0,
Method _doTable_callback
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _doTable_callback($matches) {
$head = $matches[1];
$underline = $matches[2];
$content = $matches[3];
Function smarty_function_html_options_optoutput
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
{
if (!is_array($value)) {
$_key = smarty_function_escape_special_chars($key);
$_html_result = '<option value="' . $_key . '"';
- 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 compile
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter)
{
$_attr = $this->getAttributes($compiler, $args);
$saved_data = $this->closeTag($compiler, array('function'));
$_name = trim($saved_data[0]['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
Function _getTemplatesTreeRecursive
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function _getTemplatesTreeRecursive($path) {
if( !is_dir($path) ) {
return preg_match("/\.tpl$/", $path);
} else {
$subfiles = scandir($path);
- 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 getCurrentIP
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getCurrentIP($trustremote=false, $checkcloudflare=true, $checkclient=false, $checkforwarded=true) {
$cf = (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : false;
$client = (isset($_SERVER['HTTP_CLIENT_IP'])) ? $_SERVER['HTTP_CLIENT_IP'] : false;
$fwd = (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : false;
$remote = (isset($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : @$_SERVER['REMOTE_ADDR'];
- 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 invalidate
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
{
$now = microtime(true);
$key = null;
// invalidate everything
- 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 updateWorkers
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function updateWorkers($account_id, $data) {
$this->debug->append("STA " . __METHOD__, 4);
if (!is_array($data)) {
$this->setErrorMessage('No workers to update');
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
Function setHeaders
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function setHeaders(Swift_Mime_HeaderSet $headers)
{
$this->_headerCanonData = '';
// Loop through Headers
$listHeaders = $headers->listAll();
- 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 setHeaders
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function setHeaders(Swift_Mime_HeaderSet $headers)
{
$this->_startHash();
$this->_canonData = '';
// Loop through Headers
- 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"