midasplatform/Midas

View on GitHub
core/controllers/AdminController.php

Summary

Maintainability
F
3 days
Test Coverage

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

migratemidas2Action accesses the super-global variable $_POST.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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

serversidefilechooserAction accesses the super-global variable $_POST.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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 indexAction has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
Open

    public function indexAction()
    {
        $this->requireAdminPrivileges();
        $this->view->header = 'Administration';

Severity: Minor
Found in core/controllers/AdminController.php - About 1 day 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 indexAction has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function indexAction()
    {
        $this->requireAdminPrivileges();
        $this->view->header = 'Administration';

Severity: Major
Found in core/controllers/AdminController.php - About 5 hrs to fix

File AdminController.php has 349 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*=========================================================================
 Midas Server
 Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
 All rights reserved.
Severity: Minor
Found in core/controllers/AdminController.php - About 4 hrs to fix

The class AdminController has an overall complexity of 64 which is very high. The configured complexity threshold is 50.
Open

class AdminController extends AppController
{
    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');
    public $_daos = array();
    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
Severity: Minor
Found in core/controllers/AdminController.php by phpmd

Function serversidefilechooserAction has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.php - About 3 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 migratemidas2Action has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.php - About 1 hr to fix

Method serversidefilechooserAction has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.php - About 1 hr to fix

Method upgradeAction has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function upgradeAction()
    {
        $this->requireAdminPrivileges();
        $this->disableLayout();

Severity: Minor
Found in core/controllers/AdminController.php - About 1 hr to fix

Function upgradeAction has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function upgradeAction()
    {
        $this->requireAdminPrivileges();
        $this->disableLayout();

Severity: Minor
Found in core/controllers/AdminController.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 migratemidas2Action has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

The method indexAction() has an NPath complexity of 406980. The configured NPath complexity threshold is 200.
Open

    public function indexAction()
    {
        $this->requireAdminPrivileges();
        $this->view->header = 'Administration';

Severity: Minor
Found in core/controllers/AdminController.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 indexAction() has 166 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function indexAction()
    {
        $this->requireAdminPrivileges();
        $this->view->header = 'Administration';

Severity: Minor
Found in core/controllers/AdminController.php by phpmd

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

    public function indexAction()
    {
        $this->requireAdminPrivileges();
        $this->view->header = 'Administration';

Severity: Minor
Found in core/controllers/AdminController.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

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

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

        $this->_helper->layout->disableLayout();
Severity: Minor
Found in core/controllers/AdminController.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 '$core' which will lead to PHP notices.
Open

        $core['current'] = UtilityComponent::getCurrentModuleVersion('core');
Severity: Minor
Found in core/controllers/AdminController.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 '$core' which will lead to PHP notices.
Open

        $this->view->core = $core;
Severity: Minor
Found in core/controllers/AdminController.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 '$core' which will lead to PHP notices.
Open

        $core['target'] = UtilityComponent::getLatestModuleVersion('core');
Severity: Minor
Found in core/controllers/AdminController.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 '293', column '23').
Open

            throw new Zend_Exception('Core version is undefined.');
Severity: Minor
Found in core/controllers/AdminController.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 '272', column '23').
Open

            throw new Zend_Exception('Invalid model parameter for remove orphans');
Severity: Minor
Found in core/controllers/AdminController.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 serversidefilechooserAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            echo 'File '.$_POST['dir']." doesn't exist";
        }
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

        $core['target'] = UtilityComponent::getLatestModuleVersion('core');
Severity: Minor
Found in core/controllers/AdminController.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 'indexAction'.
Open

                $assetstores[$key]->freeSpace = UtilityComponent::diskFreeSpace($assetstore->getPath());
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'taskAction'.
Open

            $params = JsonComponent::decode($params);
Severity: Minor
Found in core/controllers/AdminController.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 'Zend_Registry' in method 'indexAction'.
Open

        $enabledModules = Zend_Registry::get('modulesEnable');
Severity: Minor
Found in core/controllers/AdminController.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 'indexAction'.
Open

                $assetstores[$key]->totalSpace = UtilityComponent::diskTotalSpace($assetstore->getPath());
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $allModules[$key]->dbOk = false;
            }
Severity: Minor
Found in core/controllers/AdminController.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 upgradeAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                echo JsonComponent::encode(array(false, 'Nothing to upgrade'));
            }
Severity: Minor
Found in core/controllers/AdminController.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 serversidefilechooserAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $files[] = '/';
        }
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'upgradeAction'.
Open

                echo JsonComponent::encode(array(true, 'Upgraded'));
Severity: Minor
Found in core/controllers/AdminController.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 taskAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $params = array();
        }
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

                $currentModuleVersion = UtilityComponent::getCurrentModuleVersion($key);
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

            $modules[$key]['current'] = UtilityComponent::getCurrentModuleVersion($key);
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $allModules[$key]->configPage = false;
            }
Severity: Minor
Found in core/controllers/AdminController.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 'Zend_Registry' in method 'upgradeAction'.
Open

        $modulesConfig = Zend_Registry::get('configsModules');
Severity: Minor
Found in core/controllers/AdminController.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 'Zend_Registry' in method 'upgradeAction'.
Open

        $db = Zend_Registry::get('dbAdapter');
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

        $version = UtilityComponent::getCurrentModuleVersion('core');
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'indexAction'.
Open

                echo JsonComponent::encode(array(true, 'Changes saved'));
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'upgradeAction'.
Open

                echo JsonComponent::encode(array(false, 'Nothing to upgrade'));
Severity: Minor
Found in core/controllers/AdminController.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 serversidefilechooserAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        // not a directory: a file!
                        $ext = preg_replace('/^.*\./', '', $file);
                        echo '<li class="file ext_'.$ext.'"><a href="#" rel="'.htmlspecialchars(
                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'integritycheckAction'.
Open

        echo JsonComponent::encode(
            array(
                'nOrphanedFolders' => $nOrphanedFolders,
                'nOrphanedItems' => $nOrphanedItems,
                'nOrphanedRevisions' => $nOrphanedRevisions,
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $assetstores[$key]->totalSpaceText = false;
            }
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'indexAction'.
Open

                echo JsonComponent::encode(array(true, 'Changes saved'));
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $assetstores[$key]->default = false;
            }
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

            $modules[$key]['target'] = UtilityComponent::getLatestModuleVersion($key);
Severity: Minor
Found in core/controllers/AdminController.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 'JsonComponent' in method 'removeorphansAction'.
Open

        echo JsonComponent::encode(array('status' => 'ok', 'message' => $model.' resources cleaned'));
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $category = ucfirst($module->category);
            }
Severity: Minor
Found in core/controllers/AdminController.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 indexAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                ++$countModules[$category]['hidden'];
            }
Severity: Minor
Found in core/controllers/AdminController.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 'upgradeAction'.
Open

        $core['current'] = UtilityComponent::getCurrentModuleVersion('core');
Severity: Minor
Found in core/controllers/AdminController.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 unused local variables such as '$l'.
Open

        foreach ($modulesList as $k => $l) {
Severity: Minor
Found in core/controllers/AdminController.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

TODO found
Open

        // TODO: number of orphaned thumbnail records?
Severity: Minor
Found in core/controllers/AdminController.php by fixme

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

        $moduleIntegrityChecks = Zend_Registry::get('notifier')->callback(
Severity: Minor
Found in core/controllers/AdminController.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 AdminController extends AppController

The property $_models is not named in camelCase.
Open

class AdminController extends AppController
{
    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');
    public $_daos = array();
    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
Severity: Minor
Found in core/controllers/AdminController.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 AdminController extends AppController
{
    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');
    public $_daos = array();
    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
Severity: Minor
Found in core/controllers/AdminController.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 $db. Configured minimum length is 3.
Open

        $db = Zend_Registry::get('dbAdapter');
Severity: Minor
Found in core/controllers/AdminController.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 $_daos is not named in camelCase.
Open

class AdminController extends AppController
{
    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');
    public $_daos = array();
    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
Severity: Minor
Found in core/controllers/AdminController.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 $_forms is not named in camelCase.
Open

class AdminController extends AppController
{
    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');
    public $_daos = array();
    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
Severity: Minor
Found in core/controllers/AdminController.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

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

    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');

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

    public $_daos = array();

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

    public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');

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

    public $_forms = array('Admin', 'Assetstore', 'Migrate');

Only one argument is allowed per line in a multi-line function call
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Only one argument is allowed per line in a multi-line function call
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Only one argument is allowed per line in a multi-line function call
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Only one argument is allowed per line in a multi-line function call
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Line exceeds 120 characters; contains 129 characters
Open

        $formArray['allow_password_reset']->setValue((int) $this->Setting->getValueByNameWithDefault('allow_password_reset', 0));

Line exceeds 120 characters; contains 121 characters
Open

    public $_models = array('Assetstore', 'Bitstream', 'Item', 'ItemRevision', 'Folder', 'License', 'Module', 'Setting');

Line exceeds 120 characters; contains 125 characters
Open

        $formArray['close_registration']->setValue((int) $this->Setting->getValueByNameWithDefault('close_registration', 1));

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ).'/">'.htmlspecialchars($file, ENT_QUOTES, 'UTF-8').'</a></li>';

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                ) - 1] == '/'

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    )

Multi-line function call not indented correctly; expected 24 spaces but found 28
Open

                            ).'">'.htmlspecialchars($file, ENT_QUOTES, 'UTF-8').'</a></li>';

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                $_POST['dir'].$file, ENT_QUOTES, 'UTF-8'

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    $midas2_assetstore

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        $_POST['dir'].$file

The variable $midas2_user is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_password is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_hostname is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_port is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_database is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_hostname is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_database is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_port is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas3_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_password is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas2_user is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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 $midas3_assetstore is not named in camelCase.
Open

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

        $this->assetstores = $this->Assetstore->getAll();
Severity: Minor
Found in core/controllers/AdminController.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

There are no issues that match your filters.

Category
Status