The method Rest::updateUserFromUserName() calls the typical debug function print_r() which is mostly only used during development. Open
throw new Exception(get_lang('CouldNotUpdateExtraFieldValue').': '.print_r($field, true));
- Read upRead up
- Exclude checks
DevelopmentCodeFragment
Since: 2.3.0
Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.
Example
class SuspectCode {
public function doSomething(array $items)
{
foreach ($items as $i => $item) {
// …
if ('qafoo' == $item) var_dump($i);
// …
}
}
}
Source https://phpmd.org/rules/design.html#developmentcodefragment
The method createSessionFromModel() has an NPath complexity of 23040. The configured NPath complexity threshold is 200. Open
public function createSessionFromModel($modelSessionId, $sessionName, $startDate, $endDate, array $extraFields = [])
{
if (empty($modelSessionId) || empty($sessionName) || empty($startDate) || empty($endDate)) {
throw new Exception(get_lang('NoData'));
}
- 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
The method addUser() has an NPath complexity of 1536. The configured NPath complexity threshold is 200. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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
The method updateUserFromUserName() has an NPath complexity of 33408. The configured NPath complexity threshold is 200. Open
public function updateUserFromUserName($parameters)
{
// find user
$userId = null;
if (!is_array($parameters) || empty($parameters)) {
- 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
The method addCourse() has an NPath complexity of 1920. The configured NPath complexity threshold is 200. Open
public function addCourse(array $courseParam): array
{
$idCampus = isset($courseParam['id_campus']) ? $courseParam['id_campus'] : 1;
$title = isset($courseParam['title']) ? $courseParam['title'] : '';
$wantedCode = isset($courseParam['wanted_code']) ? $courseParam['wanted_code'] : null;
- 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
The method getCourseLearnPaths() has an NPath complexity of 1738. The configured NPath complexity threshold is 200. Open
public function getCourseLearnPaths()
{
$sessionId = $this->session ? $this->session->getId() : 0;
$categoriesTempList = learnpath::getCategories($this->course->getId());
- 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
Avoid using undefined variables such as '$loggedUser' which will lead to PHP notices. Open
$loggedUser['user_id'] = $this->user->getId();
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$loggedUser' which will lead to PHP notices. Open
$loggedUser['status'] = $this->user->getStatus();
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$loggedUser' which will lead to PHP notices. Open
ChamiloSession::write('_user', $loggedUser);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$loggedUser' which will lead to PHP notices. Open
$loggedUser['uidReset'] = true;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The class Rest has a coupling between objects value of 33. Consider to reduce the number of dependencies under 13. Open
class Rest extends WebService
{
public const SERVICE_NAME = 'MsgREST';
public const EXTRA_FIELD_GCM_REGISTRATION = 'gcm_registration_id';
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '1622', column '23'). Open
throw new Exception(get_lang('ModelSessionDoesNotExist'));
- 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
Missing class import via use statement (line '1722', column '23'). Open
throw new Exception(get_lang('SessionNotFound'));
- 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
Missing class import via use statement (line '204', column '32'). Open
$extraFieldValue = new ExtraFieldValue('user');
- 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
Missing class import via use statement (line '532', column '23'). Open
$agenda = new Agenda(
- 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
Missing class import via use statement (line '776', column '27'). Open
$fieldValue = new ExtraFieldValue('user');
- 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
Missing class import via use statement (line '1809', column '23'). Open
throw new Exception(get_lang('CouldNotLoadUser'));
- 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
Missing class import via use statement (line '124', column '27'). Open
$extraField = new ExtraField('user');
- 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
Missing class import via use statement (line '190', column '23'). Open
throw new Exception(get_lang('NoSession'));
- 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
Missing class import via use statement (line '1260', column '37'). Open
$extraFieldValues = new ExtraFieldValue('course');
- 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
Missing class import via use statement (line '1657', column '23'). Open
throw new Exception(get_lang('SessionNotRegistered'));
- 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
Missing class import via use statement (line '1767', column '23'). Open
throw new Exception(get_lang('NoSessionMatched'));
- 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
Missing class import via use statement (line '166', column '23'). Open
throw new Exception(get_lang('NoCourse'));
- 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
Missing class import via use statement (line '1690', column '23'). Open
throw new Exception(get_lang('CoursesNotAddedToSession'));
- 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
Missing class import via use statement (line '1931', column '51'). Open
throw new Exception(get_lang('CouldNotUpdateExtraFieldValue').': '.$fieldName);
- 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
Missing class import via use statement (line '1958', column '31'). Open
throw new Exception(get_lang('UnsupportedUpdate')." '$name'");
- 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
Missing class import via use statement (line '1318', column '23'). Open
throw new Exception(get_lang('UserNameNotAvailable'));
- 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
Missing class import via use statement (line '1727', column '23'). Open
throw new Exception(get_lang('UserNotFound'));
- 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
Missing class import via use statement (line '543', column '20'). Open
$end = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC'));
- 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
Missing class import via use statement (line '543', column '57'). Open
$end = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC'));
- 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
Missing class import via use statement (line '1339', column '23'). Open
throw new Exception(get_lang('UserNotRegistered'));
- 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
Missing class import via use statement (line '113', column '23'). Open
throw new Exception(get_lang('InvalidApiKey'));
- 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
Missing class import via use statement (line '693', column '23'). Open
throw new Exception(get_lang('NoForum'));
- 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
Missing class import via use statement (line '1737', column '23'). Open
throw new Exception(get_lang('UserNotSubscribed'));
- 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
Missing class import via use statement (line '1925', column '51'). Open
throw new Exception(get_lang('CouldNotUpdateExtraFieldValue').': '.print_r($field, true));
- 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
Missing class import via use statement (line '1875', column '35'). Open
throw new Exception(get_lang('LanguageUnavailable'));
- 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
Missing class import via use statement (line '503', column '23'). Open
throw new Exception(get_lang('NoAnnouncement'));
- 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
Missing class import via use statement (line '540', column '59'). Open
$start = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC'));
- 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
Missing class import via use statement (line '1756', column '27'). Open
$valueModel = new ExtraFieldValue('session');
- 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
Missing class import via use statement (line '1884', column '29'). Open
new DateTime(
- 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
Missing class import via use statement (line '1772', column '23'). Open
throw new Exception(get_lang('MoreThanOneSessionMatched'));
- 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
Missing class import via use statement (line '1793', column '23'). Open
throw new Exception('NoData');
- 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
Missing class import via use statement (line '1661', column '23'). Open
throw new Exception($newSessionId);
- 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
Missing class import via use statement (line '1799', column '31'). Open
throw new Exception(get_lang('UserNotFound'));
- 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
Missing class import via use statement (line '1886', column '33'). Open
new DateTimeZone('UTC')
- 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
Missing class import via use statement (line '540', column '22'). Open
$start = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC'));
- 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
Missing class import via use statement (line '396', column '27'). Open
throw new Exception('NoDataAvailable');
- 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
Missing class import via use statement (line '821', column '34'). Open
$learnPathList = new LearnpathList(
- 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
Missing class import via use statement (line '1618', column '23'). Open
throw new Exception(get_lang('NoData'));
- 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
Missing class import via use statement (line '1805', column '23'). Open
throw new Exception(get_lang('NoData'));
- 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 editCampusURL uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
UrlManager::update($url_id, $urlCampus.'/', $description, $active);
}
- 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 createSessionFromModel uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
UrlManager::add_session_to_url($newSessionId, 1);
}
- 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 addUser uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
UrlManager::add_user_to_url($userId, 1);
}
- 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 createCampusURL uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$url = UrlManager::add($urlCampus.'/', $description, $active, true);
}
- 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 updateUserFromUserName uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
foreach ($value as $fieldName => $fieldValue) {
if (!UserManager::update_extra_field_value($userId, $fieldName, $fieldValue)) {
throw new Exception(get_lang('CouldNotUpdateExtraFieldValue').': '.$fieldName);
}
- 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 addCourse uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$results['status'] = false;
$results['message'] = get_lang('CourseCreationFailed');
}
- 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 addSession uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$out = [
'status' => false,
'message' => get_lang('ErrorOccurred'),
];
- 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 addUser uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// We add by default the access_url_user table with access_url_id = 1
UrlManager::add_user_to_url($userId, 1);
}
- 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 deleteCampusURL uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return [
'status' => false,
'message' => get_lang('Error'),
];
- 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 createSessionFromModel uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
UrlManager::add_session_to_url($newSessionId, 1);
}
- 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
Avoid unused local variables such as '$courseInfo'. Open
$courseInfo = api_get_course_info_by_id($this->course->getId());
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$path'. Open
$path = '/';
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Missing function doc comment Open
public function processMessage(Message $message)
- Exclude checks
Missing function doc comment Open
public function getCourseLpProgress()
- Exclude checks
Doc comment for parameter $forumId does not match actual variable name $postValues Open
* @param int $forumId
- Exclude checks
Variable "extra_field_name" is not in valid camel caps format Open
$extra_field_name = $extra['field_name'];
- Exclude checks
Missing parameter name Open
* @param $modelSessionId
- Exclude checks
Missing parameter name Open
* @param $sessionName
- Exclude checks
Variable "extra_field_value" is not in valid camel caps format Open
$extra_field_value = $extra['field_value'];
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$course_code = $params['course_code'];
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
$url_id = isset($params['id']) ? intval($params['id']) : 0;
- Exclude checks
Doc comment for parameter $forumId does not match actual variable name $values Open
* @param int $forumId
- Exclude checks
Variable "auth_source" is not in valid camel caps format Open
$auth_source = $userParam['auth_source'] ?? PLATFORM_AUTH_SOURCE;
- Exclude checks
Variable "extra_list" is not in valid camel caps format Open
$extra_list = isset($userParam['extra']) ? $userParam['extra'] : [];
- Exclude checks
Variable "extra_field_name" is not in valid camel caps format Open
$extra_field_name,
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
if (!$course_id && !$course_code) {
- Exclude checks
Missing function doc comment Open
public function unSubscribeUserToCourse(array $params): array
- Exclude checks
Missing parameter name Open
* @param $endDate
- Exclude checks
Variable "original_user_id_name" is not in valid camel caps format Open
$original_user_id_name,
- Exclude checks
Variable "original_user_id_value" is not in valid camel caps format Open
$original_user_id_value
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = $params['course_id'];
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
$course_code = CourseManager::get_course_code_from_course_id($course_id);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (CourseManager::subscribeUser($user_id, $course_code, $status, 0, 0, false)) {
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
if (1 == $url_id) {
- Exclude checks
Missing function doc comment Open
public function addCourse(array $courseParam): array
- Exclude checks
Variable "original_user_id_name" is not in valid camel caps format Open
$original_user_id_name = $userParam['original_user_id_name'];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = $params['user_id'];
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
if (!$course_code) {
- Exclude checks
Missing function doc comment Open
public function getUsersSubscribedToCourse()
- Exclude checks
Variable "original_user_id_name" is not in valid camel caps format Open
$original_user_id_name,
- Exclude checks
Variable "extra_list" is not in valid camel caps format Open
if (is_array($extra_list) && count($extra_list) > 0) {
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
if (CourseManager::subscribeUser($user_id, $course_code, $status, 0, 0, false)) {
- Exclude checks
Missing parameter name Open
* @param array Params Campus
- Exclude checks
Variable "official_code" is not in valid camel caps format Open
$official_code = '';
- Exclude checks
Variable "expiration_date" is not in valid camel caps format Open
$expiration_date = '';
- Exclude checks
Variable "extra_list" is not in valid camel caps format Open
foreach ($extra_list as $extra) {
- Exclude checks
Variable "extra_field_name" is not in valid camel caps format Open
$extra_field_name,
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
if (!empty($url_id)) {
- Exclude checks
Missing parameter name Open
* @param $startDate
- Exclude checks
Variable "coach_username" is not in valid camel caps format Open
$coach_username = (int) $params['coach_username'];
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
if (!$course_id && !$course_code) {
- Exclude checks
Variable "original_user_id_value" is not in valid camel caps format Open
$original_user_id_value = $userParam['original_user_id_value'];
- Exclude checks
Variable "expiration_date" is not in valid camel caps format Open
$expiration_date = $userParam['expiration_date'];
- Exclude checks
Variable "extra_field_name" is not in valid camel caps format Open
$extra_field_name,
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
UrlManager::update($url_id, $urlCampus, $description, $active);
- Exclude checks
Missing parameter name Open
* @param array Params Campus
- Exclude checks
Variable "hr_dept_id" is not in valid camel caps format Open
$hr_dept_id = 0;
- Exclude checks
Variable "picture_uri" is not in valid camel caps format Open
$picture_uri,
- Exclude checks
Variable "auth_source" is not in valid camel caps format Open
$auth_source,
- Exclude checks
Variable "picture_uri" is not in valid camel caps format Open
$picture_uri = '';
- Exclude checks
Variable "extra_list" is not in valid camel caps format Open
if (is_array($extra_list) && count($extra_list) > 0) {
- Exclude checks
Variable "extra_field_value" is not in valid camel caps format Open
$extra_field_value
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_code = CourseManager::get_course_code_from_course_id($course_id);
- Exclude checks
Variable "coach_username" is not in valid camel caps format Open
[$coach_username],
- Exclude checks
Variable "official_code" is not in valid camel caps format Open
$official_code,
- Exclude checks
Variable "expiration_date" is not in valid camel caps format Open
$expiration_date,
- Exclude checks
Variable "hr_dept_id" is not in valid camel caps format Open
$hr_dept_id
- Exclude checks
Missing parameter name Open
* @param $fieldName
- Exclude checks
Missing parameter name Open
* @param $fieldValue
- Exclude checks
Missing parameter name Open
* @param $userParam
- Exclude checks
Variable "original_user_id_name" is not in valid camel caps format Open
$original_user_id_name,
- Exclude checks
Missing parameter name Open
* @param array Params Campus
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
$url_id = isset($params['id']) ? intval($params['id']) : 0;
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
UrlManager::update($url_id, $urlCampus.'/', $description, $active);
- Exclude checks
Variable "url_id" is not in valid camel caps format Open
$result = UrlManager::delete($url_id);
- Exclude checks
The variable $url_id is not named in camelCase. Open
public function editCampusURL($params)
{
$urlCampus = Security::remove_XSS($params['url']);
$description = Security::remove_XSS($params['description']);
- 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 $extra_field_value is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $url_id is not named in camelCase. Open
public function editCampusURL($params)
{
$urlCampus = Security::remove_XSS($params['url']);
$description = Security::remove_XSS($params['description']);
- 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 $official_code is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $expiration_date is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $original_user_id_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $original_user_id_value is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_id is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $url_id is not named in camelCase. Open
public function deleteCampusURL($params)
{
$url_id = isset($params['id']) ? intval($params['id']) : 0;
$result = UrlManager::delete($url_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 $coach_username is not named in camelCase. Open
public function addSession(array $params)
{
$name = $params['name'];
$coach_username = (int) $params['coach_username'];
$startDate = $params['access_start_date'];
- 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 $hr_dept_id is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $original_user_id_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_code is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $url_id is not named in camelCase. Open
public function editCampusURL($params)
{
$urlCampus = Security::remove_XSS($params['url']);
$description = Security::remove_XSS($params['description']);
- 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 $coach_username is not named in camelCase. Open
public function addSession(array $params)
{
$name = $params['name'];
$coach_username = (int) $params['coach_username'];
$startDate = $params['access_start_date'];
- 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 $expiration_date is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_list is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $auth_source is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_field_value is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_code is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $official_code is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_id is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $url_id is not named in camelCase. Open
public function editCampusURL($params)
{
$urlCampus = Security::remove_XSS($params['url']);
$description = Security::remove_XSS($params['description']);
- 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 subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $url_id is not named in camelCase. Open
public function deleteCampusURL($params)
{
$url_id = isset($params['id']) ? intval($params['id']) : 0;
$result = UrlManager::delete($url_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 $picture_uri is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $auth_source is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_list is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_field_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_code is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $original_user_id_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_list is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $url_id is not named in camelCase. Open
public function editCampusURL($params)
{
$urlCampus = Security::remove_XSS($params['url']);
$description = Security::remove_XSS($params['description']);
- 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 $hr_dept_id is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_list is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_field_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $picture_uri is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $extra_field_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_id is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $original_user_id_value is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $expiration_date is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $course_code is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $course_code is not named in camelCase. Open
public function subscribeUserToCourse($params)
{
$course_id = $params['course_id'];
$course_code = $params['course_code'];
$user_id = $params['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 $extra_field_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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 $original_user_id_name is not named in camelCase. Open
public function addUser($userParam)
{
$firstName = $userParam['firstname'];
$lastName = $userParam['lastname'];
$status = $userParam['status'];
- 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();
}
}