Showing 144 of 16,700 total issues
Function display_wyciwyg
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function display_wyciwyg (classes, data, retrieve, file, line, col) {
Function extractFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function extractFiles($files)
{
$file_locations = array();
foreach ((array) $files as $extract) {
foreach ($this->files() as $file) {
- 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 getFileName
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getFileName($source_name, $type, $tmp_name, $index, $content_range, FileUpload $upload)
Function extract
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function extract($allow_extensions = null, $remove_common_dir = false)
{
$locations = array();
$files = $this->files();
$start = $remove_common_dir ? mb_strlen(Page::html()->commonDir($files)) : 0;
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
public static function page()
{
extract(Admin::params('page', 'blog', 'bp'));
if ($edit = $page->get('edit')) {
// enforce only one folder path ie. no subfolders
- 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 next
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function next(&$delayed, $time)
{
$html = '-';
if (!empty($delayed)) {
$delay = $delayed - $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 editProfile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function editProfile($user_id)
{
extract(Admin::params('bp', 'page', 'auth', 'website'));
$page->title = 'Edit Your Profile 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 check
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function check($email, $password = null, $and = null)
{
$check = func_get_args();
$email = array_shift($check);
if (empty($check)) {
- 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
Avoid too many return
statements within this method. Open
return $page->sendJson($data);
Avoid too many return
statements within this method. Open
return ($target_file_name) ? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content);
Avoid too many return
statements within this method. Open
return $this->setError('IBM TERSE is not supported... yet?');
Avoid too many return
statements within this method. Open
return $ret;
Avoid too many return
statements within this method. Open
return ($convert == 'Kilometers') ? $value * 1.60934 : $value * 0.868976; // else Nautical Miles
Avoid too many return
statements within this method. Open
return $this->setError('Enhanced Deflating is not supported... yet?');
Avoid too many return
statements within this method. Open
return $this->setError('PKWARE Date Compression Library Impoloding is not supported... yet?');
Avoid too many return
statements within this method. Open
return ($convert == 'Kilometers') ? $value * 1.852 : $value * 1.15078; // else Miles
Avoid too many return
statements within this method. Open
return $this->setError('Unknown uncompress method: '.$mode);
Avoid too many return
statements within this method. Open
return $this->setError('Tokenizing compression algorithm is not supported... yet?');
Avoid too many return
statements within this method. Open
return '<div id="admin_manage_files">'.$files.'</div><br>'.$form;
Avoid too many return
statements within this method. Open
return ($target_file_name) ? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size)) : gzinflate($content, $uncompressed_size);