The method ImportCsv::importCareers() calls the typical debug function print_r() which is mostly only used during development. Open
$this->logger->addInfo('Career saved: '.print_r($params, 1));
- 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 ImportCsv::run() calls the typical debug function print_r() which is mostly only used during development. Open
$this->logger->addInfo(print_r($teacherBackup, 1));
- 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 ImportCsv::importCareers() calls the typical debug function print_r() which is mostly only used during development. Open
$this->logger->addInfo('Career updated: '.print_r($params, 1));
- 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 importSessionsStatic() has an NPath complexity of 2597832. The configured NPath complexity threshold is 200. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 importCourses() has an NPath complexity of 680. The configured NPath complexity threshold is 200. Open
private function importCourses(
$file,
$moveFile = true,
&$teacherBackup = [],
&$groupBackup = []
- 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 importCareersResults() has an NPath complexity of 514. The configured NPath complexity threshold is 200. Open
private function importCareersResults(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- 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 run() has an NPath complexity of 540128. The configured NPath complexity threshold is 200. Open
public function run()
{
global $_configuration;
$value = api_get_configuration_value('import_csv_custom_url_id');
- 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 importCare() has an NPath complexity of 326. The configured NPath complexity threshold is 200. Open
public function importCare($file, $moveFile = false)
{
$data = Import::csv_reader($file);
$counter = 1;
$batchSize = $this->batchSize;
- 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 importStudents() has an NPath complexity of 121444. The configured NPath complexity threshold is 200. Open
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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 importCalendarStatic() has an NPath complexity of 287472702063122. The configured NPath complexity threshold is 200. Open
private function importCalendarStatic($file, $moveFile = true)
{
$this->fixCSVFile($file);
$this->updateUsersEmails();
- 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 importCareersDiagram() has an NPath complexity of 762303. The configured NPath complexity threshold is 200. Open
private function importCareersDiagram(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- 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 class ImportCsv has a coupling between objects value of 19. Consider to reduce the number of dependencies under 13. Open
class ImportCsv
{
public $test;
public $defaultLanguage = 'dutch';
public $extraFieldIdNameList = [
- 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 '1175', column '37'). Open
$interval = new \DateInterval('P7D');
- 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 '2130', column '33'). Open
$date = new \DateTime($dateStart);
- 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 '1460', column '35'). Open
$career = new Career();
- 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 '1174', column '33'). Open
$date = new \DateTime($sessionInfo['access_start_date']);
- 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 '2574', column '36'). Open
$extraFieldValue = new ExtraFieldValue('career');
- 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 '2578', column '31'). Open
$extraField = new ExtraField('career');
- 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 '2135', column '33'). Open
$date = new \DateTime($dateEnd);
- 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 '2131', column '37'). Open
$interval = new DateInterval('P'.$this->daysCoachAccessBeforeBeginning.'D');
- 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 '842', column '44'). 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 '1357', column '31'). 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 '1213', column '31'). Open
$extraField = new ExtraField('calendar_event');
- 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 '2604', column '31'). Open
$career = new Career();
- 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 '497', column '27'). Open
$extraField = new ExtraField('career');
- 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 '1209', column '36'). Open
$extraFieldValue = new ExtraFieldValue('calendar_event');
- 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 '2136', column '37'). Open
$interval = new DateInterval('P'.$this->daysCoachAccessAfterBeginning.'D');
- 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 '1348', column '24'). Open
$tpl = new Template(null, false, false, false, false, false, false);
- 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 '1446', column '51'). Open
$sessionExtraFieldValue = 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 '488', column '27'). Open
$extraField = new ExtraField('calendar_event');
- 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 '1070', column '42'). Open
$courseExtraFieldValue = 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 '1459', column '50'). Open
$careerExtraFieldValue = new ExtraFieldValue('career');
- 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 '2680', column '36'). Open
$extraFieldValue = new ExtraFieldValue('career');
- 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 '2866', column '43'). Open
$career = new Career();
- 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 '2816', column '27'). Open
$extraField = new ExtraField('career');
- 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 '2812', column '32'). Open
$extraFieldValue = new ExtraFieldValue('career');
- 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 importStudents uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (empty($userInfo)) {
$this->logger->addError("Students - Can't update user :".$row['username']);
continue;
}
- 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 importCareers uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (isset($item['item_id'])) {
$params = [
'id' => $item['item_id'],
'name' => $row['CareerName'],
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError(
"Error when trying to add announcement with title $subject here: $info and SenderId = $senderId"
);
}
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo("Failed creating session: ".$session['SessionName']);
}
- 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 importStudents uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Students - User NOT created: ".$row['username']." ".$row['firstname']." ".$row['lastname']);
$this->logger->addError(strip_tags(Display::getFlashToString()));
Display::cleanFlashMessages();
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$externalCareerIds = [$externalCareerIdList];
}
- 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 importCourses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Courses - Can't create course:".$row['title']);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (COURSE_VISIBILITY_HIDDEN == $courseInfo['visibility']) {
$this->logger->addInfo("Course '".$courseInfo['code']."' has hidden visiblity. Skip");
$errorFound = 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo(
"Send Mail: ".intval($sendMail).' - Already added: '.intval($alreadyAdded)
);
if (false == $sendMail) {
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo(
"Error while creating event external id: $externalEventId"
);
}
- 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 importCourses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Courses - Course NOT updated ".$courseInfo['code']);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$teachers = CourseManager::get_coach_list_from_course_code(
$courseInfo['code'],
$sessionId
);
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
foreach ($enreg as $tag_name) {
$tag_names[] = api_preg_replace(
'/[^a-zA-Z0-9_\-]/',
'',
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$generalCoachesId = SessionManager::getGeneralCoachesIdForSession($sessionId);
$teacherId = $generalCoachesId[0] ?? 0;
}
- 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 moveFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError(
"Error - Cant move file to the treated folder: $file"
);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// First time
$eventStartDateList[$courseInfo['real_id']][$event['session_id']] = $event['start'];
$eventEndDateList[$courseInfo['real_id']][$event['session_id']] = $event['end'];
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo("Error while creating event external id: $externalEventId");
}
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo("No coaches added");
}
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo(
'SessionID not found in system.'
);
}
- 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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->$method($file, 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 importTeachers uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Teachers - User NOT created: ".$row['username']." ".$row['firstname']." ".$row['lastname']);
$this->logger->addError(strip_tags(Display::getFlashToString()));
Display::cleanFlashMessages();
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo(
"Error while updating event with external id: $externalEventId"
);
}
- 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 importCourses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// Update
$params = [
'title' => $row['title'],
'category_code' => $row['course_category'],
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sessionInfo = api_get_session_info($sessionId);
$accessBefore = null;
$accessAfter = null;
- 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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "Error - This file '$file' can't be processed.".PHP_EOL;
echo "Trying to call $method".PHP_EOL;
echo "The file have to has this format:".PHP_EOL;
echo "prefix_students_ddmmyyyy.csv, prefix_teachers_ddmmyyyy.csv,
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// The event already exists, just update
$eventResult = $agenda->editEvent(
$item['item_id'],
$event['start'],
- 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 importSubscribeUserToCourseSessionExtStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$userIdList[] = $userId;
}
- 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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$fileToProcessStatic[$parts[1]][] = [
'method' => $method,
'file' => $path.$fileInfo['basename'],
];
- 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 importTeachers uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Teachers - User not updated: ".$row['username']);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$teachersToString = SessionManager::getCoachesByCourseSessionToString(
$sessionId,
$courseInfo['real_id'],
','
- 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 moveFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = rename($file, $moved);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$date = api_format_date($start, DATE_TIME_FORMAT_LONG_24H).' - '.
api_format_date($end, DATE_TIME_FORMAT_LONG_24H);
}
- 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 importStudents uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addError("Students - User NOT updated: ".$row['username']." ".$row['firstname']." ".$row['lastname']);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$externalEventId = $event[$extraFieldName];
if (empty($externalEventId)) {
$this->logger->addInfo('external_calendar_itemID was set but empty. Skipping ...');
continue;
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// New event. Create it.
$eventId = $agenda->addEvent(
$event['start'],
$event['end'],
- 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 importCourses uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
CourseManager::updateTeachers(
$courseInfo,
$row['teachers'],
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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo("No users to register.");
}
- 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo('SessionID does not exists');
}
- 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 importTeachers uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (empty($userInfo)) {
$this->logger->addError("Teachers - Can't update user :".$row['username']);
continue;
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo('Calendar event not found '.$item['item_id']);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$eventAlreadySent[$courseInfo['real_id']][$event['session_id']] = 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 importSessionsStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo($error_message);
}
- 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$errorFound = 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 importCalendarStatic uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$report['mail_not_sent_announcement_exists']++;
$this->logger->addInfo(
"Mail NOT sent. An announcement seems to be already saved in '$info'"
);
- 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 importSubscribeUserToCourse uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->logger->addInfo(
"User $userId was NOT ADDED to course ".$courseInfo['code']." with status '$status' with course category: '$userCourseCategory'"
);
}
- 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 importCareersResults uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$careerIdList[$careerId] = 0;
//$this->logger->addInfo("Career not found: $careerId case 2");
continue;
}
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$current = $graph->createVertex($currentCourseId);
$current->setAttribute('graphviz.label', $name);
$current->setAttribute('DefinedColor', $color);
$current->setAttribute('Notes', $notes);
- 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 importCareersResults uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (isset($item['item_id'])) {
$careerChamiloId = $item['item_id'];
$careerIdList[$careerId] = $careerChamiloId;
} else {
- 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 importCareersResults uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$studentId = UserManager::get_user_id_from_original_id(
$rowStudentId,
$this->extraFieldIdNameList['user']
);
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
continue;
}
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if (isset($item['item_id'])) {
$careerChamiloId = $item['item_id'];
$career = new Career();
$career = $career->find($careerChamiloId);
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
continue;
}
- 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 importCareersResults uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$item = $extraFieldValue->get_item_id_from_field_variable_and_field_value(
$extraFieldName,
$careerId
);
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
continue;
}
- 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 importCareersDiagram uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$graph = new Graph($careerId);
$graph->setAttribute('graphviz.graph.rankdir', 'LR');
$careerList[$careerId] = $graph;
}
- 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 private methods such as 'importSessionsExtIdStatic'. Open
private function importSessionsExtIdStatic($file, $moveFile = true)
{
$data = Import::csv_reader($file);
if (!empty($data)) {
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importTeachersStatic'. Open
private function importTeachersStatic($file)
{
$this->importTeachers($file, true);
}
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importStudentsStatic'. Open
private function importStudentsStatic($file)
{
$this->importStudents($file, true);
}
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importOpenSessions'. Open
private function importOpenSessions(
$file,
$moveFile = true,
&$teacherBackup = [],
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importSubscribeStatic'. Open
private function importSubscribeStatic($file, $moveFile = true)
{
$data = Import::csv_reader($file);
if (!empty($data)) {
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused local variables such as '$externalEventId'. Open
$externalEventId = null;
- 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 private methods such as 'importUnsubSessionsExtIdStatic'. Open
private function importUnsubSessionsExtIdStatic($file, $moveFile = true)
{
$data = Import::csv_reader($file);
if (!empty($data)) {
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importCalendarStatic'. Open
private function importCalendarStatic($file, $moveFile = true)
{
$this->fixCSVFile($file);
$this->updateUsersEmails();
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importCareersResults'. Open
private function importCareersResults(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importSubscribeUserToCourse'. Open
private function importSubscribeUserToCourse($file, $moveFile = false, &$teacherBackup = [])
{
$data = Import::csv_reader($file);
if (!empty($data)) {
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused parameters such as '$moveFile'. Open
$moveFile = false,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$teacherBackup'. Open
&$teacherBackup = [],
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$groupBackup'. Open
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private methods such as 'importSessionsStatic'. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused private methods such as 'importSubscribeUserToCourseSessionExtStatic'. Open
private function importSubscribeUserToCourseSessionExtStatic($file, $moveFile = true)
{
$data = Import::csv_reader($file);
if (!empty($data)) {
$this->logger->addInfo(count($data)." records found.");
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused local variables such as '$dateStop'. Open
$dateStop = $row['DateStop'];
- 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 parameters such as '$moveFile'. Open
public function importCare($file, $moveFile = false)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private methods such as 'importCoursesStatic'. Open
private function importCoursesStatic($file, $moveFile, &$teacherBackup = [], &$groupBackup = [])
{
$this->importCourses($file, true, $teacherBackup, $groupBackup);
}
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused parameters such as '$moveFile'. Open
$moveFile = false,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$teacherBackup'. Open
&$teacherBackup = [],
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$moveFile'. Open
private function importCoursesStatic($file, $moveFile, &$teacherBackup = [], &$groupBackup = [])
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private methods such as 'importCareers'. Open
private function importCareers(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused parameters such as '$groupBackup'. Open
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private methods such as 'importCareersDiagram'. Open
private function importCareersDiagram(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Avoid unused local variables such as '$externalEventId'. Open
$externalEventId = null;
- 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 parameters such as '$moveFile'. Open
$moveFile = false,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$file'. Open
private function fixCSVFile($file)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$groupBackup'. Open
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$teacherBackup'. Open
&$teacherBackup = [],
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private methods such as 'importUnsubscribeStatic'. Open
private function importUnsubscribeStatic(
$file,
$moveFile = false,
&$teacherBackup = [],
&$groupBackup = []
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Missing parameter name Open
* @param array
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (!empty($user_id) && $value != $user_id) {
- Exclude checks
Variable "error_message" is not in valid camel caps format Open
$this->logger->addInfo($error_message);
- Exclude checks
Variable "language_interface" is not in valid camel caps format Open
global $language_interface;
- Exclude checks
Variable "tag_key" is not in valid camel caps format Open
foreach ($tag_names as $tag_key => $tag_name) {
- Exclude checks
Variable "tag_key" is not in valid camel caps format Open
$sessions[$key - 1][$tag_name] = $enreg[$tag_key];
- Exclude checks
Variable "tbl_session" is not in valid camel caps format Open
$tbl_session,
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
$cronImportCSVConditions = isset($_configuration['cron_import_csv_conditions']) ? $_configuration['cron_import_csv_conditions'] : null;
- Exclude checks
Variable "tag_name" is not in valid camel caps format Open
$tag_name
- Exclude checks
Variable "language_interface_initial_value" is not in valid camel caps format Open
$language_interface_initial_value = $language;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = UserManager::get_user_id_from_original_id(
- Exclude checks
Variable "tag_name" is not in valid camel caps format Open
foreach ($tag_names as $tag_key => $tag_name) {
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
!in_array('DateStart', $tag_names) || !in_array('DateEnd', $tag_names)
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
$import->defaultAdminId = $_configuration['default_admin_user_id_for_cron'];
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
if (isset($_configuration['import_csv_test'])) {
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
$cronImportCSVConditions = isset($_configuration['cron_import_csv_conditions']) ? $_configuration['cron_import_csv_conditions'] : null;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (!empty($user_id) && $value != $user_id) {
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
foreach ($tag_names as $tag_key => $tag_name) {
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
true == $_configuration['import_csv_fix_permissions']
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
$tag_names = [];
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
!in_array('DateStart', $tag_names) || !in_array('DateEnd', $tag_names)
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
true == $_configuration['import_csv_disable_dump']
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = UserManager::get_user_id_from_original_id(
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$userInfo = api_get_user_info($user_id, false, true);
- Exclude checks
Variable "tag_name" is not in valid camel caps format Open
$sessions[$key - 1][$tag_name] = $enreg[$tag_key];
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
if (!in_array('SessionName', $tag_names) ||
- Exclude checks
Missing parameter name Open
* @param $file
- Exclude checks
Variable "error_message" is not in valid camel caps format Open
$error_message = get_lang('NoNeededData');
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
if (isset($_configuration['import_csv_fix_permissions']) &&
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (!empty($user_id)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$userInfo = api_get_user_info($user_id);
- Exclude checks
Variable "tag_key" is not in valid camel caps format Open
if (isset($enreg[$tag_key])) {
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
$import->test = $_configuration['import_csv_test'];
- Exclude checks
Variable "tag_name" is not in valid camel caps format Open
foreach ($enreg as $tag_name) {
- Exclude checks
Variable "tag_names" is not in valid camel caps format Open
$tag_names[] = api_preg_replace(
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (!empty($user_id)) {
- Exclude checks
Variable "tbl_session" is not in valid camel caps format Open
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
if (isset($_configuration['default_admin_user_id_for_cron'])) {
- Exclude checks
Variable "_configuration" is not in valid camel caps format Open
if (isset($_configuration['import_csv_disable_dump']) &&
- Exclude checks
Variable "language_interface" is not in valid camel caps format Open
$language_interface = $language;
- Exclude checks
Variable "language_interface_initial_value" is not in valid camel caps format Open
global $language_interface_initial_value;
- Exclude checks
The 'getDumpValues()' method which returns a boolean should be named 'is...()' or 'has...()' Open
public function getDumpValues()
{
return $this->dumpValues;
}
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}
Source https://phpmd.org/rules/naming.html#booleangetmethodname
The variable $_configuration is not named in camelCase. Open
public function run()
{
global $_configuration;
$value = api_get_configuration_value('import_csv_custom_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 $tag_key is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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
private function importTeachers($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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
private function importTeachers($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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 $tbl_session is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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 is not named in camelCase. Open
public function run()
{
global $_configuration;
$value = api_get_configuration_value('import_csv_custom_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 $tag_key is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_name is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_name is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_name is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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
private function importTeachers($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tbl_session is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_key is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $error_message is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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
private function importStudents($file, $moveFile = true)
{
$this->fixCSVFile($file);
$data = Import::csvToArray($file);
- 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 $error_message is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_names is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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 $tag_name is not named in camelCase. Open
private function importSessionsStatic($file, $moveFile = true)
{
$content = file($file);
$sessions = [];
$tag_names = [];
- 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();
}
}