The method getContent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$graph = '<p>'.api_convert_encoding(get_lang('Graphic not available'), 'UTF-8').'</p>';
}
- 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 getContent uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
/* Create the pChart object */
$widthSize = 440;
$heightSize = 350;
$angle = 50;
- 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 BlockTeacherGraph extends Block
{
private $user_id;
private $teachers;
private $permission = [DRH];
- 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
The parameter $user_id is not named in camelCase. Open
public function __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_teacher_graph';
if ($this->is_block_visible_for_user($user_id)) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "time_on_platform_by_day" is not in valid camel caps format Open
$time_on_platform_by_day = Tracking::get_time_spent_on_the_platform(
- Exclude checks
Method name "BlockTeacherGraph::get_block" is not in camel caps format Open
public function get_block()
- Exclude checks
Variable "a_last_week" is not in valid camel caps format Open
foreach ($a_last_week as $day) {
- Exclude checks
Variable "user_info" is not in valid camel caps format Open
$user_status = $user_info['status'];
- Exclude checks
Variable "days_on_week" is not in valid camel caps format Open
$days_on_week = [];
- Exclude checks
Variable "days_on_week" is not in valid camel caps format Open
$days_on_week[] = date('d/m', $weekday);
- Exclude checks
Variable "a_last_week" is not in valid camel caps format Open
$a_last_week = get_last_week();
- Exclude checks
Variable "start_date" is not in valid camel caps format Open
$start_date,
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
$is_block_visible_for_user = false;
- Exclude checks
Variable "a_last_week" is not in valid camel caps format Open
$last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);
- Exclude checks
Variable "user_status" is not in valid camel caps format Open
if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) {
- Exclude checks
Variable "time_on_platform_by_day" is not in valid camel caps format Open
$hours = floor($time_on_platform_by_day / 3600);
- Exclude checks
Variable "user_status" is not in valid camel caps format Open
$user_status = $user_info['status'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id,
- Exclude checks
Variable "time_on_platform_by_day" is not in valid camel caps format Open
$min = floor(($time_on_platform_by_day - ($hours * 3600)) / 60);
- Exclude checks
Variable "days_on_week" is not in valid camel caps format Open
$dataSet->addPoints($days_on_week, 'Days');
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) {
- Exclude checks
Variable "start_date" is not in valid camel caps format Open
$start_date = api_get_utc_datetime($day);
- Exclude checks
Variable "end_date" is not in valid camel caps format Open
$end_date = api_get_utc_datetime($day + (3600 * 24 - 1));
- Exclude checks
Variable "last_week" is not in valid camel caps format Open
$dataSet->setAbscissaName($last_week);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->teachers = UserManager::get_users_followed_by_drh($user_id, COURSEMANAGER);
- Exclude checks
Method name "BlockTeacherGraph::get_number_of_teachers" is not in camel caps format Open
public function get_number_of_teachers()
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
$is_block_visible_for_user = true;
- Exclude checks
Variable "user_ids" is not in valid camel caps format Open
if (is_array($user_ids) && count($user_ids) > 0) {
- Exclude checks
Variable "time_by_days" is not in valid camel caps format Open
$time_by_days = [];
- Exclude checks
Variable "time_by_days" is not in valid camel caps format Open
$time_by_days[] = $min;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function is_block_visible_for_user($user_id)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_info = api_get_user_info($user_id);
- Exclude checks
Variable "user_ids" is not in valid camel caps format Open
if (is_array($user_ids) && count($user_ids) > 0) {
- Exclude checks
Variable "end_date" is not in valid camel caps format Open
$end_date
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if ($this->is_block_visible_for_user($user_id)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$teacher_info = api_get_user_info($user_id);
- Exclude checks
Variable "time_by_days" is not in valid camel caps format Open
$dataSet->addPoints($time_by_days, $username);
- Exclude checks
Variable "a_last_week" is not in valid camel caps format Open
$last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);
- Exclude checks
Variable "user_info" is not in valid camel caps format Open
$user_info = api_get_user_info($user_id);
- Exclude checks
Variable "last_week" is not in valid camel caps format Open
$last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]);
- Exclude checks
Variable "Antialias" is not in valid camel caps format Open
$myPicture->Antialias = false;
- Exclude checks
Method name "BlockTeacherGraph::is_block_visible_for_user" is not in camel caps format Open
public function is_block_visible_for_user($user_id)
- Exclude checks
Variable "a_last_week" is not in valid camel caps format Open
foreach ($a_last_week as $weekday) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function __construct($user_id)
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$this->user_id = $user_id;
- Exclude checks
Variable "is_block_visible_for_user" is not in valid camel caps format Open
return $is_block_visible_for_user;
- Exclude checks
Variable "user_ids" is not in valid camel caps format Open
$user_ids = array_keys($teachers);
- Exclude checks
Variable "user_ids" is not in valid camel caps format Open
foreach ($user_ids as $user_id) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
foreach ($user_ids as $user_id) {
- Exclude checks
Variable "teacher_info" is not in valid camel caps format Open
$teacher_info = api_get_user_info($user_id);
- Exclude checks
Variable "teacher_info" is not in valid camel caps format Open
$username = $teacher_info['username'];
- Exclude checks
The variable $is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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_ids is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $teacher_info is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_on_platform_by_day is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_by_days is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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_ids is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_on_platform_by_day is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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_status is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_teacher_graph';
if ($this->is_block_visible_for_user($user_id)) {
- 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 $start_date is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_by_days is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_by_days is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $days_on_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_teacher_graph';
if ($this->is_block_visible_for_user($user_id)) {
- 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 is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $a_last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $a_last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $a_last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $a_last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $teacher_info is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $start_date is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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_info is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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_status is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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_ids is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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_ids is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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_info is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 __construct($user_id)
{
$this->user_id = $user_id;
$this->path = 'block_teacher_graph';
if ($this->is_block_visible_for_user($user_id)) {
- 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 $days_on_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $end_date is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $a_last_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 $end_date is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $time_on_platform_by_day is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 $days_on_week is not named in camelCase. Open
public function getContent()
{
$teachers = $this->teachers;
$graph = '';
$user_ids = array_keys($teachers);
- 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 is_block_visible_for_user is not named in camelCase. Open
public function is_block_visible_for_user($user_id)
{
$user_info = api_get_user_info($user_id);
$user_status = $user_info['status'];
$is_block_visible_for_user = false;
- 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 get_number_of_teachers is not named in camelCase. Open
public function get_number_of_teachers()
{
return count($this->teachers);
}
- 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 get_block is not named in camelCase. Open
public function get_block()
{
$column = 1;
$data = [];
$html = $this->getBlockCard(
- 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() {
}
}