midasplatform/Midas

View on GitHub
core/Bootstrap.php

Summary

Maintainability
D
3 days
Test Coverage

_initInternationalization accesses the super-global variable $_COOKIE.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.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

_initInternationalization accesses the super-global variable $_COOKIE.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.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

_initInternationalization accesses the super-global variable $_GET.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.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

_initInternationalization accesses the super-global variable $_GET.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.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 _initRouter has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _initRouter()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.php - About 4 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 Bootstrap.php has 341 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/Bootstrap.php - About 4 hrs to fix

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

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /** Send the HTML DOCTYPE to the view. */
    protected function _initDoctype()
    {
Severity: Minor
Found in core/Bootstrap.php by phpmd

Method _initRouter has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _initRouter()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var Zend_Controller_Front $frontController */
Severity: Major
Found in core/Bootstrap.php - About 2 hrs to fix

Function _initSass has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _initSass()
    {
        $this->bootstrap(array('Config', 'Logger'));
        $config = Zend_Registry::get('configGlobal');

Severity: Minor
Found in core/Bootstrap.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 _initSass has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _initSass()
    {
        $this->bootstrap(array('Config', 'Logger'));
        $config = Zend_Registry::get('configGlobal');

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

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

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.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 _initDatabase has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _initDatabase()
    {
        $this->bootstrap('Config');
        $config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
        Zend_Registry::set('configDatabase', $config);
Severity: Minor
Found in core/Bootstrap.php - About 1 hr to fix

Method _initLogger has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _initLogger()
    {
        $this->bootstrap('Config');

        if (Zend_Registry::get('configGlobal')->get('environment', 'production') === 'production') {
Severity: Minor
Found in core/Bootstrap.php - About 1 hr to fix

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

    protected function _initCache()
    {
        $this->bootstrap('Config', 'Database');
        $cache = false;

Severity: Minor
Found in core/Bootstrap.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 _initInternationalization has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.php - About 1 hr to fix

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

    protected function _initDatabase()
    {
        $this->bootstrap('Config');
        $config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
        Zend_Registry::set('configDatabase', $config);
Severity: Minor
Found in core/Bootstrap.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 _initRouter() has an NPath complexity of 1925. The configured NPath complexity threshold is 200.
Open

    protected function _initRouter()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.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 _initRouter() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
Open

    protected function _initRouter()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.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 class Bootstrap has a coupling between objects value of 31. Consider to reduce the number of dependencies under 13.
Open

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /** Send the HTML DOCTYPE to the view. */
    protected function _initDoctype()
    {
Severity: Minor
Found in core/Bootstrap.php by phpmd

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

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

Missing class import via use statement (line '415', column '28').
Open

            $modules = new Zend_Config_Ini(APPLICATION_CONFIG, 'module');
Severity: Minor
Found in core/Bootstrap.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 '199', column '33').
Open

                $interval = new DateInterval('P1M');
Severity: Minor
Found in core/Bootstrap.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 '295', column '26').
Open

            $debug = new ZFDebug_Controller_Plugin_Debug($options);
Severity: Minor
Found in core/Bootstrap.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 '48', column '27').
Open

        $configCore = new Zend_Config_Ini(CORE_CONFIG, 'global', true);
Severity: Minor
Found in core/Bootstrap.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 '51', column '23').
Open

        $config = new Zend_Config_Ini(APPLICATION_CONFIG, $configGlobal->get('environment', 'production'), true);
Severity: Minor
Found in core/Bootstrap.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 '45', column '29').
Open

        $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);
Severity: Minor
Found in core/Bootstrap.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 '336', column '26').
Open

            $regex = new RegexIterator(
Severity: Minor
Found in core/Bootstrap.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 '395', column '43').
Open

        $router->addRoute('api-core', new Zend_Rest_Route($frontController, array(), array('rest')));
Severity: Minor
Found in core/Bootstrap.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 '330', column '30').
Open

            $directory = new RecursiveDirectoryIterator(BASE_PATH);
Severity: Minor
Found in core/Bootstrap.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 '345', column '26').
Open

            $scssc = new Leafo\ScssPhp\Compiler();
Severity: Minor
Found in core/Bootstrap.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 '331', column '29').
Open

            $iterator = new RecursiveIteratorIterator(
Severity: Minor
Found in core/Bootstrap.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 '198', column '29').
Open

                $date = new DateTime();
Severity: Minor
Found in core/Bootstrap.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 '66', column '23').
Open

        $config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
Severity: Minor
Found in core/Bootstrap.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 '455', column '56').
Open

            $router->addRoute($enabledModule.'-2', new Zend_Controller_Router_Route($enabledModule.'/:controller/', array('module' => $enabledModule, 'action' => 'index')));
Severity: Minor
Found in core/Bootstrap.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 '490', column '30').
Open

        $contextSwitch = new REST_Controller_Action_Helper_ContextSwitch();
Severity: Minor
Found in core/Bootstrap.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 '494', column '29').
Open

        $restContexts = new REST_Controller_Action_Helper_RestContexts();
Severity: Minor
Found in core/Bootstrap.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 '456', column '56').
Open

            $router->addRoute($enabledModule.'-3', new Zend_Controller_Router_Route($enabledModule.'/', array('module' => $enabledModule, 'controller' => 'index', 'action' => 'index')));
Severity: Minor
Found in core/Bootstrap.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 '487', column '46').
Open

        $frontController->registerPlugin(new REST_Controller_Plugin_RestHandler($frontController));
Severity: Minor
Found in core/Bootstrap.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 '454', column '56').
Open

            $router->addRoute($enabledModule.'-1', new Zend_Controller_Router_Route($enabledModule.'/:controller/:action/*', array('module' => $enabledModule)));
Severity: Minor
Found in core/Bootstrap.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 '428', column '27').
Open

                throw new Zend_Exception('Module '.$enabledModule.'" does not exist.');
Severity: Minor
Found in core/Bootstrap.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 'Zend_Registry' in method '_initConfig'.
Open

        Zend_Registry::set('configCore', $configCore);
Severity: Minor
Found in core/Bootstrap.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 '_initDatabase'.
Open

        Zend_Registry::set('configDatabase', $config);
Severity: Minor
Found in core/Bootstrap.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 '_initLogger'.
Open

        Zend_Registry::set('logger', $logger);
Severity: Minor
Found in core/Bootstrap.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 _initCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $cacheDir = UtilityComponent::getCacheDirectory().'/db';

                if (is_dir($cacheDir) && is_writable($cacheDir)) {
                    $backendOptions = array('cache_dir' => $cacheDir);
Severity: Minor
Found in core/Bootstrap.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 '_initRouter'.
Open

            Zend_Registry::set('models', array());
Severity: Minor
Found in core/Bootstrap.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 '_initDatabase'.
Open

        Zend_Registry::set('models', array());
Severity: Minor
Found in core/Bootstrap.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_Log' in method '_initLogger'.
Open

            $logger = Zend_Log::factory(
                array(
                    array(
                        'writerName' => 'Syslog',
                        'formatterName' => 'Simple',
Severity: Minor
Found in core/Bootstrap.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 _initLogger uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(false);
            $priority = Zend_Log::DEBUG;
        }
Severity: Minor
Found in core/Bootstrap.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 _initRouter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $modules = new Zend_Config_Ini(APPLICATION_CONFIG, 'module');
            $enabledModules = array_keys($modules->toArray(), 1);
        }
Severity: Minor
Found in core/Bootstrap.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 '_initSass'.
Open

        $config = Zend_Registry::get('configGlobal');
Severity: Minor
Found in core/Bootstrap.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 'MidasLoader' in method '_initErrorHandle'.
Open

        $notifyErrorComponent = MidasLoader::loadComponent('NotifyError');
Severity: Minor
Found in core/Bootstrap.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 '_initInternationalization'.
Open

                UtilityComponent::setCookie($request, MIDAS_LANGUAGE_COOKIE_NAME, $language, $expires);
Severity: Minor
Found in core/Bootstrap.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 'MidasLoader' in method '_initInternationalization'.
Open

                $settingModel = MidasLoader::loadModel('Setting');
Severity: Minor
Found in core/Bootstrap.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 'MidasLoader' in method '_initInternationalization'.
Open

            $settingModel = MidasLoader::loadModel('Setting');
Severity: Minor
Found in core/Bootstrap.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 _initInternationalization uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $timeZone = 'UTC';
        }
Severity: Minor
Found in core/Bootstrap.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 _initLogger uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $logger = Zend_Log::factory(
                array(
                    array(
                        'writerName' => 'Syslog',
Severity: Minor
Found in core/Bootstrap.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 '_initConfig'.
Open

        Zend_Registry::set('config', $config);
Severity: Minor
Found in core/Bootstrap.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_Db' in method '_initDatabase'.
Open

        $database = Zend_Db::factory($config->database->adapter, $params);
Severity: Minor
Found in core/Bootstrap.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_Cache' in method '_initCache'.
Open

                    $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
Severity: Minor
Found in core/Bootstrap.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_Log' in method '_initLogger'.
Open

            $logger = Zend_Log::factory(
                array(
                    array(
                        'writerName' => 'Stream',
                        'writerParams' => array('stream' => $stream),
Severity: Minor
Found in core/Bootstrap.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 'MidasLoader' in method '_initRouter'.
Open

                $moduleModel = MidasLoader::loadModel('Module');
Severity: Minor
Found in core/Bootstrap.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_Db_Table' in method '_initDatabase'.
Open

        Zend_Db_Table::setDefaultAdapter($database);
Severity: Minor
Found in core/Bootstrap.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 '_initCache'.
Open

                $cacheDir = UtilityComponent::getCacheDirectory().'/db';
Severity: Minor
Found in core/Bootstrap.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 '_initErrorHandle'.
Open

        Zend_Registry::set('components', array());
Severity: Minor
Found in core/Bootstrap.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 _initDatabase uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $driverOptions = $config->database->params->driver_options->toArray();
        }
Severity: Minor
Found in core/Bootstrap.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 _initDatabase uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if ($config->database->adapter === 'PDO_MYSQL') {
                $driverOptions[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = true;
            }

Severity: Minor
Found in core/Bootstrap.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 '_initDatabase'.
Open

        Zend_Registry::set('dbAdapter', $database);
Severity: Minor
Found in core/Bootstrap.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_Db_Table_Abstract' in method '_initCache'.
Open

                Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
Severity: Minor
Found in core/Bootstrap.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 '_initConfig'.
Open

        Zend_Registry::set('configGlobal', $configGlobal);
Severity: Minor
Found in core/Bootstrap.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 _initDatabase uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $params['unix_socket'] = $config->database->params->unix_socket;
            }
Severity: Minor
Found in core/Bootstrap.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_Cache' in method '_initCache'.
Open

                $cache = Zend_Cache::factory('Core', 'Memcached', $frontendOptions, array());
Severity: Minor
Found in core/Bootstrap.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 _initRouter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                throw new Zend_Exception('Module '.$enabledModule.'" does not exist.');
            }
Severity: Minor
Found in core/Bootstrap.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_Cache' in method '_initCache'.
Open

                $cache = Zend_Cache::factory('Core', 'Libmemcached', $frontendOptions, array());
Severity: Minor
Found in core/Bootstrap.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 '_initCache'.
Open

        Zend_Registry::set('cache', $cache);
Severity: Minor
Found in core/Bootstrap.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 '_initZFDebug'.
Open

                    'Database' => array('adapter' => Zend_Registry::get('dbAdapter')),
Severity: Minor
Found in core/Bootstrap.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 _initSass uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $logger->debug('Could not compile SASS located at '.$scssPath);
                    }
Severity: Minor
Found in core/Bootstrap.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_Controller_Action_HelperBroker' in method '_initREST'.
Open

        Zend_Controller_Action_HelperBroker::addHelper($contextSwitch);
Severity: Minor
Found in core/Bootstrap.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 '_initRouter'.
Open

        Zend_Registry::set('modulesHaveApi', $enabledApiModules);
Severity: Minor
Found in core/Bootstrap.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_Controller_Action_HelperBroker' in method '_initREST'.
Open

        Zend_Controller_Action_HelperBroker::addHelper($restContexts);
Severity: Minor
Found in core/Bootstrap.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 '_initSession'.
Open

        $config = Zend_Registry::get('configGlobal');
Severity: Minor
Found in core/Bootstrap.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 '_initRouter'.
Open

        Zend_Registry::set('modulesEnable', $enabledModules);
Severity: Minor
Found in core/Bootstrap.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_Session' in method '_initSession'.
Open

        Zend_Session::setOptions($options);
Severity: Minor
Found in core/Bootstrap.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 Bootstrap extends Zend_Application_Bootstrap_Bootstrap
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initDatabase()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initZFDebug()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initFrontModules()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initSass()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initREST()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initDoctype()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initErrorHandle()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initInternationalization()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initSession()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initConfig()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initCache()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initRouter()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

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

    protected function _initLogger()
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

Line exceeds 120 characters; contains 161 characters
Open

            $router->addRoute($enabledModule.'-1', new Zend_Controller_Router_Route($enabledModule.'/:controller/:action/*', array('module' => $enabledModule)));
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

Line exceeds 120 characters; contains 173 characters
Open

            $router->addRoute($enabledModule.'-2', new Zend_Controller_Router_Route($enabledModule.'/:controller/', array('module' => $enabledModule, 'action' => 'index')));
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

Line exceeds 120 characters; contains 186 characters
Open

            $router->addRoute($enabledModule.'-3', new Zend_Controller_Router_Route($enabledModule.'/', array('module' => $enabledModule, 'controller' => 'index', 'action' => 'index')));
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

Line exceeds 120 characters; contains 131 characters
Open

        $config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
Severity: Minor
Found in core/Bootstrap.php by phpcodesniffer

The method _initErrorHandle is not named in camelCase.
Open

    protected function _initErrorHandle()
    {
        $this->bootstrap(array('Config', 'Logger'));

        /** @var Zend_Log $logger */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initDoctype is not named in camelCase.
Open

    protected function _initDoctype()
    {
        $this->bootstrap('view');

        /** @var Zend_View $view */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initCache is not named in camelCase.
Open

    protected function _initCache()
    {
        $this->bootstrap('Config', 'Database');
        $cache = false;

Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initFrontModules is not named in camelCase.
Open

    protected function _initFrontModules()
    {
        $this->bootstrap('FrontController');

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initLogger is not named in camelCase.
Open

    protected function _initLogger()
    {
        $this->bootstrap('Config');

        if (Zend_Registry::get('configGlobal')->get('environment', 'production') === 'production') {
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initZFDebug is not named in camelCase.
Open

    protected function _initZFDebug()
    {
        $this->bootstrap(array('Config', 'FrontController'));
        $zfDebugPath = BASE_PATH.'/vendor/jokkedk/zfdebug/library';

Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initRouter is not named in camelCase.
Open

    protected function _initRouter()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initDatabase is not named in camelCase.
Open

    protected function _initDatabase()
    {
        $this->bootstrap('Config');
        $config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
        Zend_Registry::set('configDatabase', $config);
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initConfig is not named in camelCase.
Open

    protected function _initConfig()
    {
        $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);
        Zend_Registry::set('configGlobal', $configGlobal);

Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initInternationalization is not named in camelCase.
Open

    protected function _initInternationalization()
    {
        $this->bootstrap(array('Cache', 'Config', 'Database', 'FrontController'));

        /** @var false|Zend_Db_Adapter_Abstract $database */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initSass is not named in camelCase.
Open

    protected function _initSass()
    {
        $this->bootstrap(array('Config', 'Logger'));
        $config = Zend_Registry::get('configGlobal');

Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initSession is not named in camelCase.
Open

    protected function _initSession()
    {
        $this->bootstrap('Config');
        $config = Zend_Registry::get('configGlobal');
        $options = array(
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _initREST is not named in camelCase.
Open

    protected function _initREST()
    {
        $this->bootstrap('FrontController');

        /** @var Zend_Controller_Front $frontController */
Severity: Minor
Found in core/Bootstrap.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status