chamilo/chamilo-lms

View on GitHub
public/main/lp/scorm.class.php

Summary

Maintainability
A
0 mins
Test Coverage

The method scorm::import_package() calls the typical debug function print_r() which is mostly only used during development.
Open

                'In scorm::import_package('.print_r($zipFileInfo, true).',"'.$currentDir.'") method'
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

The method parse_manifest() has an NPath complexity of 1321. The configured NPath complexity threshold is 200.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 reimport_manifest() has an NPath complexity of 448. The configured NPath complexity threshold is 200.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 import_manifest() has an NPath complexity of 1540. The configured NPath complexity threshold is 200.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 import_package() has an NPath complexity of 2304. The configured NPath complexity threshold is 200.
Open

    public function import_package(
        $zipFileInfo,
        $currentDir = '',
        $courseInfo = [],
        $updateDirContents = false,
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 scorm has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
Open

class scorm extends learnpath
{
    public $manifest = [];
    public $resources = [];
    public $resources_att = [];
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '129', column '59').
Open

                                    $this->metadata = new scormMetadata('manifest', $child);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '671', column '27').
Open

        $zip_folder = new PclZip($zipfilename);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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

Remove error control operator '@' on line 696.
Open

    public function get_res_path($id)
    {
        if ($this->debug > 0) {
            error_log('In scorm::get_res_path('.$id.') method');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Missing class import via use statement (line '169', column '70').
Open

                                                $oOrganization = new scormOrganization(
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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

Remove error control operator '@' on line 314.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Missing class import via use statement (line '204', column '62').
Open

                                            $oResource = new scormResource('manifest', $res_node);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 reimport_manifest uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if ($this->debug > 0) {
                error_log('In scorm::reimport_manifest() - Could not find manifest file at '.$manifest_file);
            }
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 export_zip uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $id = $this->get_id();
                if (empty($id)) {
                    return false;
                } else {
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 import_manifest uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    // Otherwise save the max score.
                    $max_score = "'$max_score'";
                }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 export_zip uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $lp_id = $this->get_id();
                }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 parse_manifest uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $this->set_error_msg("File could not be read");

            return null;
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 import_package uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    if ($this->debug) {
                        error_log("subdir is now ".$this->subdir);
                    }
                }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 parameters such as '$id'.
Open

    public function open($id)
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$courseInfo'.
Open

        $courseInfo = [],
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$lpToCheck'.
Open

        $lpToCheck = null,
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$allowHtaccess'.
Open

        $allowHtaccess = false
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$found_an_org'.
Open

                                    $found_an_org = false;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$dummy'.
Open

        foreach ($this->organizations as $id => $dummy) {
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$outdated_parent'.
Open

                        $outdated_parent = array_pop($parents_stack);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$value'.
Open

            foreach ($this->organizations as $id => $value) {
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$manifest'.
Open

            $manifest = $this->parse_manifest($manifest_file);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$imsmanifest_path'.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$realFileSize'.
Open

        $realFileSize = 0;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$lpItemTable'.
Open

        $lpItemTable = Database::get_course_table(TABLE_LP_ITEM);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$item_id'.
Open

                $item_id = $lpItem->getIid();
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 '$updateDirContents'.
Open

        $updateDirContents = false,
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 property $manifest_encoding is not named in camelCase.
Open

class scorm extends learnpath
{
    public $manifest = [];
    public $resources = [];
    public $resources_att = [];
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $course_info is not named in camelCase.
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)
    {
        $this->items = [];
        $this->subdir = '';
        $this->manifestToString = '';
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 property $resources_att is not named in camelCase.
Open

class scorm extends learnpath
{
    public $manifest = [];
    public $resources = [];
    public $resources_att = [];
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $user_id is not named in camelCase.
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)
    {
        $this->items = [];
        $this->subdir = '';
        $this->manifestToString = '';
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 class scorm is not named in CamelCase.
Open

class scorm extends learnpath
{
    public $manifest = [];
    public $resources = [];
    public $resources_att = [];
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

The property $organizations_att is not named in camelCase.
Open

class scorm extends learnpath
{
    public $manifest = [];
    public $resources = [];
    public $resources_att = [];
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $file_path is not named in camelCase.
Open

    public function import_local_package($file_path, $currentDir = '')
    {
        // TODO: Prepare info as given by the $_FILES[''] vector.
        $fileInfo = [];
        $fileInfo['tmp_name'] = $file_path;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 $lp_id is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 $imsmanifest_path is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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 $lp_id is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

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

Member variable "resources_att" is not in valid camel caps format
Open

    public $resources_att = [];

Missing parameter name
Open

     * @param    int    Learnpath ID in DB

Member variable "manifest_encoding" is not in valid camel caps format
Open

    public $manifest_encoding = 'UTF-8';

Missing parameter name
Open

     * @param    string    Course code

Member variable "organizations_att" is not in valid camel caps format
Open

    public $organizations_att = [];

Variable "user_id" is not in valid camel caps format
Open

        parent::__construct($entity, $course_info, $user_id);

Variable "orgs_attr" is not in valid camel caps format
Open

                                                    $this->organizations_att[$orgs_attr->name] = $orgs_attr->value;

Variable "manifest_file" is not in valid camel caps format
Open

            $manifest = $this->parse_manifest($manifest_file);

Spaces must be used for alignment; tabs are not allowed
Open

     * @param    string    Path to the imsmanifest.xml file on the system.

Variable "manifest_encoding" is not in valid camel caps format
Open

                error_log('Called  (encoding:'.$this->manifest_encoding.' - saved: '.$this->manifest_encoding.')', 0);

Variable "orgs_attribs" is not in valid camel caps format
Open

                                    foreach ($orgs_attribs as $orgs_attrib) {

Variable "organizations_attributes" is not in valid camel caps format
Open

                                                foreach ($organizations_attributes as $orgs_attr) {

Variable "parents_stack" is not in valid camel caps format
Open

            $parents_stack = [0];

Variable "parents_stack" is not in valid camel caps format
Open

                    array_push($parents_stack, $parent);

Variable "max_score" is not in valid camel caps format
Open

                $max_score = (int) $item['max_score'];

Variable "max_score" is not in valid camel caps format
Open

                    $max_score = "'$max_score'";

Variable "test_string" is not in valid camel caps format
Open

            $test_string = $xml;

Variable "found_an_org" is not in valid camel caps format
Open

                                    $found_an_org = false;

Variable "res_node" is not in valid camel caps format
Open

                                        foreach ($resources_nodes as $res_node) {

Variable "max_score" is not in valid camel caps format
Open

                    $max_score = "'$max_score'";

Expected 51 spaces after parameter type; 1 found
Open

     * @param string $courseCode

Variable "lp_table" is not in valid camel caps format
Open

        $lp_table = Database::get_course_table(TABLE_LP_MAIN);

Variable "manifest_file" is not in valid camel caps format
Open

        if (is_file($manifest_file) && is_readable($manifest_file)) {

Spaces must be used for alignment; tabs are not allowed
Open

     * @param    string    Path to the imsmanifest.xml file on the system.

Variable "manifest_encoding" is not in valid camel caps format
Open

            $xml = api_utf8_encode_xml($xml, $this->manifest_encoding);

Variable "manifest_file" is not in valid camel caps format
Open

                error_log('In scorm::reimport_manifest() - Parsing manifest '.$manifest_file);

Variable "manifest_encoding" is not in valid camel caps format
Open

                error_log('Called  (encoding:'.$this->manifest_encoding.' - saved: '.$this->manifest_encoding.')', 0);

Variable "declared_encoding" is not in valid camel caps format
Open

            $declared_encoding = api_refine_encoding_id($matches[1]);

Variable "organizations_att" is not in valid camel caps format
Open

                                                    $this->organizations_att[$orgs_attr->name] = $orgs_attr->value;

Variable "resources_attribs" is not in valid camel caps format
Open

                                        $resources_attribs = $child->attributes;

Variable "res_attr" is not in valid camel caps format
Open

                                                $this->manifest['resources'][$res_attr->name] = $res_attr->value;

Variable "parents_stack" is not in valid camel caps format
Open

                    array_push($parents_stack, $previous);

Missing parameter name
Open

     * @param int    LP ID (in database)

Method name "scorm::reimport_manifest" is not in camel caps format
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')

Variable "res_node" is not in valid camel caps format
Open

                                            $oResource = new scormResource('manifest', $res_node);

Variable "lp_id" is not in valid camel caps format
Open

            $this->lp_id = $lp_id;

Variable "manifest_encoding" is not in valid camel caps format
Open

                ->setDefaultEncoding($this->manifest_encoding)

Variable "max_score" is not in valid camel caps format
Open

                        $max_score = 100;

Variable "lp_id" is not in valid camel caps format
Open

            error_log('In scorm::export_zip method('.$lp_id.')');

Method name "scorm::get_res_path" is not in camel caps format
Open

    public function get_res_path($id)

Variable "manifest_file" is not in valid camel caps format
Open

            $manifest_file = api_get_path(SYS_COURSE_PATH).$courseInfo['directory'].'/scorm/imsmanifest.xml';

Variable "user_id" is not in valid camel caps format
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)

Variable "orgs_nodes" is not in valid camel caps format
Open

                                    $orgs_nodes = $child->childNodes;

Variable "manifest_encoding" is not in valid camel caps format
Open

            $this->manifest_encoding = self::detect_manifest_encoding($xml);

Variable "max_score" is not in valid camel caps format
Open

                if (0 === $max_score) {

Variable "max_score" is not in valid camel caps format
Open

                    $max_score = 'NULL';

Missing parameter name
Open

     * @param int    Learnpath ID (optional, taken from object context if not defined)

Variable "lp_id" is not in valid camel caps format
Open

    public function export_zip($lp_id = null)

Variable "tbl_lp" is not in valid camel caps format
Open

        $sql = "SELECT * FROM $tbl_lp WHERE iid = $lp_id";

Method name "scorm::export_zip" is not in camel caps format
Open

    public function export_zip($lp_id = null)

Variable "lp_id" is not in valid camel caps format
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')

Variable "tbl_lp" is not in valid camel caps format
Open

        $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);

Variable "prevent_reinit" is not in valid camel caps format
Open

            $this->prevent_reinit = $row['prevent_reinit'];

Variable "zip_folder" is not in valid camel caps format
Open

        $zip_folder->create($scormfoldername.'/', PCLZIP_OPT_REMOVE_PATH, $scormfoldername.'/');

Method name "scorm::get_title" is not in camel caps format
Open

    public function get_title()

Variable "manifest_file" is not in valid camel caps format
Open

                error_log('In scorm::reimport_manifest() - Could not find manifest file at '.$manifest_file);

Variable "declared_encoding" is not in valid camel caps format
Open

            return $declared_encoding;

Variable "test_string" is not in valid camel caps format
Open

        if (empty($test_string)) {

Variable "scorm_debug" is not in valid camel caps format
Open

            $this->scorm_debug = $row['debug'];

Missing parameter name
Open

     * @param    int    User ID

Variable "organizations_attributes" is not in valid camel caps format
Open

                                                $organizations_attributes = $orgnode->attributes;

Method name "scorm::import_manifest" is not in camel caps format
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)

Variable "lp_id" is not in valid camel caps format
Open

            $lp_id = $lp->getIid();

Missing parameter name
Open

     * @param  string    Current path (optional)

Variable "lp_id" is not in valid camel caps format
Open

        if (empty($lp_id)) {

Variable "zip_folder" is not in valid camel caps format
Open

        $zip_folder = new PclZip($zipfilename);

Spaces must be used for alignment; tabs are not allowed
Open

     * @param string    Manifest file path (optional if lp_id defined)

Variable "lp_id" is not in valid camel caps format
Open

            $this->lp_id = $lp_id;

Variable "js_lib" is not in valid camel caps format
Open

            $this->js_lib = $row['js_lib'];

Variable "declared_encoding" is not in valid camel caps format
Open

        if (!empty($declared_encoding)) {

Variable "test_string" is not in valid camel caps format
Open

            $test_string = implode("\n", $matches[1]);

Variable "orgs_attrib" is not in valid camel caps format
Open

                                            $this->manifest['organizations'][$orgs_attrib->name] = $orgs_attrib->value;

Variable "res_attr" is not in valid camel caps format
Open

                                            if (XML_ATTRIBUTE_NODE == $res_attr->type) {

Variable "res_attr" is not in valid camel caps format
Open

                                                $this->manifest['resources'][$res_attr->name] = $res_attr->value;

Variable "lp_id" is not in valid camel caps format
Open

                    $lp_id = $this->get_id();

Variable "orgs_attrib" is not in valid camel caps format
Open

                                    foreach ($orgs_attribs as $orgs_attrib) {

Missing parameter name
Open

     * @param    string    Resource ID as used in resource array

Variable "orgs_attrib" is not in valid camel caps format
Open

                                        if (XML_ATTRIBUTE_NODE == $orgs_attrib->nodeType) {

Variable "lp_id" is not in valid camel caps format
Open

        $sql = "SELECT * FROM $lp_table WHERE iid = $lp_id";

Variable "resources_nodes" is not in valid camel caps format
Open

                                        $resources_nodes = $child->childNodes;

Variable "parents_stack" is not in valid camel caps format
Open

                        $outdated_parent = array_pop($parents_stack);

Variable "lp_id" is not in valid camel caps format
Open

                $parentEntity = $lpItemRepo->getRootItem($lp_id);

Missing parameter name
Open

     * @param  string    Path to the zip file, from the sys root

Variable "manifest_file" is not in valid camel caps format
Open

        if (is_file($manifest_file) && is_readable($manifest_file)) {

Variable "manifest_file" is not in valid camel caps format
Open

                error_log('In scorm::reimport_manifest() - Importing manifest '.$manifest_file);

Variable "declared_encoding" is not in valid camel caps format
Open

        $declared_encoding = '';

Variable "orgs_attrib" is not in valid camel caps format
Open

                                            $this->manifest['organizations'][$orgs_attrib->name] = $orgs_attrib->value;

Variable "resources_nodes" is not in valid camel caps format
Open

                                        foreach ($resources_nodes as $res_node) {

Variable "file_path" is not in valid camel caps format
Open

        $fileInfo['tmp_name'] = $file_path;

Missing parameter name
Open

     * @param  string    Resource ID as used in resource array

Variable "lp_id" is not in valid camel caps format
Open

        $lp_id = intval($lp_id);

Method name "scorm::detect_manifest_encoding" is not in camel caps format
Open

    private function detect_manifest_encoding(&$xml)

Missing parameter name
Open

     * @param    string    Path to the imsmanifest.xml file on the system.

Variable "max_score" is not in valid camel caps format
Open

                    ->setMaxScore($max_score)

Method name "scorm::import_package" is not in camel caps format
Open

    public function import_package(

Variable "lp_id" is not in valid camel caps format
Open

        $sql = "SELECT * FROM $tbl_lp WHERE iid = $lp_id";

Spaces must be used for alignment; tabs are not allowed
Open

     * @param int    LP ID (in database)

Variable "force_commit" is not in valid camel caps format
Open

                    $this->force_commit = true;

Variable "test_string" is not in valid camel caps format
Open

            $test_string .= "\n".implode("\n", $matches[1]);

Variable "course_info" is not in valid camel caps format
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)

Method name "scorm::parse_manifest" is not in camel caps format
Open

    public function parse_manifest()

Variable "found_an_org" is not in valid camel caps format
Open

                                        $found_an_org = false;

Variable "orgs_attr" is not in valid camel caps format
Open

                                                foreach ($organizations_attributes as $orgs_attr) {

Spaces must be used for alignment; tabs are not allowed
Open

     * @param    string    Resource ID as used in resource array

Method name "scorm::get_res_type" is not in camel caps format
Open

    public function get_res_type($id)

Variable "lp_table" is not in valid camel caps format
Open

        $sql = "SELECT * FROM $lp_table WHERE iid = $lp_id";

Variable "manifest_file" is not in valid camel caps format
Open

        $manifest_file = api_get_path(SYS_COURSE_PATH).$courseInfo['directory'].'/scorm/'.$this->subdir.'/imsmanifest.xml';

Variable "course_info" is not in valid camel caps format
Open

        parent::__construct($entity, $course_info, $user_id);

Variable "orgs_attribs" is not in valid camel caps format
Open

                                    $orgs_attribs = $child->attributes;

Variable "parents_stack" is not in valid camel caps format
Open

                    $parent = array_pop($parents_stack); // Just save that value, then add it back.

Spaces must be used for alignment; tabs are not allowed
Open

     * @param    string    Resource ID as used in resource array

Variable "orgs_nodes" is not in valid camel caps format
Open

                                    foreach ($orgs_nodes as $orgnode) {

Variable "manifest_encoding" is not in valid camel caps format
Open

                                                    $this->manifest_encoding

Variable "resources_attribs" is not in valid camel caps format
Open

                                        foreach ($resources_attribs as $res_attr) {

Variable "item_id" is not in valid camel caps format
Open

                $item_id = $lpItem->getIid();

Method name "scorm::import_local_package" is not in camel caps format
Open

    public function import_local_package($file_path, $currentDir = '')

Variable "file_path" is not in valid camel caps format
Open

        $fileInfo['name'] = basename($file_path);

Missing parameter name
Open

     * @param string    Manifest file path (optional if lp_id defined)

Variable "lp_id" is not in valid camel caps format
Open

        $lp_id = intval($lp_id);

Variable "test_string" is not in valid camel caps format
Open

        $test_string = '';

Variable "test_string" is not in valid camel caps format
Open

        return api_detect_encoding($test_string);

Variable "orgs_attr" is not in valid camel caps format
Open

                                                    $this->organizations_att[$orgs_attr->name] = $orgs_attr->value;

Variable "res_attr" is not in valid camel caps format
Open

                                        foreach ($resources_attribs as $res_attr) {

Variable "outdated_parent" is not in valid camel caps format
Open

                        $outdated_parent = array_pop($parents_stack);

Variable "file_path" is not in valid camel caps format
Open

    public function import_local_package($file_path, $currentDir = '')

Variable "imsmanifest_path" is not in valid camel caps format
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')

Variable "manifest_file" is not in valid camel caps format
Open

        echo $manifest_file;

Class name "scorm" is not in camel caps format
Open

class scorm extends learnpath

The variable $orgs_attribs is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attrib is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)
    {
        $this->items = [];
        $this->subdir = '';
        $this->manifestToString = '';
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $organizations_attributes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attrib is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attribs is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_info is not named in camelCase.
Open

    public function __construct($entity = null, $course_info = null, $user_id = null)
    {
        $this->items = [];
        $this->subdir = '';
        $this->manifestToString = '';
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_nodes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attrib is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $organizations_attributes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attrib is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $found_an_org is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_nodes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $found_an_org is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPname is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_table is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $outdated_parent is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $tbl_lp is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $declared_encoding is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $resources_nodes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $declared_encoding is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $resources_attribs is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $parents_stack is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_course is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $declared_encoding is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $parents_stack is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $parents_stack is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_course is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_table is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $parents_stack is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $item_id is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $tbl_lp is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $declared_encoding is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_node is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_node is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_course is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPname is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $resources_nodes is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $manifest_file is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $res_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPnamesafe is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPnamesafe is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $orgs_attr is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_path is not named in camelCase.
Open

    public function import_local_package($file_path, $currentDir = '')
    {
        // TODO: Prepare info as given by the $_FILES[''] vector.
        $fileInfo = [];
        $fileInfo['tmp_name'] = $file_path;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $resources_attribs is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_path is not named in camelCase.
Open

    public function import_local_package($file_path, $currentDir = '')
    {
        // TODO: Prepare info as given by the $_FILES[''] vector.
        $fileInfo = [];
        $fileInfo['tmp_name'] = $file_path;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $zip_folder is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $zip_folder is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $parents_stack is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is 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_score is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $lp_id is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPnamesafe is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $LPnamesafe is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $test_string is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseVariableName

Since: 0.2

It 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 export_zip is not named in camelCase.
Open

    public function export_zip($lp_id = null)
    {
        if ($this->debug > 0) {
            error_log('In scorm::export_zip method('.$lp_id.')');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method import_package is not named in camelCase.
Open

    public function import_package(
        $zipFileInfo,
        $currentDir = '',
        $courseInfo = [],
        $updateDirContents = false,
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_res_type is not named in camelCase.
Open

    public function get_res_type($id)
    {
        if ($this->debug > 0) {
            error_log('In scorm::get_res_type('.$id.') method');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method import_local_package is not named in camelCase.
Open

    public function import_local_package($file_path, $currentDir = '')
    {
        // TODO: Prepare info as given by the $_FILES[''] vector.
        $fileInfo = [];
        $fileInfo['tmp_name'] = $file_path;
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method reimport_manifest is not named in camelCase.
Open

    public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '')
    {
        if ($this->debug > 0) {
            error_log('In scorm::reimport_manifest() method', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method detect_manifest_encoding is not named in camelCase.
Open

    private function detect_manifest_encoding(&$xml)
    {
        if (api_is_valid_utf8($xml)) {
            return 'UTF-8';
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_title is not named in camelCase.
Open

    public function get_title()
    {
        if ($this->debug > 0) {
            error_log('In scorm::get_title() method');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method import_manifest is not named in camelCase.
Open

    public function import_manifest($courseId, $userMaxScore = 1, $sessionId = 0)
    {
        if ($this->debug > 0) {
            error_log('Entered import_manifest('.$courseId.')', 0);
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method parse_manifest is not named in camelCase.
Open

    public function parse_manifest()
    {
        if ($this->manifestToString) {
            $xml = $this->manifestToString;
            // $this->manifest_encoding = api_detect_encoding_xml($xml);
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_res_path is not named in camelCase.
Open

    public function get_res_path($id)
    {
        if ($this->debug > 0) {
            error_log('In scorm::get_res_path('.$id.') method');
        }
Severity: Minor
Found in public/main/lp/scorm.class.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status