Showing 1,388 of 1,858 total issues
Function grab_variables
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function grab_variables($n) {
$args = [];
foreach ($this->uri->uri_to_assoc($n) as $k => $v) {
- Read upRead up
- Create a ticketCreate a ticket
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 doDelete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function doDelete($values, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(RouteTableMap::DATABASE_NAME);
}
- Read upRead up
- Create a ticketCreate a ticket
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 getCurrentLocale
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getCurrentLocale() {
$ci = get_instance();
$lang_id = $ci->config->item('cur_lang');
if (self::$currentLocale && $lang_id == self::$currentLangId) {
- Read upRead up
- Create a ticketCreate a ticket
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 _display
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _display($pages = [], $foundInCategories = null) {
/* * Prepare categories for search results * */
$categoriesInSearchResults = null;
$tree = null;
$categories = [];
- Read upRead up
- Create a ticketCreate a ticket
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
Consider simplifying this complex logical expression. Open
if (manual || !p.cyclePause) {
var fx = opts.fx;
// keep trying to get the slide size if we don't have it yet
curr.cycleH = curr.cycleH || $(curr).height();
curr.cycleW = curr.cycleW || $(curr).width();
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
e.preventDefault();
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
}
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) {
// if mouse in menu...
opt.$menu.trigger('contextmenu:hide');
}
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
<?php if (isset($sections['http_headers']) || isset($sections['get']) || isset($sections['config']) || isset($sections['post']) || isset($sections['uri_string']) || isset($sections['controller_info'])) : ?>
<a href="#" id="ci-profiler-menu-vars" onclick="ci_profiler_bar.show('ci-profiler-vars', 'ci-profiler-menu-vars'); return false;">
<span>vars</span> & Config
</a>
<?php endif; ?>
- Create a ticketCreate a ticket
Function createPagerAnchor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
- Create a ticketCreate a ticket
Function tooltip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var tooltip = function (key, x, y, e, graph) {
- Create a ticketCreate a ticket
Function custom
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$.fn.cycle.custom = function(curr, next, opts, cb, speedOverride) {
- Create a ticketCreate a ticket
Method load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') {
- Create a ticketCreate a ticket
Function fxFn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
opts.fxFn = function(curr, next, opts, cb, fwd) {
- Create a ticketCreate a ticket
Function buildOptions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function buildOptions($cont, $slides, els, options, o) {
- Create a ticketCreate a ticket
Method emmet_money
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function emmet_money($price, $priceWrapper = null, $coinsWrapper = null, $symbolWrapper = null, $currency = null) {
- Create a ticketCreate a ticket
Method showMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function showMessage($message, $title = FALSE, $class = '', $ret = false, $timeout = false) {
- Create a ticketCreate a ticket
Method recaptcha_check_answer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = []) {
- Create a ticketCreate a ticket
Method get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function get($item_id, $status = 0, $module, $limit = 999999, $order_by) {
- Create a ticketCreate a ticket
Method get_album
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function get_album($id = 0, $include_images = TRUE, $limit, $page, $locale = null) {
- Create a ticketCreate a ticket
Method searchLang
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function searchLang($origin, $data, $entity_type, $entity_name, $language) {
- Create a ticketCreate a ticket