Showing 889 of 1,089 total issues
Method doLists
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doLists($text) {
#
# Form HTML ordered (numbered) and unordered (bulleted) lists.
#
$less_than_tab = $this->tab_width - 1;
Smarty_CacheResource_KeyValueStore
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
{
/**
* cache for contents
* @var array
Swift_DependencyContainer
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Swift_DependencyContainer
{
/** Constant for literal value types */
const TYPE_VALUE = 0x0001;
Method compile
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
Method beforeSendPerformed
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function beforeSendPerformed(Swift_Events_SendEvent $evt)
{
$message = $evt->getMessage();
$this->_restoreMessage($message);
$to = array_keys($message->getTo());
Method yylex2
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex2()
{
$tokenMap = array (
1 => 0,
2 => 0,
Function smarty_modifier_relative_date
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function smarty_modifier_relative_date($timestamp, $days = false, $format = "M j, Y") {
if (!is_numeric($timestamp)) {
// It's not a time stamp, so try to convert it...
$timestamp = strtotime($timestamp);
- 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 processNocacheCode
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function processNocacheCode($content, $is_code)
{
// If the template is not evaluated and we have a nocache section and or a nocache tag
if ($is_code && !empty($content)) {
// generate replacement code
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter, $tag, $function)
{
if (!isset($tag[5]) || substr($tag, -5) != 'close') {
// opening tag of block plugin
// check and get attributes
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter, $tag, $method)
{
if (!isset($tag[5]) || substr($tag, -5) != 'close') {
// opening tag of block plugin
// check and get attributes
- 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 storeUptimeRobotStatus
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function storeUptimeRobotStatus() {
if ($api_keys = $this->setting->getValue('monitoring_uptimerobot_api_keys')) {
$aJSONData = array();
$url = 'https://api.uptimerobot.com';
$aMonitors = explode(',', $api_keys);
- 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 findUpstreamShare
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function findUpstreamShare($aBlock, $last=0) {
// Many use stratum, so we create our stratum check first
$version = pack("I*", sprintf('%08d', $aBlock['version']));
$previousblockhash = pack("H*", swapEndian($aBlock['previousblockhash']));
$merkleroot = pack("H*", swapEndian($aBlock['merkleroot']) );
- 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 checkHttpHeadersForMobile
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function checkHttpHeadersForMobile()
{
foreach($this->getMobileHeaders() as $mobileHeader => $matchType){
if( isset($this->httpHeaders[$mobileHeader]) ){
- 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 send
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
$failedRecipients = (array) $failedRecipients;
$command = $this->getCommand();
$buffer = $this->getBuffer();
- 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 load
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function load(Smarty $smarty, $type)
{
// try smarty's cache
if (isset($smarty->_resource_handlers[$type])) {
return $smarty->_resource_handlers[$type];
Method yylex1
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex1()
{
$tokenMap = array (
1 => 0,
2 => 0,
Method getLastBlocksbyTime
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getLastBlocksbyTime() {
$this->debug->append("STA " . __METHOD__, 4);
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
$stmt = $this->mysqli->prepare("
SELECT
Method read
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function read($length)
{
if ($this->_currentPos>=$this->_charCount) {
return false;
}
File smarty_internal_compile_block.php
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Smarty Internal Plugin Compile Block
*
Method smarty_function_html_checkboxes_output
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true)
{
$_output = '';
if (is_object($value)) {