_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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
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.
- Create a ticketCreate a ticket
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()
{
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Create a ticketCreate a ticket
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');
- Read upRead up
- Create a ticketCreate a ticket
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');
- Create a ticketCreate a ticket
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 */
- Read upRead up
- Create a ticketCreate a ticket
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);
- Create a ticketCreate a ticket
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') {
- Create a ticketCreate a ticket
Function _initCache
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function _initCache()
{
$this->bootstrap('Config', 'Database');
$cache = false;
- Read upRead up
- Create a ticketCreate a ticket
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 */
- Create a ticketCreate a ticket
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);
- Read upRead up
- Create a ticketCreate a ticket
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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()
{
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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')));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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')));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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')));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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)));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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.');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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';
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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',
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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),
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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.');
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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')),
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initDatabase" should not be prefixed with an underscore to indicate visibility Open
protected function _initDatabase()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initZFDebug" should not be prefixed with an underscore to indicate visibility Open
protected function _initZFDebug()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initFrontModules" should not be prefixed with an underscore to indicate visibility Open
protected function _initFrontModules()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initSass" should not be prefixed with an underscore to indicate visibility Open
protected function _initSass()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initREST" should not be prefixed with an underscore to indicate visibility Open
protected function _initREST()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initDoctype" should not be prefixed with an underscore to indicate visibility Open
protected function _initDoctype()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initErrorHandle" should not be prefixed with an underscore to indicate visibility Open
protected function _initErrorHandle()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initInternationalization" should not be prefixed with an underscore to indicate visibility Open
protected function _initInternationalization()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initSession" should not be prefixed with an underscore to indicate visibility Open
protected function _initSession()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initConfig" should not be prefixed with an underscore to indicate visibility Open
protected function _initConfig()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initCache" should not be prefixed with an underscore to indicate visibility Open
protected function _initCache()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initRouter" should not be prefixed with an underscore to indicate visibility Open
protected function _initRouter()
- Create a ticketCreate a ticket
- Exclude checks
Method name "_initLogger" should not be prefixed with an underscore to indicate visibility Open
protected function _initLogger()
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$router->addRoute($enabledModule.'-1', new Zend_Controller_Router_Route($enabledModule.'/:controller/:action/*', array('module' => $enabledModule)));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 173 characters Open
$router->addRoute($enabledModule.'-2', new Zend_Controller_Router_Route($enabledModule.'/:controller/', array('module' => $enabledModule, 'action' => 'index')));
- Create a ticketCreate a ticket
- Exclude checks
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')));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
$config = new Zend_Config_Ini(DATABASE_CONFIG, Zend_Registry::get('configGlobal')->get('environment', 'production'), true);
- Create a ticketCreate a ticket
- Exclude checks
The method _initErrorHandle is not named in camelCase. Open
protected function _initErrorHandle()
{
$this->bootstrap(array('Config', 'Logger'));
/** @var Zend_Log $logger */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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') {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 */
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}