File WebModule.php
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WebModule - базовый класс для всех модулей Юпи!
*
* Все модули, разработанные для Юпи! должны наследовать этот класс.
WebModule
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class WebModule extends CWebModule
{
/**
*
*/
Function getActivate
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getActivate($noDependent = false)
{
Yii::app()->getCache()->flush();
Yii::app()->configManager->flushDump();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getDeActivate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getDeActivate($noDependent = false)
{
Yii::app()->getCache()->flush();
Yii::app()->configManager->flushDump();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function installDB
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function installDB($installed = [])
{
$log = [];
Yii::log(
Yii::t(
- Read upRead up
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 uninstallDB
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function uninstallDB()
{
Yii::log(
Yii::t(
'YupeModule.yupe',
Method installDB
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function installDB($installed = [])
{
$log = [];
Yii::log(
Yii::t(
Method getDeActivate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDeActivate($noDependent = false)
{
Yii::app()->getCache()->flush();
Yii::app()->configManager->flushDump();
Method getIsInstalled
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIsInstalled()
{
$modulesInstalled = Yii::app()->getCache()->get('YupeModulesInstalled');
if ($modulesInstalled === false) {
Method getActivate
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getActivate($noDependent = false)
{
Yii::app()->getCache()->flush();
Yii::app()->configManager->flushDump();
Function uninstallDB
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function uninstallDB()
{
Yii::log(
Yii::t(
'YupeModule.yupe',
- Read upRead up
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 getSettings
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSettings($needReset = false)
{
if ($needReset) {
Yii::app()->getCache()->clear($this->getId());
}
Function getSettings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getSettings($needReset = false)
{
if ($needReset) {
Yii::app()->getCache()->clear($this->getId());
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getDependenciesAll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getDependenciesAll()
{
$modulesDependent = Yii::app()->getCache()->get('YupeModulesDependenciesAll');
if ($modulesDependent === false) {
$modules = Yii::app()->moduleManager->getModules(false, true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getModulesNoDisable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getModulesNoDisable()
{
$modulesNoDisable = Yii::app()->getCache()->get('YupeModulesNoDisable');
if ($modulesNoDisable === false) {
$modules = Yii::app()->moduleManager->getModules(false, true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getDependents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getDependents()
{
$modulesDependent = Yii::app()->getCache()->get('YupeModulesDependent');
if ($modulesDependent === false) {
$modules = $this->getDependenciesAll();
- Read upRead up
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"