Showing 889 of 1,089 total issues
Function createPayout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function createPayout($account_id=NULL, $strToken) {
$stmt = $this->mysqli->prepare("INSERT INTO $this->table (account_id) VALUES (?)");
if ($stmt && $stmt->bind_param('i', $account_id) && $stmt->execute()) {
$insert_id = $stmt->insert_id;
// twofactor - consume the token if it is enabled and valid
- 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 getPPSValue
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getPPSValue() {
// Fetch RPC difficulty
if ($this->bitcoin->can_connect() === true) {
$dDifficulty = $this->bitcoin->getdifficulty();
} else {
- 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 detachSigner
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function detachSigner(Swift_Signer $signer)
{
if ($signer instanceof Swift_Signers_HeaderSigner) {
foreach ($this->headerSigners as $k => $headerSigner) {
if ($headerSigner === $signer) {
- 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 _createParameter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _createParameter($name, $value)
{
$origValue = $value;
$encoded = 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 stop
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function stop()
{
if ($this->_started) {
if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) {
$this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped');
- 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 getSubTemplate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
{
// already in template cache?
if ($this->smarty->allow_ambiguous_resources) {
$_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id;
Method sendInvitation
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendInvitation($account_id, $aData) {
$this->debug->append("STA " . __METHOD__, 4);
// Check data input
if (empty($aData['email']) || !filter_var($aData['email'], FILTER_VALIDATE_EMAIL)) {
$this->setErrorMessage($this->getErrorMsg('E0023'));
Method encodeByteStream
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
{
if ($maxLineLength > 76 || $maxLineLength <= 0) {
$maxLineLength = 76;
}
Method filter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function filter($buffer, $_minReplaces = -1)
{
if ($this->_treeMaxLen == 0) {
return $buffer;
}
Method setHeaders
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setHeaders(Swift_Mime_HeaderSet $headers)
{
$bodyLen = $this->_bodyLen;
if (is_bool($bodyLen)) {
$bodyLen = - 1;
Function init
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function init() {
var self = this;
$(this._element).find('li.' + this._config.activeClass).has('ul').children('ul').attr('aria-expanded', true).addClass(this._config.collapseClass + ' ' + this._config.collapseInClass);
$(this._element).find('li').not('.' + this._config.activeClass).has('ul').children('ul').attr('aria-expanded', false).addClass(this._config.collapseClass);
Method mutingErrorHandler
has 34 lines of code (exceeds 25 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
Method compile
has 34 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 yy_reduce
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_reduce($yyruleno)
{
$yymsp = $this->yystack[$this->yyidx];
if ($this->yyTraceFILE && $yyruleno >= 0
&& $yyruleno < count(self::$yyRuleName)) {
Method yy_reduce
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_reduce($yyruleno)
{
$yymsp = $this->yystack[$this->yyidx];
if ($this->yyTraceFILE && $yyruleno >= 0
&& $yyruleno < count(self::$yyRuleName)) {
Method compile
has 34 lines of code (exceeds 25 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
Method initResetPassword
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initResetPassword($username) {
$this->debug->append("STA " . __METHOD__, 4);
// Fetch the users mail address
if (empty($username)) {
$this->setErrorMessage("Username must not be empty");
Method init
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
if (count(self::$_map) > 0) {
return;
}
Method __call
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __call($method, $params) {
if (!is_scalar($method)) throw new Exception('Method name has no scalar value');
if (is_array($params)) {
// no keys
Method getNotificatorInstance
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getNotificatorInstance($notificator, $data){
$class = null;
$file = null;
if (is_array($notificator)){