The method display() has an NPath complexity of 640. The configured NPath complexity threshold is 200. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
Missing class import via use statement (line '36', column '20'). Open
$tpl = new Template(get_lang('Dashboard'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method display uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$user_id = api_get_user_id();
$blockList = DashboardManager::display_user_dashboard_list($user_id);
$tpl->assign('blocklist', $blockList);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method display uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$link_list_view = '<a href="'.api_get_self().'?view=list">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Edit blocks')).'</a>';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The property $user_id is not named in camelCase. Open
class DashboardController
{
private $user_id;
/**
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Variable "tmp_columns" is not in valid camel caps format Open
$tmp_columns = [];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = $this->user_id;
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
$is_block_visible_for_user = $obj->is_block_visible_for_user($user_id);
- Exclude checks
Method name "DashboardController::store_user_block" is not in camel caps format Open
public function store_user_block()
- Exclude checks
Variable "enabled_blocks" is not in valid camel caps format Open
$enabled_blocks = $_POST['enabled_blocks'];
- Exclude checks
Variable "controller_class" is not in valid camel caps format Open
$obj = new $controller_class($user_id);
- Exclude checks
Variable "filename_controller" is not in valid camel caps format Open
$filename_controller = $path.'.class.php';
- Exclude checks
Variable "filename_controller" is not in valid camel caps format Open
require_once $dashboard_plugin_path.$filename_controller;
- Exclude checks
Variable "link_blocks_view" is not in valid camel caps format Open
$link_blocks_view = $link_list_view = null;
- Exclude checks
Variable "configuration_link" is not in valid camel caps format Open
$configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'
- Exclude checks
Variable "tmp_columns" is not in valid camel caps format Open
$tmp_columns[] = $block['column'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = api_get_user_id();
- Exclude checks
Variable "controller_class" is not in valid camel caps format Open
if (class_exists($controller_class)) {
- Exclude checks
Variable "link_list_view" is not in valid camel caps format Open
$link_blocks_view = $link_list_view = null;
- Exclude checks
Method name "DashboardController::close_user_block" is not in camel caps format Open
public function close_user_block($path)
- Exclude checks
Variable "tmp_columns" is not in valid camel caps format Open
if (in_array($block['column'], $tmp_columns)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = api_get_user_id();
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
DashboardManager::store_user_blocks($this->user_id, $enabled_blocks, $columns);
- Exclude checks
Variable "configuration_link" is not in valid camel caps format Open
$configuration_link = null;
- Exclude checks
Variable "link_list_view" is not in valid camel caps format Open
$actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$blockList = DashboardManager::display_user_dashboard_list($user_id);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_block_data = DashboardManager::get_user_block_data($user_id);
- Exclude checks
Variable "user_blocks_id" is not in valid camel caps format Open
$user_blocks_id = array_keys($user_block_data);
- Exclude checks
Variable "dashboard_blocks" is not in valid camel caps format Open
foreach ($dashboard_blocks as $block) {
- Exclude checks
Variable "user_block_data" is not in valid camel caps format Open
$blocks[$path]['column'] = $user_block_data[$block['id']]['column'];
- Exclude checks
Variable "user_block_data" is not in valid camel caps format Open
$user_block_data = DashboardManager::get_user_block_data($user_id);
- Exclude checks
Variable "user_block_data" is not in valid camel caps format Open
$user_blocks_id = array_keys($user_block_data);
- Exclude checks
Variable "user_blocks_id" is not in valid camel caps format Open
if (!in_array($block['id'], $user_blocks_id)) {
- Exclude checks
Variable "dashboard_plugin_path" is not in valid camel caps format Open
require_once $dashboard_plugin_path.$filename_controller;
- Exclude checks
Missing class doc comment Open
class DashboardController
- Exclude checks
Variable "dashboard_blocks" is not in valid camel caps format Open
if (!empty($dashboard_blocks)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
DashboardManager::close_user_block($this->user_id, $path);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$is_block_visible_for_user = $obj->is_block_visible_for_user($user_id);
- Exclude checks
Variable "link_blocks_view" is not in valid camel caps format Open
$link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.
- Exclude checks
Variable "dashboard_blocks" is not in valid camel caps format Open
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Exclude checks
Variable "dashboard_plugin_path" is not in valid camel caps format Open
$dashboard_plugin_path = api_get_path(SYS_PLUGIN_PATH).'dashboard/'.$path.'/';
- Exclude checks
Variable "configuration_link" is not in valid camel caps format Open
$actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);
- Exclude checks
Variable "controller_class" is not in valid camel caps format Open
$controller_class = $block['controller'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$obj = new $controller_class($user_id);
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
if (!$is_block_visible_for_user) {
- Exclude checks
Variable "enabled_blocks" is not in valid camel caps format Open
DashboardManager::store_user_blocks($this->user_id, $enabled_blocks, $columns);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = $this->user_id;
- Exclude checks
Variable "link_list_view" is not in valid camel caps format Open
$link_list_view = '<a href="'.api_get_self().'?view=list">'.
- Exclude checks
Variable "link_blocks_view" is not in valid camel caps format Open
$actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);
- Exclude checks
The variable $dashboard_blocks is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_blocks_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_block_visible_for_user is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $dashboard_blocks is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_block_data is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $controller_class is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_blocks_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $controller_class is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $configuration_link is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $configuration_link is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_blocks_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_blocks_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_block_data is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $filename_controller is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_columns is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $dashboard_plugin_path is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $configuration_link is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_columns is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_list_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_list_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $dashboard_plugin_path is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $dashboard_blocks is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $filename_controller is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $controller_class is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_list_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $is_block_visible_for_user is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_block_data is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $link_blocks_view is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $enabled_blocks is not named in camelCase. Open
public function store_user_block()
{
if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
$enabled_blocks = $_POST['enabled_blocks'];
$columns = $_POST['columns'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $tmp_columns is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $enabled_blocks is not named in camelCase. Open
public function store_user_block()
{
if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
$enabled_blocks = $_POST['enabled_blocks'];
$columns = $_POST['columns'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function display()
{
$tpl = new Template(get_lang('Dashboard'));
$user_id = $this->user_id;
$dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method store_user_block is not named in camelCase. Open
public function store_user_block()
{
if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
$enabled_blocks = $_POST['enabled_blocks'];
$columns = $_POST['columns'];
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method close_user_block is not named in camelCase. Open
public function close_user_block($path)
{
DashboardManager::close_user_block($this->user_id, $path);
Display::addFlash(Display::return_message(get_lang('Saved')));
header('Location: '.api_get_path(WEB_CODE_PATH).'dashboard/index.php');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}