midasplatform/Midas

View on GitHub
core/controllers/ImportController.php

Summary

Maintainability
D
1 day
Test Coverage

importAction accesses the super-global variable $_POST.
Open

    public function importAction()
    {
        $this->requireAdminPrivileges();

        // This is necessary in order to avoid session lock and being able to run two
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

importAction accesses the super-global variable $_POST.
Open

    public function importAction()
    {
        $this->requireAdminPrivileges();

        // This is necessary in order to avoid session lock and being able to run two
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Function _recursiveParseDirectory has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Minor
Found in core/controllers/ImportController.php - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method _recursiveParseDirectory has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Major
Found in core/controllers/ImportController.php - About 3 hrs to fix

Method importAction has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function importAction()
    {
        $this->requireAdminPrivileges();

        // This is necessary in order to avoid session lock and being able to run two
Severity: Minor
Found in core/controllers/ImportController.php - About 1 hr to fix

Function importAction has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function importAction()
    {
        $this->requireAdminPrivileges();

        // This is necessary in order to avoid session lock and being able to run two
Severity: Minor
Found in core/controllers/ImportController.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _recursiveCountFiles has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function _recursiveCountFiles($path)
    {
        $initialcount = 0;
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
Severity: Minor
Found in core/controllers/ImportController.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid too many return statements within this method.
Open

        return false;
Severity: Major
Found in core/controllers/ImportController.php - About 30 mins to fix

The method _recursiveParseDirectory() has an NPath complexity of 289. The configured NPath complexity threshold is 200.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Minor
Found in core/controllers/ImportController.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 _recursiveParseDirectory() has 113 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

The method _recursiveParseDirectory() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

                $progress['current'] = $progressfile[0];
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

                $progress['max'] = $progressfile[1];
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

                $progress['percent'] = round($progress['current'] * 100 / $progress['max']);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

                $progress['percent'] = round($progress['current'] * 100 / $progress['max']);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

            $progress['max'] = 0;
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

            echo json_encode($progress);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

            $progress['current'] = 0;
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

            $progress['percent'] = 'NA';
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$progress' which will lead to PHP notices.
Open

                $progress['percent'] = round($progress['current'] * 100 / $progress['max']);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Missing class import via use statement (line '166', column '34').
Open

                    $child = new FolderDao();
Severity: Minor
Found in core/controllers/ImportController.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 '183', column '33').
Open

                    $item = new ItemDao();
Severity: Minor
Found in core/controllers/ImportController.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 '81', column '19').
Open

        $it = new DirectoryIterator($path);
Severity: Minor
Found in core/controllers/ImportController.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 '128', column '19').
Open

        $it = new DirectoryIterator($path);
Severity: Minor
Found in core/controllers/ImportController.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 '218', column '41').
Open

                    $bitstreamDao = new BitstreamDao();
Severity: Minor
Found in core/controllers/ImportController.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 '300', column '31').
Open

            $currentdir = new FolderDao();
Severity: Minor
Found in core/controllers/ImportController.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 '211', column '44').
Open

                    $itemRevisionDao = new ItemRevisionDao();
Severity: Minor
Found in core/controllers/ImportController.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 _recursiveParseDirectory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else { // We have a file
                $this->_incrementFileProcessed();
                $newrevision = true;
                $item = $this->Folder->getItemByName($currentdir, $fileInfo->getFilename());
                if (!$item) {
Severity: Minor
Found in core/controllers/ImportController.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 importAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    echo json_encode(
                        array(
                            'error' => $this->t(
                                'Problem occured while importing. '.'Check the log files or contact an '.'administrator.'
Severity: Minor
Found in core/controllers/ImportController.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 using static access to class 'UtilityComponent' in method 'indexAction'.
Open

        UtilityComponent::setTimeLimit(0);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class 'UtilityComponent' in method '_recursiveParseDirectory'.
Open

                    $curMD5 = UtilityComponent::md5file($fileInfo->getPathName());
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

The method _recursiveCountFiles uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                ++$initialcount;
            }
Severity: Minor
Found in core/controllers/ImportController.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 using static access to class 'UtilityComponent' in method 'importAction'.
Open

            UtilityComponent::safedelete($this->progressfile);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class 'UtilityComponent' in method 'importAction'.
Open

            UtilityComponent::safedelete($this->stopfile);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid excessively long variable names like $importemptydirectories. Keep variable name length under 20.
Open

    private $importemptydirectories = true;
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class ImportController extends AppController

The property $_forms is not named in camelCase.
Open

class ImportController extends AppController
{
    public $_models = array(
        'Item',
        'Folder',
Severity: Minor
Found in core/controllers/ImportController.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

Avoid variables with short names like $it. Configured minimum length is 3.
Open

        $it = new DirectoryIterator($path);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The property $_models is not named in camelCase.
Open

class ImportController extends AppController
{
    public $_models = array(
        'Item',
        'Folder',
Severity: Minor
Found in core/controllers/ImportController.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 property $_daos is not named in camelCase.
Open

class ImportController extends AppController
{
    public $_models = array(
        'Item',
        'Folder',
Severity: Minor
Found in core/controllers/ImportController.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 property $_components is not named in camelCase.
Open

class ImportController extends AppController
{
    public $_models = array(
        'Item',
        'Folder',
Severity: Minor
Found in core/controllers/ImportController.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

Avoid variables with short names like $it. Configured minimum length is 3.
Open

        $it = new DirectoryIterator($path);
Severity: Minor
Found in core/controllers/ImportController.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Method name "_recursiveCountFiles" should not be prefixed with an underscore to indicate visibility
Open

    private function _recursiveCountFiles($path)

Method name "_checkStopImport" should not be prefixed with an underscore to indicate visibility
Open

    private function _checkStopImport()

Property name "$_daos" should not be prefixed with an underscore to indicate visibility
Open

    public $_daos = array('Item', 'Folder', 'ItemRevision', 'Bitstream', 'Assetstore');

Property name "$_forms" should not be prefixed with an underscore to indicate visibility
Open

    public $_forms = array('Import', 'Assetstore');

Method name "_incrementFileProcessed" should not be prefixed with an underscore to indicate visibility
Open

    private function _incrementFileProcessed()

Method name "_recursiveParseDirectory" should not be prefixed with an underscore to indicate visibility
Open

    private function _recursiveParseDirectory($path, $currentdir)

Property name "$_models" should not be prefixed with an underscore to indicate visibility
Open

    public $_models = array(

Property name "$_components" should not be prefixed with an underscore to indicate visibility
Open

    public $_components = array('Upload', 'Utility');

Line exceeds 120 characters; contains 121 characters
Open

                                'Problem occured while importing. '.'Check the log files or contact an '.'administrator.'

The method _checkStopImport is not named in camelCase.
Open

    private function _checkStopImport()
    {
        // maybe we should check for the content of the file but not necessary
        if (file_exists($this->stopfile)) {
            return true;
Severity: Minor
Found in core/controllers/ImportController.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 _recursiveParseDirectory is not named in camelCase.
Open

    private function _recursiveParseDirectory($path, $currentdir)
    {
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
            if ($fileInfo->isDot()) {
Severity: Minor
Found in core/controllers/ImportController.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 _recursiveCountFiles is not named in camelCase.
Open

    private function _recursiveCountFiles($path)
    {
        $initialcount = 0;
        $it = new DirectoryIterator($path);
        foreach ($it as $fileInfo) {
Severity: Minor
Found in core/controllers/ImportController.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 _incrementFileProcessed is not named in camelCase.
Open

    private function _incrementFileProcessed()
    {
        ++$this->nfilesprocessed;
        $percent = ($this->nfilesprocessed / $this->ntotalfiles) * 100;
        $count = 2; // every 2%
Severity: Minor
Found in core/controllers/ImportController.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