Showing 889 of 1,089 total issues
Method _establishSocketConnection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _establishSocketConnection()
{
$host = $this->_params['host'];
if (!empty($this->_params['protocol'])) {
$host = $this->_params['protocol'] . '://' . $host;
Method run_102
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function run_102() {
// Ugly but haven't found a better way
global $setting, $config, $coin_address, $user, $mysqli;
// Version information
Method smarty_modifier_truncate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false)
{
if ($length == 0)
return '';
Method isTrustedPHPDir
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function isTrustedPHPDir($filepath)
{
if (empty($this->trusted_dir)) {
throw new SmartyException("directory '{$filepath}' not allowed by security setting (no trusted_dir specified)");
}
Method get_debug_vars
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function get_debug_vars($obj)
{
$config_vars = $obj->config_vars;
$tpl_vars = array();
foreach ($obj->tpl_vars as $key => $var) {
Method populateCompiledFilepath
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
{
$_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
$_filepath = $compiled->source->uid;
// if use_sub_dirs, break file into directories
Method resetPassword
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resetPassword($token, $new1, $new2) {
$this->debug->append("STA " . __METHOD__, 4);
if ($aToken = $this->token->getToken($token, 'password_reset')) {
if ($new1 !== $new2) {
$this->setErrorMessage( 'New passwords do not match' );
Method check_acl_access
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function check_acl_access($params, $smarty)
{
$isAuthenticated = isset($_SESSION['AUTHENTICATED']) ? true : false;
$iAclSetting = $params['acl'];
// $params['icon'] is deprecated, only needed for mpos compatibility
Method doHeaders
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doHeaders($text) {
#
# Redefined to add id and class attribute support.
#
# Setext-style headers:
Method doFencedCodeBlocks
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doFencedCodeBlocks($text) {
#
# Adding the fenced code block syntax to regular Markdown:
#
# ~~~
Consider simplifying this complex logical expression. Open
if (isset($aTransaction['address']) &&
$aTransaction['address'] == $aDebitTx['coin_address'] &&
((string)($aTransaction['amount'] + $aTransaction['fee']) == (string)($aDebitTx['amount'] * -1) || // Check against transaction - Fee total
(string)($aTransaction['amount'] + $config['txfee_manual']) == (string)($aDebitTx['amount'] * -1) || // Check against txfee_manual deducted
(string)($aTransaction['amount'] + $config['txfee_auto']) == (string)($aDebitTx['amount'] * -1) || // Check against txfee_auto deducted
Consider simplifying this complex logical expression. Open
if ($compiler->template->caching && ((!$compiler->inheritance && !$compiler->nocache && !$compiler->tag_nocache) || ($compiler->inheritance && ($compiler->nocache ||$compiler->tag_nocache)))) {
$_caching = self::CACHING_NOCACHE_CODE;
}
Consider simplifying this complex logical expression. Open
if ((!$this->_template_dir || $this->_template_dir !== $_template_dir)
|| (!$this->_config_dir || $this->_config_dir !== $_config_dir)
|| (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir))
) {
$this->_resource_dir = array();
Method setupInlineSubTemplate
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function setupInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $hash)
Consider simplifying this complex logical expression. Open
if (empty($filter['type']) || ($filter['type'] != 'Debit_AP' && $filter['type'] != 'Debit_MP' && $filter['type'] != 'TXFee' && $filter['type'] != 'Credit_PPS' && $filter['type'] != 'Fee_PPS' && $filter['type'] != 'Donation_PPS')) {
$aFilter[] = "( b.confirmations >= " . $this->config['confirmations'] . " OR ISNULL(b.confirmations) )";
}
Method updateAccount
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateAccount($userID, $address, $threshold, $donate, $email, $timezone, $is_anonymous, $strToken) {
Function smarty_outputfilter_trimwhitespace
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function smarty_outputfilter_trimwhitespace($source, Smarty_Internal_Template $smarty)
{
$store = array();
$_store = 0;
$_offset = 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 run_009
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function run_009() {
// Ugly but haven't found a better way
global $setting, $config, $user, $mysqli;
// Version information
- 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 run_0014
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function run_0014() {
// Ugly but haven't found a better way
global $setting, $config, $user, $mysqli;
// Version information
- 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 run_008
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function run_008() {
// Ugly but haven't found a better way
global $setting, $config, $statistics, $block, $mysqli;
// Version information
- 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"