Showing 1,089 of 1,089 total issues
Method getTransactionSummary
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTransactionSummary($account_id=NULL) {
if ($data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data;
$sql = "
SELECT
SUM(t.amount) AS total, t.type AS type
Method sendChangeConfigEmail
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendChangeConfigEmail($strType, $userID) {
$exists = $this->token->doesTokenExist($strType, $userID);
if ($exists == 0) {
$token = $this->token->createToken($strType, $userID);
$aData['token'] = $token;
Method smarty_function_html_options_optoutput
has 30 lines of code (exceeds 25 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 . '"';
Method yy_shift
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
if ($this->yyidx >= self::YYSTACKDEPTH) {
$this->yyidx--;
Method yy_shift
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
if ($this->yyidx >= self::YYSTACKDEPTH) {
$this->yyidx--;
Method listInvalidationKeys
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
{
$t = array('IVK#ALL');
$_name = $_compile = '#';
if ($resource_name) {
Method bind_param
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bind_param($paramTypes) {
if (!is_string($paramTypes)) {
return false;
} else {
$args = func_get_args();
Method getMPQueue
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getMPQueue($limit=250) {
$stmt = $this->mysqli->prepare("
SELECT
a.id,
a.username,
Identical blocks of code found in 3 locations. Consider refactoring. Open
case 'readonly':
if (!empty($params['strict'])) {
if (!is_scalar($_val)) {
trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
case 'readonly':
if (!empty($params['strict'])) {
if (!is_scalar($_val)) {
trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
case 'readonly':
if (!empty($params['strict'])) {
if (!is_scalar($_val)) {
trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method smarty_mb_str_replace
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_mb_str_replace($search, $replace, $subject, &$count=0)
{
if (!is_array($search) && is_array($replace)) {
return false;
}
Function cookie
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var config = $.cookie = function (key, value, options) {
// Write
if (value !== undefined && !$.isFunction(value)) {
Method smarty_modifier_date_format
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifier_date_format($string, $format=null, $default_date='', $formatter='auto')
{
if ($format === null) {
$format = Smarty::$_DATE_FORMAT;
}
Method smarty_modifier_capitalize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = false)
{
if (Smarty::$_MBSTRING) {
if ($lc_rest) {
// uppercase (including hyphenated words)
Method compileTemplateSource
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compileTemplateSource()
{
if (!$this->source->recompiled) {
$this->properties['file_dependency'] = array();
if ($this->source->components) {
Method compile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$_name = trim($_attr['name'], "\"'");
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($main, $slave = false, $strict = false)
{
if ($strict) {
$this->mysqliW = new mysqli_strict($main['host'],
$main['user'], $main['pass'],
Method getApiType
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getApiType($url) {
if (preg_match('/coinchoose.com/', $url)) {
return 'coinchoose';
} else if (preg_match('/btc-e.nz/', $url)) {
return 'btce';
Method _doAnchors_reference_callback
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _doAnchors_reference_callback($matches) {
$whole_match = $matches[1];
$link_text = $matches[2];
$link_id =& $matches[3];