Showing 889 of 1,089 total issues
Method createTemplateCodeFrame
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTemplateCodeFrame($content = '', $cache = false)
{
$plugins_string = '';
// include code for plugins
if (!$cache) {
Method compile
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// save possible attributes
Method getTransactions
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTransactions($start=0, $filter=NULL, $limit=30, $account_id=NULL) {
$this->debug->append("STA " . __METHOD__, 4);
$sql = "
SELECT
t.id AS id,
Smarty_Internal_TemplateBase
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
{
/**
* fetches a rendered Smarty template
*
Method send
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
$failedRecipients = (array) $failedRecipients;
if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) {
Function dateFormat
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
var dateFormat = function () {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
pad = function (val, len) {
Method compile
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
Function smarty_function_html_radios_output
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)
{
$_output = '';
if (is_object($value)) {
- 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 mutingErrorHandler
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{
$_is_muted_directory = false;
// add the SMARTY_DIR to the list of muted directories
- 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 runFilter
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static function runFilter($type, $content, Smarty_Internal_Template $template)
{
$output = $content;
// loop over autoload filters of specified type
if (!empty($template->smarty->autoload_filters[$type])) {
- 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 isTrustedResourceDir
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function isTrustedResourceDir($filepath)
{
$_template = false;
$_config = false;
$_secure = 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 getClasses
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getClasses(){
if (self::$classes === null){
$directory = new DirectoryIterator(__DIR__.'/push_notification');
foreach ($directory as $fileInfo) {
if (($fileInfo->getExtension() != 'php') || $fileInfo->isDot()) {
- 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 getAllUserStats
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getAllUserStats($filter='%',$limit=1,$start=0) {
$this->debug->append("STA " . __METHOD__, 4);
$sql = "
SELECT
a.id AS id,
- 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 streamToMime
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function streamToMime(Swift_OutputByteStream $fromStream, Swift_Message $message)
{
$bufferLength = 78;
$headerData = '';
- 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 setChildren
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function setChildren(array $children, $compoundLevel = null)
{
// TODO: Try to refactor this logic
$compoundLevel = isset($compoundLevel)
- 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
Swift_Transport_EsmtpTransport
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTransport implements Swift_Transport_SmtpAgent
{
/**
* ESMTP extension handlers.
*
Method findUpstreamShare
has 62 lines of code (exceeds 25 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']) );
Method getAllUserStats
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAllUserStats($filter='%',$limit=1,$start=0) {
$this->debug->append("STA " . __METHOD__, 4);
$sql = "
SELECT
a.id AS id,
Method yylex1
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yylex1()
{
$tokenMap = array (
1 => 0,
2 => 1,
Method init
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function init()
{
if (count(self::$_specials) > 0) {
return;
}