Showing 144 of 16,700 total issues
Method listUsers
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function listUsers($view)
{
extract(Admin::params('bp', 'page', 'auth', 'website'));
$page->title = 'View Users at '.$website;
$html = '';
Method page
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function page()
{
$page = Page::html();
$get = $page->request->query->all();
if ($page->get('adminer') == 'css') {
Function exec
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static function exec($action, $table, $values = null)
{
$action = strtolower($action);
if (!isset(self::$stmt[$action][$table])) {
switch ($action) {
- 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 process
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function process()
{
$page = Page::html();
$file = $page->file('analytics.csv');
$temp = $page->file('analytics-temp.csv');
- 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 page
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function page()
{
extract(Admin::params('bp', 'page'));
$html = '';
- 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 setup
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setup(Auth $auth, Blog $blog, array $map)
{
$html = '';
if (!isset(static::$version['bootstrap'])) {
return $html;
Function visitors
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private function visitors()
{
extract(Admin::params('bp', 'website', 'page', 'path', 'admin'));
$page->title = 'Visitors at '.$website;
$html = '';
- 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 __call
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function __call($method, $arguments)
{
switch ($method) {
case 'start':
if (self::$debugbar->hasCollector('time')) {
- 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 startStop
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private function startStop($count, $range, $label = 'Y-m-d H:i:s', array $values = array())
{
$array = array();
$range = substr($range, 0, 3);
if (in_array($range, array('sec', 'min', 'hou', 'day', 'wee', 'mon', 'yea'))) {
- 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 page
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function page()
{
extract(Admin::params('bp', 'page'));
$html = '';
Method save
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function save(array $files, array $remove = array())
{
$page = Page::html();
if (($retrieve = $page->post('retrieve')) && isset($files[$retrieve])) {
exit(is_file($files[$retrieve]) ? file_get_contents($files[$retrieve]) : '');
Method database
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function database()
{
$page = Page::html();
$db = new SQLite($page->file('Analytics.db'));
if ($db->created || version_compare(self::VERSION, $db->settings('version'), '>')) {
Function display_wyciwyg
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function display_wyciwyg (classes, data, retrieve, file, line, col) {
acefile.compare = data;
$("#toolbar div.file").text(file);
$("#toolbar div.status").hide();
if (classes.hasClass("noMarkup")) {
- 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 collect
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function collect()
{
// return array();
$responseHeaders = $this->response->headers->all();
Method exec
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function exec($action, $table, $values = null)
{
$action = strtolower($action);
if (!isset(self::$stmt[$action][$table])) {
switch ($action) {
Method wyciwyg
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function wyciwyg()
{
extract(self::params('bp', 'page', 'plugin'));
$html = "\n\n".<<<EOT
<div id="wyciwyg" style="display:none; width:100%; padding:0 10px;">
Function display_wyciwyg
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display_wyciwyg (classes, data, retrieve, file, line, col) {
acefile.compare = data;
$("#toolbar div.file").text(file);
$("#toolbar div.status").hide();
if (classes.hasClass("noMarkup")) {
Function box
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function box($style, array $contents)
{
$box = '';
$classes = 'box box-'.implode(' box-', explode(' ', $style)); // solid, default, primary, info, warning, success, danger
foreach ($contents as $section => $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 sidebar
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function sidebar($links, $prepend = false)
{
if (is_array($links)) {
$page = Page::html();
foreach ($links as $name => $path) {
- 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 blueimpFileUploader
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.blueimpFileUploader = function(options) {
var action = $(this).closest('form').attr('action');
var field = $(this).attr('id');
var settings = $.extend({
'size': 0,