The method processSkillListSimple() has an NPath complexity of 390. The configured NPath complexity threshold is 200. Open
public function processSkillListSimple($skills, string $imageSize = 'mini', string $style = '', bool $showBadge = true, bool $showTitle = true): string
{
if (empty($skills)) {
return '';
}
- 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 getUserSkillsTable() has an NPath complexity of 98000. The configured NPath complexity threshold is 200. Open
public function getUserSkillsTable(int $userId, int $courseId = 0, int $sessionId = 0, bool $addTitle = true): array
{
$skills = $this->getUserSkills($userId, true, $courseId, $sessionId);
$courseTempList = [];
$tableRows = [];
- 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 getSkillsTree() has an NPath complexity of 222000. The configured NPath complexity threshold is 200. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- 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 saveSkillsToCourse() has an NPath complexity of 480. The configured NPath complexity threshold is 200. Open
public static function saveSkillsToCourse($skills, $courseId, $sessionId)
{
$allowSkillInTools = ('true' === api_get_setting('skill.allow_skill_rel_items'));
if (!$allowSkillInTools) {
return false;
- 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 SkillModel has a coupling between objects value of 37. Consider to reduce the number of dependencies under 13. Open
class SkillModel extends Model
{
public $columns = [
'id',
'title',
- 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 '251', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '429', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '561', column '31'). Open
$skill_rel_user = new SkillRelUserModel();
- 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 '447', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '409', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '359', column '38'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '625', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '626', column '34'). Open
$skillRelGradebook = new SkillRelGradebookModel();
- 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 '465', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '502', column '30'). Open
$skillRelSkill = new SkillRelSkillModel();
- 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 '1812', column '27'). Open
$extraField = new ExtraField('skill');
- 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 '2396', column '20'). Open
$png = new PNGImageBaker($imageContent);
- 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 '1752', column '29'). Open
$objGradebook = new Gradebook();
- 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 '1889', column '33'). Open
$skillRelUser = new SkillRelUserModel();
- 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 processSkillList uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$html .= $item;
}
- 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 processSkillList uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$imageSize = "img_$imageSize";
}
- 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 processSkillListSimple uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$html .= Display::url($item, '#', ['target' => '_blank', 'style' => $style]);
}
- 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 getUserSkillsTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$courseInfo = api_get_course_info_by_id($courseId);
$courseTempList[$courseId] = $courseInfo;
}
- 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 getUserSkillsTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$nextVertex = $graph->createVertex($old['id']);
$nextVertex->setAttribute('graphviz.data', $old['data']);
}
- 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 getUserSkillsTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// Getting "root" vertex
$root = $graph->getVertex(1);
$table = '';
/** @var Vertex $vertex */
- 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 getSkillsTree uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($skill['parent_id'] == $skill_id) {
$family[$skill['id']] = $this->getAllChildren($skill['id']);
}
/*if ($skill_id == $skill['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 getSkillsTree uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// Moving node to the children index of their parents
foreach ($skills as $my_skill_id => &$skill) {
if (isset($new_family_array[$skill['id']])) {
$skill['data']['family_id'] = $new_family_array[$skill['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 getAllSkills uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$id_condition = " AND ss.parent_id = $parent_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 getUserSkillsTable 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();
$graph->setAttribute('graphviz.graph.rankdir', 'LR');
foreach ($skillParents as $parentList) {
$old = 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 getChildren uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$skills = $skillRelSkill->getChildren($skill_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 getUserSkillsTable 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($parent['id']);
$current->setAttribute('graphviz.data', $parent['data']);
}
- 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 processVertex uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$imageSize = 'mini';
if (2 == $level) {
$imageSize = 'small';
}
- 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 getUserSkillsTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$tableResult .= get_lang('Without achieved skills');
}
- 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 getUserSkills uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$skillList[$skill['id']] = $skill['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 getUserSkillsTable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$courseInfo = [];
}
- 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 getSkillsTree uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$skills = $this->getAllSkills(false, false, null, $skill_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 exportBadge uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$defaultBadge = api_get_path(SYS_PUBLIC_PATH).'img/icons/128/badges-default.png';
$imageContent = file_get_contents($defaultBadge);
}
- 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 setForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$form->addButtonUpdate(get_lang('Update'));
$form->addHidden('id', $skillInfo['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 getStudentSkills uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$parents = self::get_parents($skill->getId());
// +2 because it takes into account the root
if (count($parents) == $level + 1) {
$skills[] = [
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$path'. Open
$path = '';
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$id'. Open
public function delete($id)
- 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 local variables such as '$em'. Open
$em = Database::getManager();
- 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 '$sord'. Open
$sord,
- 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 '$sidx'. Open
$sidx,
- 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
The parameter $skill_list is not named in camelCase. Open
public function getSkillsInfo(array $skill_list): array
{
$skillRepo = Container::getSkillRepository();
$skill_list = array_map('intval', $skill_list);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $skill_id is not named in camelCase. Open
public function getGradebooksBySkill($skill_id)
{
$skill_id = (int) $skill_id;
$sql = "SELECT g.* FROM {$this->table_gradebook} g
INNER JOIN {$this->table_skill_rel_gradebook} sg
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $add_root is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $skill_id is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $skill_id is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $return_flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $return_flat_array is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function getUserSkillRanking($user_id)
{
$user_id = (int) $user_id;
$sql = "SELECT count(skill_id) count
FROM {$this->table} s
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $load_user_data is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $user_id is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $load_user_data is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $main_depth is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $max_depth is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $where_condition is not named in camelCase. Open
public function getUserListSkillRanking(
$start,
$limit,
$sidx,
$sord,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "user_id" is not in valid camel caps format Open
$user_id = false,
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = (int) $skill_id;
- Exclude checks
Variable "skill_info2" is not in valid camel caps format Open
$parentId = isset($skill_info2['parent_id']) ? isset($skill_info2['parent_id']) : 0;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (isset($user_id) && !empty($user_id)) {
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills[$skill_id]['data']['parent_id'] = $skillInfo['extra']['parent_id'];
- Exclude checks
Variable "new_family_array" is not in valid camel caps format Open
$new_family_array = [];
- Exclude checks
Variable "family_items" is not in valid camel caps format Open
if (!empty($family_items)) {
- Exclude checks
Variable "new_family_array" is not in valid camel caps format Open
$new_family_array[$main_family_id] = $family_id;
- Exclude checks
Missing class doc comment Open
class SkillModel extends Model
- Exclude checks
Expected 3 spaces after parameter type; 1 found Open
* @param bool $showBadge
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
$id_condition = " WHERE ss.parent_id = $parent_id";
- Exclude checks
Variable "skills_tree" is not in valid camel caps format Open
$skills_tree = null;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
return $skill_id;
- Exclude checks
Variable "skill_rel_user" is not in valid camel caps format Open
$skill_rel_user->save($params);
- Exclude checks
Variable "main_family_id" is not in valid camel caps format Open
foreach ($family as $main_family_id => $family_items) {
- Exclude checks
Variable "family_id" is not in valid camel caps format Open
$new_family_array[$main_family_id] = $family_id;
- Exclude checks
Variable "original_skill" is not in valid camel caps format Open
if (empty($original_skill)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = api_get_user_id();
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
->setParent($repo->find($parent_id))
- Exclude checks
Doc comment for parameter $level does not match actual variable name $skills Open
* @param int $level
- Exclude checks
Expected 2 spaces after parameter type; 1 found Open
* @param int $sessionId
- Exclude checks
Variable "return_flat_array" is not in valid camel caps format Open
$return_flat_array = false,
- Exclude checks
Variable "original_skill" is not in valid camel caps format Open
$original_skill = $this->list = $skills;
- Exclude checks
Variable "main_family_id" is not in valid camel caps format Open
$new_family_array[$main_family_id] = $family_id;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$flat_array[$skill_id] = $skills[$skill_id];
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$parent_id = (int) $parent_id;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
public function getGradebooksBySkill($skill_id)
- Exclude checks
Method name "SkillModel::get_parents" is not in camel caps format Open
public function get_parents($skillId)
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills[$skill_id] = $skillInfo;
- Exclude checks
Variable "new_family_array" is not in valid camel caps format Open
$new_family_array[$item['id']] = $family_id;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$flat_array[$skill_id] = $skills[$skill_id];
- Exclude checks
Variable "my_skill_id" is not in valid camel caps format Open
foreach ($skills as $my_skill_id => &$skill) {
- Exclude checks
You must use "/**" style comments for a function comment Open
public function __construct()
- Exclude checks
Variable "table_user" is not in valid camel caps format Open
$this->table_user = Database::get_main_table(TABLE_MAIN_USER);
- Exclude checks
Variable "table_skill_rel_gradebook" is not in valid camel caps format Open
$this->table_skill_rel_gradebook = Database::get_main_table(TABLE_MAIN_SKILL_REL_GRADEBOOK);
- Exclude checks
Variable "load_user_data" is not in valid camel caps format Open
$load_user_data = false,
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
$id_condition = '';
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$parent_id = (int) $parent_id;
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
ON (s.id = ss.skill_id) $id_condition
- Exclude checks
Variable "skill_info2" is not in valid camel caps format Open
$parentId = isset($skill_info2['parent_id']) ? isset($skill_info2['parent_id']) : 0;
- Exclude checks
Expected 2 spaces after parameter type; 1 found Open
* @param int $userId
- Exclude checks
Variable "family_id" is not in valid camel caps format Open
$family_id++;
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
if (!empty($parent_id)) {
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$relation_exists = $skillRelSkill->relationExists($skill_id, $parent_id);
- Exclude checks
Doc comment for parameter $courseId does not match actual variable name $category Open
* @param int $courseId
- Exclude checks
Doc comment for parameter $skills does not match actual variable name $vertex Open
* @param array $skills
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if (1 == $skill_id) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if ($user_id) {
- Exclude checks
Variable "table_gradebook" is not in valid camel caps format Open
$this->table_gradebook = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
- Exclude checks
Variable "skill_list" is not in valid camel caps format Open
$skills = $skillRepo->findBy(['id' => $skill_list]);
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$id_condition = " WHERE ss.parent_id = $parent_id";
- Exclude checks
Variable "load_user_data" is not in valid camel caps format Open
if ($load_user_data) {
- Exclude checks
Variable "skill_info2" is not in valid camel caps format Open
$skill_info2 = $skillRelSkill->getSkillInfo($skill['skill_id']);
- Exclude checks
Variable "relation_exists" is not in valid camel caps format Open
$relation_exists = $skillRelSkill->relationExists($skill_id, $parent_id);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = null,
- Exclude checks
Variable "skill_list" is not in valid camel caps format Open
$skill_list = array_map('intval', $skill_list);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
public function getChildren($skill_id, $load_user_data = false)
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill = $repo->find($skill_id);
- Exclude checks
Variable "relation_exists" is not in valid camel caps format Open
if (!$relation_exists) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$skills = $this->getAllSkills(true, $user_id, null, $skill_id);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$refs[1]['children'][0]['children'][0] = $skills[$skill_id];
- Exclude checks
Variable "table_course" is not in valid camel caps format Open
$this->table_course = Database::get_main_table(TABLE_MAIN_COURSE);
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$id_condition = " AND ss.parent_id = $parent_id";
- Exclude checks
Missing function doc comment Open
public function edit(array $params)
- Exclude checks
Variable "relation_exists" is not in valid camel caps format Open
$relation_exists = $skillRelSkill->relationExists($skillId, $parent_id);
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$relation_exists = $skillRelSkill->relationExists($skillId, $parent_id);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills[$skill_id]['parent_id'] = 1;
- Exclude checks
Variable "family_id" is not in valid camel caps format Open
$family_id = 1;
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$parent_id = null
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
$id_condition = " WHERE s.id = $id";
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$children = self::get_all($load_user_data, $user_id, $id, $skill['id']);
- Exclude checks
Variable "load_user_data" is not in valid camel caps format Open
public function getChildren($skill_id, $load_user_data = false)
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills = $skillRelSkill->getChildren($skill_id, true, $user_id);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$relation_exists = $skillRelSkill->relationExists($skill_id, $parent_id);
- Exclude checks
Variable "gradebook_id" is not in valid camel caps format Open
->setGradeBookCategory($repoGradebook->find($gradebook_id))
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = 0;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if (!empty($skill_id)) {
- Exclude checks
Variable "flat_array" is not in valid camel caps format Open
$flat_array = [];
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id,
- Exclude checks
Variable "family_items" is not in valid camel caps format Open
foreach ($family_items as $item) {
- Exclude checks
Expected 3 spaces after parameter type; 1 found Open
* @param bool $showTitle
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills = $this->getAllSkills(true, $user_id, null, $skill_id);
- Exclude checks
Variable "table_skill_rel_skill" is not in valid camel caps format Open
$this->table_skill_rel_skill = Database::get_main_table(TABLE_MAIN_SKILL_REL_SKILL);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
WHERE sg.skill_id = $skill_id";
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if ($skill_id) {
- Exclude checks
Variable "relation_exists" is not in valid camel caps format Open
if (!$relation_exists) {
- Exclude checks
Expected 2 spaces after parameter type; 1 found Open
* @param int $courseId
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
if (isset($user_id) && !empty($user_id)) {
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if ($skill['parent_id'] == $skill_id) {
- Exclude checks
Variable "family_items" is not in valid camel caps format Open
foreach ($family as $main_family_id => $family_items) {
- Exclude checks
Variable "flat_array" is not in valid camel caps format Open
$flat_array[$skill_id] = $skills[$skill_id];
- Exclude checks
Missing parameter name Open
* @param $skills
- Exclude checks
Variable "skill_list" is not in valid camel caps format Open
public function getSkillsInfo(array $skill_list): array
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
$id_condition = " AND ss.parent_id = $parent_id";
- Exclude checks
Variable "load_user_data" is not in valid camel caps format Open
$children = self::get_all($load_user_data, $user_id, $id, $skill['id']);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills = $skillRelSkill->getChildren($skill_id);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = null,
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills = $this->getAllSkills(false, false, null, $skill_id);
- Exclude checks
Variable "add_root" is not in valid camel caps format Open
if ($add_root) {
- Exclude checks
Variable "skill_list" is not in valid camel caps format Open
$skill_list = array_map('intval', $skill_list);
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = (int) $skill_id;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = $this->save($params);
- Exclude checks
Variable "skill_rel_user" is not in valid camel caps format Open
$skill_rel_user = new SkillRelUserModel();
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skillInfo = $this->getSkillInfo($skill_id);
- Exclude checks
Variable "family_id" is not in valid camel caps format Open
$new_family_array[$item['id']] = $family_id;
- Exclude checks
Variable "table_skill_rel_user" is not in valid camel caps format Open
$this->table_skill_rel_user = Database::get_main_table(TABLE_MAIN_SKILL_REL_USER);
- Exclude checks
Variable "id_condition" is not in valid camel caps format Open
if (empty($id_condition)) {
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
if (!empty($skills) && !empty($parent_id)) {
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$skills = $skillRelSkill->getChildren($skill_id, true, $user_id);
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
foreach ($params['parent_id'] as $parent_id) {
- Exclude checks
Variable "gradebook_id" is not in valid camel caps format Open
foreach ($params['gradebook_id'] as $gradebook_id) {
- Exclude checks
Doc comment for parameter $sessionId does not match actual variable name $courseId Open
* @param int $sessionId
- Exclude checks
You must use "/**" style comments for a function comment Open
public function delete($id)
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
foreach ($params['parent_id'] as $parent_id) {
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
'parent_id' => $parent_id,
- Exclude checks
Variable "table_skill_rel_user" is not in valid camel caps format Open
FROM '.$this->table_skill_rel_user.' u
- Exclude checks
Variable "add_root" is not in valid camel caps format Open
$add_root = false
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if (!empty($skill_id)) {
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
if (empty($skill_id)) {
- Exclude checks
Variable "flat_array" is not in valid camel caps format Open
$flat_array[$skill['id']] = &$skill;
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skills[$skill_id]['data']['family_id'] = 1;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
public function getUserSkillRanking($user_id)
- Exclude checks
Missing parameter name Open
* @param $limit
- Exclude checks
Variable "table_skill_rel_user" is not in valid camel caps format Open
$this->table_skill_rel_user,
- Exclude checks
Variable "return_flat_array" is not in valid camel caps format Open
if ($return_flat_array) {
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id,
- Exclude checks
CASE statements must be defined using a colon Open
case SESSIONADMIN:
- Exclude checks
Variable "main_depth" is not in valid camel caps format Open
$children = $this->getSkillToJson($element['children'], 1, $main_depth);
- Exclude checks
Variable "max_depth" is not in valid camel caps format Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
- Exclude checks
Missing parameter name Open
* @param int depth of the skills
- Exclude checks
Variable "max_depth" is not in valid camel caps format Open
$max_depth
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = (int) $user_id;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
WHERE user_id = $user_id";
- Exclude checks
Missing parameter name Open
* @param int level
- Exclude checks
Variable "skills_tree" is not in valid camel caps format Open
$skills_tree = [
- Exclude checks
Variable "skills_tree" is not in valid camel caps format Open
return $skills_tree;
- Exclude checks
Missing parameter name Open
* @param int skill id
- Exclude checks
Variable "simple_tree" is not in valid camel caps format Open
return json_encode($simple_tree);
- Exclude checks
Missing parameter name Open
* @param $sord
- Exclude checks
Variable "flat_array" is not in valid camel caps format Open
$flat_array[$my_skill_id] = $skill;
- Exclude checks
Variable "my_skill_id" is not in valid camel caps format Open
$flat_array[$my_skill_id] = $skill;
- Exclude checks
Variable "return_flat_array" is not in valid camel caps format Open
$return_flat_array,
- Exclude checks
Variable "where_condition" is not in valid camel caps format Open
WHERE 1=1 AND u.active <> ".USER_SOFT_DELETED." $where_condition
- Exclude checks
Doc comment for parameter $itemId does not match actual variable name $typeId Open
* @param int $itemId
- Exclude checks
Variable "new_family_array" is not in valid camel caps format Open
$skill['data']['family_id'] = $new_family_array[$skill['id']];
- Exclude checks
Variable "simple_tree" is not in valid camel caps format Open
$simple_tree = [];
- Exclude checks
Variable "max_depth" is not in valid camel caps format Open
if ($depth > $max_depth) {
- Exclude checks
Variable "new_family_array" is not in valid camel caps format Open
if (isset($new_family_array[$skill['id']])) {
- Exclude checks
Missing parameter name Open
* @param int user id
- Exclude checks
Missing parameter name Open
* @param bool return a flat array or not
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id,
- Exclude checks
Variable "simple_sub_tree" is not in valid camel caps format Open
$simple_sub_tree = [];
- Exclude checks
Variable "simple_sub_tree" is not in valid camel caps format Open
return $simple_sub_tree;
- Exclude checks
Missing parameter name Open
* @param $where_condition
- Exclude checks
Expected 7 spaces after parameter type; 1 found Open
* @param int $userId
- Exclude checks
Doc comment for parameter $typeId does not match actual variable name $form Open
* @param int $typeId see ITEM_TYPE_* constants
- Exclude checks
Variable "return_flat_array" is not in valid camel caps format Open
$return_flat_array = false,
- Exclude checks
Missing parameter name Open
* @param $sidx
- Exclude checks
Doc comment for parameter $typeId does not match actual variable name $form Open
* @param int $typeId see ITEM_TYPE_* constants
- Exclude checks
Variable "skill_id" is not in valid camel caps format Open
$skill_id = null,
- Exclude checks
Doc comment for parameter $skillInfo does not match actual variable name $form Open
* @param array $skillInfo
- Exclude checks
The closing brace for the class must go on the next line after the body Open
}
- Exclude checks
Variable "flat_array" is not in valid camel caps format Open
return $flat_array;
- Exclude checks
Variable "main_depth" is not in valid camel caps format Open
$main_depth = 2
- Exclude checks
Variable "simple_tree" is not in valid camel caps format Open
$simple_tree[] = [
- Exclude checks
Missing function doc comment Open
public static function exportBadge(Skill $skill, SkillRelUser $skillRelUser, string $urlToRedirect)
- Exclude checks
Doc comment for parameter $userId does not match actual variable name $itemId Open
* @param int $userId
- Exclude checks
Missing function doc comment Open
public static function setBackPackJs(&$htmlHeadXtra)
- Exclude checks
Variable "simple_sub_tree" is not in valid camel caps format Open
$simple_sub_tree[] = $tmp;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = (int) $user_id;
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
$user_id = null,
- Exclude checks
Missing parameter name Open
* @param $start
- Exclude checks
Variable "where_condition" is not in valid camel caps format Open
$where_condition
- Exclude checks
Doc comment for parameter $itemId does not match actual variable name $typeId Open
* @param int $itemId
- Exclude checks
The 'getUserSkillRanking()' method which returns a boolean should be named 'is...()' or 'has...()' Open
public function getUserSkillRanking($user_id)
{
$user_id = (int) $user_id;
$sql = "SELECT count(skill_id) count
FROM {$this->table} s
- 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
Line indented incorrectly; expected at least 16 spaces, found 15 Open
continue;
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
foreach ($sessionAdmins as $sessionAdmin) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($sessionAdmin->getId() !== $fromUser->getId()) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($toUser->getCreatorId() === $fromUser->getId()) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
if ('true' === api_get_setting('allow_session_admins_to_manage_all_sessions')) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
The variable $skill_list is not named in camelCase. Open
public function getSkillsInfo(array $skill_list): array
{
$skillRepo = Container::getSkillRepository();
$skill_list = array_map('intval', $skill_list);
- 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 $skill_list is not named in camelCase. Open
public function getSkillsInfo(array $skill_list): array
{
$skillRepo = Container::getSkillRepository();
$skill_list = array_map('intval', $skill_list);
- 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 $skill_list is not named in camelCase. Open
public function getSkillsInfo(array $skill_list): array
{
$skillRepo = Container::getSkillRepository();
$skill_list = array_map('intval', $skill_list);
- 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 $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function getGradebooksBySkill($skill_id)
{
$skill_id = (int) $skill_id;
$sql = "SELECT g.* FROM {$this->table_gradebook} g
INNER JOIN {$this->table_skill_rel_gradebook} sg
- 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 $skill_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $parent_id is not named in camelCase. Open
public function edit(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $my_skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $main_depth is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $simple_sub_tree is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function getGradebooksBySkill($skill_id)
{
$skill_id = (int) $skill_id;
$sql = "SELECT g.* FROM {$this->table_gradebook} g
INNER JOIN {$this->table_skill_rel_gradebook} sg
- 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 $parent_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $new_family_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $family_items is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $max_depth is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $load_user_data is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $relation_exists is not named in camelCase. Open
public function edit(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $my_skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_info2 is not named in camelCase. Open
public function getDirectParents($skillId)
{
$skillRelSkill = new SkillRelSkillModel();
$skills = $skillRelSkill->getDirectParents($skillId, true);
if (!empty($skills)) {
- 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 $gradebook_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_rel_user is not named in camelCase. Open
public function addSkillToUser(
$userId,
GradebookCategory $category,
$courseId,
$sessionId
- 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 $parent_id is not named in camelCase. Open
public function edit(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $simple_tree is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $skill_rel_user is not named in camelCase. Open
public function addSkillToUser(
$userId,
GradebookCategory $category,
$courseId,
$sessionId
- 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 $family_items is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $main_family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $simple_tree is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $load_user_data is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_info2 is not named in camelCase. Open
public function getDirectParents($skillId)
{
$skillRelSkill = new SkillRelSkillModel();
$skills = $skillRelSkill->getDirectParents($skillId, true);
if (!empty($skills)) {
- 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 $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skills_tree is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skills_tree is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $new_family_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $family_items is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $return_flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_depth is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- 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 $skill_id is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parent_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $simple_sub_tree is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- 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 $skill_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $relation_exists is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $gradebook_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $new_family_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $original_skill is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skills_tree is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $simple_sub_tree is not named in camelCase. Open
public function getSkillToJson($subtree, $depth = 1, $max_depth = 2)
{
$simple_sub_tree = [];
if (is_array($subtree)) {
$counter = 1;
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $add_root is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $new_family_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_info2 is not named in camelCase. Open
public function getDirectParents($skillId)
{
$skillRelSkill = new SkillRelSkillModel();
$skills = $skillRelSkill->getDirectParents($skillId, true);
if (!empty($skills)) {
- 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 $relation_exists is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $parent_id is not named in camelCase. Open
public function edit(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $original_skill is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $flat_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $return_flat_array is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- 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 $parent_id is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $simple_tree is not named in camelCase. Open
public function getSkillsTreeToJson(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$main_depth = 2
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getUserSkillRanking($user_id)
{
$user_id = (int) $user_id;
$sql = "SELECT count(skill_id) count
FROM {$this->table} s
- 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 $id_condition is not named in camelCase. Open
public function getAllSkills(
$load_user_data = false,
$user_id = false,
$id = null,
$parent_id = null
- 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 $skill_id is not named in camelCase. Open
public function getGradebooksBySkill($skill_id)
{
$skill_id = (int) $skill_id;
$sql = "SELECT g.* FROM {$this->table_gradebook} g
INNER JOIN {$this->table_skill_rel_gradebook} sg
- 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 $relation_exists is not named in camelCase. Open
public function edit(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $main_family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $family_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getChildren($skill_id, $load_user_data = false)
{
$skillRelSkill = new SkillRelSkillModel();
if ($load_user_data) {
$user_id = api_get_user_id();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $parent_id is not named in camelCase. Open
public function add(array $params)
{
if (empty($params['parent_id'])) {
$params['parent_id'] = 1;
}
- 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 $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skill_id is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $new_family_array is not named in camelCase. Open
public function getSkillsTree(
$user_id = null,
$skill_id = null,
$return_flat_array = false,
$add_root = false
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $where_condition is not named in camelCase. Open
public function getUserListSkillRanking(
$start,
$limit,
$sidx,
$sord,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getUserSkillRanking($user_id)
{
$user_id = (int) $user_id;
$sql = "SELECT count(skill_id) count
FROM {$this->table} s
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
public function getUserSkillRanking($user_id)
{
$user_id = (int) $user_id;
$sql = "SELECT count(skill_id) count
FROM {$this->table} s
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method get_parents is not named in camelCase. Open
public function get_parents($skillId)
{
$skillRelSkill = new SkillRelSkillModel();
$skills = $skillRelSkill->getSkillParents($skillId, true);
foreach ($skills as &$skill) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}