Method __construct
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
$lang_field_prefix = $this->module_name . '_';
File Cms_usersAdmin.php
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function _fb_callback_on_save
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function _fb_callback_on_save(&$data)
{
$user_id = $this->formbuilder->getId();
if (!$data['birth_date'] || $data['birth_date'] = '0000-00-00') {
- 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 _fb_callback_on_save
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _fb_callback_on_save(&$data)
{
$user_id = $this->formbuilder->getId();
if (!$data['birth_date'] || $data['birth_date'] = '0000-00-00') {
Function _fb_format_title_and_modify_option
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function _fb_format_title_and_modify_option($content, $line)
{
$this->removeMetaActions();
if ($line->status == 0) {
$this->setEditable(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
Method edit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit($display_view = true)
{
$id = $this->input->getParam('id');
$sameuser = $this->auth->getUserId() == $id;
Function edit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function edit($display_view = true)
{
$id = $this->input->getParam('id');
$sameuser = $this->auth->getUserId() == $id;
- 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 true;
Avoid too many return
statements within this method. Open
return false;