Showing 144 of 16,700 total issues
File Users.php
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BootPress\Admin\Pages;
use BootPress\Admin\Component as Admin;
File Component.php
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BootPress\Auth;
use BootPress\Page\Component as Page;
Method robots
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function robots()
{
extract(Admin::params('bp', 'blog', 'website', 'page'));
$page->title = 'Robot Analytics at '.$website;
$html = '';
Method __construct
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(array $options = array())
{
extract(array_merge(array(
'db' => null,
'basic' => null,
Function log
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public static function log()
{
// Get initial values
$page = Page::html();
$log = array(); // csv lines
- 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 visitors
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function visitors()
{
extract(Admin::params('bp', 'website', 'page', 'path', 'admin'));
$page->title = 'Visitors at '.$website;
$html = '';
Function save
has a Cognitive Complexity of 33 (exceeds 5 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]) : '');
- 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 update
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function update($user_id, array $user = array())
{
$update = array();
foreach ($user as $key => $value) {
switch ($key) {
- 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 theme
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function theme($folder)
{
extract(Admin::params('bp', 'page', 'blog'));
if ($page->get('delete') == 'theme') {
list($dirs, $files) = Files::iterate($folder, 'recursive');
Method __construct
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(array $enable = array(), array $messages = array())
{
if (self::$debugbar) {
return;
}
Function robots
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private function robots()
{
extract(Admin::params('bp', 'blog', 'website', 'page'));
$page->title = 'Robot Analytics 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
Method image
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function image($path, $eject = '')
{
$html = '';
$imagick = (extension_loaded('imagick') && class_exists('Imagick')) ? true : false;
$types = array('jpg', 'gif', 'png');
Method file
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function file($field, array $options = array())
{
$page = Page::html();
// View
Method location
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function location($timezone, $hemisphere = '')
{
static $timezones = array(
'UM12' => 'Baker / Howland Islands',
'UM11' => array(
File Component.php
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BootPress\Unzip;
use BootPress\Page\Component as Page;
Function iterate
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public static function iterate($path, $recursive = false, $types = null)
{
$dirs = $files = array();
if (is_dir($path)) {
$cut = strlen($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
Method server
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function server()
{
extract(Admin::params('bp', 'website', 'page'));
$page->title = 'Server Analytics at '.$website;
$page->link(array(
Method process
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function process()
{
$page = Page::html();
$file = $page->file('analytics.csv');
$temp = $page->file('analytics-temp.csv');
Function file
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function file($field, array $options = array())
{
$page = Page::html();
// View
- 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 loadFileListByEof
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function loadFileListByEof()
{
// Check if there's a valid Central Dir signature.
// Let's consider a file comment smaller than 1024 characters...
// Actually, it length can be 65536.. But we're not going to support it.