midasplatform/Midas

View on GitHub
core/controllers/FolderController.php

Summary

Maintainability
D
2 days
Test Coverage

Function createfolderAction has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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

File FolderController.php has 310 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/FolderController.php - About 3 hrs to fix

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

class FolderController extends AppController
{
    public $_models = array('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');
    public $_daos = array('Folder', 'Folder', 'Item');
    public $_components = array('Breadcrumb', 'Date');
Severity: Minor
Found in core/controllers/FolderController.php by phpmd

Method createfolderAction has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Major
Found in core/controllers/FolderController.php - About 2 hrs to fix

Function viewAction has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.php - About 2 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 viewAction has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Major
Found in core/controllers/FolderController.php - About 2 hrs to fix

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

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

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

Function editAction has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

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

Method deleteAction has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function deleteAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folder_id = $this->getParam('folderId');
Severity: Minor
Found in core/controllers/FolderController.php - About 1 hr to fix

Function removeitemAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.php - About 25 mins 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 javachildrenAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function javachildrenAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folderId = $this->getParam('id');
Severity: Minor
Found in core/controllers/FolderController.php - About 25 mins 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 deleteAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function deleteAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folder_id = $this->getParam('folderId');
Severity: Minor
Found in core/controllers/FolderController.php - About 25 mins 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 createfolderAction() has an NPath complexity of 240. The configured NPath complexity threshold is 200.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 createfolderAction() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 editAction() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

Severity: Minor
Found in core/controllers/FolderController.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 viewAction() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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

Missing class import via use statement (line '233', column '23').
Open

            throw new Zend_Exception('Invalid folderId', 404);
Severity: Minor
Found in core/controllers/FolderController.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 '49', column '23').
Open

            throw new Zend_Exception('Must pass id parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '23').
Open

            throw new Zend_Exception('Must specify an id parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '54', column '23').
Open

            throw new Zend_Exception('Must specify an id parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '115', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '129', column '27').
Open

                throw new Zend_Exception('This name is already used');
Severity: Minor
Found in core/controllers/FolderController.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 '302', column '23').
Open

            throw new Zend_Exception(MIDAS_ADMIN_PRIVILEGES_REQUIRED);
Severity: Minor
Found in core/controllers/FolderController.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 '166', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '253', column '23').
Open

            throw new Zend_Exception("The folder doesn't exist.");
Severity: Minor
Found in core/controllers/FolderController.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 '289', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '294', column '23').
Open

            throw new Zend_Exception("The folder doesn't exist.");
Severity: Minor
Found in core/controllers/FolderController.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 '299', column '23').
Open

            throw new Zend_Exception('Write permission on folder required');
Severity: Minor
Found in core/controllers/FolderController.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 '86', column '23').
Open

            throw new Zend_Exception('Invalid folderId', 404);
Severity: Minor
Found in core/controllers/FolderController.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 '251', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '323', column '23').
Open

            throw new Zend_Exception("The folder doesn't exist.");
Severity: Minor
Found in core/controllers/FolderController.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 '256', column '23').
Open

            throw new Zend_Exception('Permissions error.');
Severity: Minor
Found in core/controllers/FolderController.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 '164', column '23').
Open

            throw new Zend_Exception('Only HTTP Get requests are accepted', 400);
Severity: Minor
Found in core/controllers/FolderController.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 '296', column '23').
Open

            throw new Zend_Exception("The item doesn't exist.");
Severity: Minor
Found in core/controllers/FolderController.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 '62', column '23').
Open

            throw new Zend_Exception('Read permission required', 403);
Severity: Minor
Found in core/controllers/FolderController.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 '89', column '23').
Open

            throw new Zend_Exception('Read permission required', 403);
Severity: Minor
Found in core/controllers/FolderController.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 '261', column '23').
Open

            throw new Zend_Exception('Community Root Folder. You cannot delete it.');
Severity: Minor
Found in core/controllers/FolderController.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 '229', column '23').
Open

            throw new Zend_Exception('Must pass folderId parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '236', column '23').
Open

            throw new Zend_Exception('Admin permission required', 403);
Severity: Minor
Found in core/controllers/FolderController.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 '76', column '23').
Open

            throw new Zend_Exception('Must pass id parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '266', column '23').
Open

            throw new Zend_Exception('User Root Folder. You cannot delete it.');
Severity: Minor
Found in core/controllers/FolderController.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 '168', column '23').
Open

            throw new Zend_Exception("The folder doesn't exist.", 404);
Severity: Minor
Found in core/controllers/FolderController.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 '120', column '23').
Open

            throw new Zend_Exception('Permissions error.');
Severity: Minor
Found in core/controllers/FolderController.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 '292', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '59', column '23').
Open

            throw new Zend_Exception('Invalid folderId', 404);
Severity: Minor
Found in core/controllers/FolderController.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 '79', column '26').
Open

        $validator = new Zend_Validate_Digits();
Severity: Minor
Found in core/controllers/FolderController.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 '110', column '23').
Open

            throw new Zend_Exception('Must specify a folderId parameter');
Severity: Minor
Found in core/controllers/FolderController.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 '321', column '23').
Open

            throw new Zend_Exception('Please set the folderId.');
Severity: Minor
Found in core/controllers/FolderController.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 '52', column '26').
Open

        $validator = new Zend_Validate_Digits();
Severity: Minor
Found in core/controllers/FolderController.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 '117', column '23').
Open

            throw new Zend_Exception('The folder doesn t exist.');
Severity: Minor
Found in core/controllers/FolderController.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 '171', column '23').
Open

            throw new Zend_Exception('Invalid policy: no read access', 403);
Severity: Minor
Found in core/controllers/FolderController.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 '108', column '26').
Open

        $validator = new Zend_Validate_Digits();
Severity: Minor
Found in core/controllers/FolderController.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

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

                $items[$key]->size = UtilityComponent::formatSize($i->getSizebytes());
Severity: Minor
Found in core/controllers/FolderController.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 'createfolderAction'.
Open

                        echo JsonComponent::encode(array(false, $this->t('Error')));
Severity: Minor
Found in core/controllers/FolderController.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 'deleteAction'.
Open

        UtilityComponent::disableMemoryLimit();
Severity: Minor
Found in core/controllers/FolderController.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 'createfolderAction'.
Open

                    echo JsonComponent::encode(array(false, $this->t('Error: name parameter required')));
Severity: Minor
Found in core/controllers/FolderController.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 createfolderAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    // Check if folder with the same name already exists for the same parent
                    if ($this->Folder->getFolderExists($name, $folder)) {
                        echo JsonComponent::encode(array(false, $this->t('This name is already used')));

Severity: Minor
Found in core/controllers/FolderController.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 'createfolderAction'.
Open

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

        } else {
            $folders = $this->Folder->getChildrenFoldersFiltered($folder, $this->userSession->Dao, MIDAS_POLICY_READ);
            $items = $this->Folder->getItemsFiltered($folder, $this->userSession->Dao, MIDAS_POLICY_READ);
            foreach ($items as $key => $i) {
                $items[$key]->size = UtilityComponent::formatSize($i->getSizebytes());
Severity: Minor
Found in core/controllers/FolderController.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 'removeitemAction'.
Open

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

                    } else {
                        $policyGroup = $folder->getFolderpolicygroup();
                        $policyUser = $folder->getFolderpolicyuser();
                        foreach ($policyGroup as $policy) {
                            $group = $policy->getGroup();
Severity: Minor
Found in core/controllers/FolderController.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 viewAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $breadcrumbs[] = array('type' => 'folder', 'object' => $parent, 'open' => false);
                }
Severity: Minor
Found in core/controllers/FolderController.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 'deletedialogAction'.
Open

        $this->view->sizeStr = UtilityComponent::formatSize($sizes[0]->size);
Severity: Minor
Found in core/controllers/FolderController.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 'deleteAction'.
Open

        echo JsonComponent::encode(array(true, $this->t('Changes saved'), $folderInfo));
Severity: Minor
Found in core/controllers/FolderController.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 'createfolderAction'.
Open

                        echo JsonComponent::encode(array(false, $this->t('This name is already used')));
Severity: Minor
Found in core/controllers/FolderController.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

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

class FolderController extends AppController

The property $_daos is not named in camelCase.
Open

class FolderController extends AppController
{
    public $_models = array('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');
    public $_daos = array('Folder', 'Folder', 'Item');
    public $_components = array('Breadcrumb', 'Date');
Severity: Minor
Found in core/controllers/FolderController.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 $_models is not named in camelCase.
Open

class FolderController extends AppController
{
    public $_models = array('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');
    public $_daos = array('Folder', 'Folder', 'Item');
    public $_components = array('Breadcrumb', 'Date');
Severity: Minor
Found in core/controllers/FolderController.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 FolderController extends AppController
{
    public $_models = array('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');
    public $_daos = array('Folder', 'Folder', 'Item');
    public $_components = array('Breadcrumb', 'Date');
Severity: Minor
Found in core/controllers/FolderController.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 FolderController extends AppController
{
    public $_models = array('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');
    public $_daos = array('Folder', 'Folder', 'Item');
    public $_components = array('Breadcrumb', 'Date');
Severity: Minor
Found in core/controllers/FolderController.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('Folder', 'Folder', 'Item', 'Folderpolicygroup', 'Folderpolicyuser', 'Progress');

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

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

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

    public $_forms = array('Folder');

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

    public $_components = array('Breadcrumb', 'Date');

The variable $item_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $item_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

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

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $item_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function deleteAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folder_id = $this->getParam('folderId');
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function deleteAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folder_id = $this->getParam('folderId');
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function deleteAction()
    {
        $this->disableLayout();
        $this->disableView();
        $folder_id = $this->getParam('folderId');
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $newFolder_dateUpdate is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $newFolder_dateUpdate is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function editAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');

Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function viewAction()
    {
        $this->view->Date = $this->Component->Date;
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function removeitemAction()
    {
        $folder_id = $this->getParam('folderId');
        $item_id = $this->getParam('itemId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $folder_id is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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 $new_folder is not named in camelCase.
Open

    public function createfolderAction()
    {
        $this->disableLayout();
        $folder_id = $this->getParam('folderId');
        $folder = $this->Folder->load($folder_id);
Severity: Minor
Found in core/controllers/FolderController.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