Showing 838 of 1,520 total issues
Function generateActiveGroup
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function generateActiveGroup($modelClass, $column)
{
if ($column->type === 'boolean') {
return "\$form->checkBoxGroup(\$model, '{$column->name}', [
'widgetOptions' =>
- 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 actionCreate
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function actionCreate()
{
/**
* Если это не AJAX-запрос - посылаем:
**/
- 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 find
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function find($query)
{
if (is_string($query)) {
require_once 'Zend/Search/Lucene/Search/QueryParser.php';
File yupe.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
File store.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'% to the price' => '% к цене',
'*unknown*' => '*неизвестно*',
'--choose--' => '--выберите--',
File user.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
File DCategoryTreeBehavior.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace store\components\behaviors;
use Yii;
File MultiTerm.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Zend Framework
*
* LICENSE
Method actionEnvironment
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function actionEnvironment()
{
$webRoot = Yii::getPathOfAlias('webroot');
$app = Yii::getPathOfAlias('application');
File store.js
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
$(document).ajaxError(function () {
$('#notifications').notify({message: {text: 'Произошла ошибка =('}, 'type': 'danger'}).show();
});
$(document).ready(function () {
Function run
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$user = $this->getController()->user;
$form = new ProfileForm();
- 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 rewrite
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rewrite(Zend_Search_Lucene_Interface $index)
{
if ($this->_field === null) {
require_once 'Zend/Search/Lucene/Search/Query/MultiTerm.php';
$query = new Zend_Search_Lucene_Search_Query_MultiTerm();
Function prep
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
publicMethod.prep = function (object) {
if (!open) {
return;
}
Method rewrite
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rewrite(Zend_Search_Lucene_Interface $index)
{
$this->_matches = [];
$this->_scores = [];
$this->_termKeys = [];
Blog
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class Blog extends yupe\models\YModel
{
/**
*
*/
File QueryLexer.php
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Zend Framework
*
* LICENSE
Function replaceLangInUrl
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function replaceLangInUrl($url, $lang = null)
{
$parsed = parse_url($url);
$result = '';
- 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
Method actionSitesettings
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function actionSitesettings()
{
$model = new InstallForm('siteSettings');
if (isset($this->session['InstallForm']['siteSettings'])) {
Method checkForBadMigration
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkForBadMigration($module, $class = false)
{
echo Yii::t('YupeModule.yupe', "Checking for pending migrations").'<br />';
$db = $this->getDbConnection();