Showing 838 of 1,520 total issues
File Comment.php
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use yupe\widgets\YPurifier;
/**
* Comment model class:
Function liTranslit
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn.liTranslit = function(options){
// настройки по умолчанию
var o = jQuery.extend({
elName: '.s_name', //Класс елемента с именем
elAlias: '.s_alias' //Класс елемента с алиасом
Method getNavigation
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getNavigation()
{
return [
[
'icon' => 'fa fa-fw fa-reorder',
Method skipTo
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function skipTo(Zend_Search_Lucene_Index_Term $prefix)
{
if ($this->_termDictionary === null) {
$this->_loadDictionaryIndex();
}
Method termFreqs
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function termFreqs(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null)
{
$termInfo = $this->getTermInfo($term);
if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) {
Method addDocument
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addDocument(Zend_Search_Lucene_Document $document)
{
/** Zend_Search_Lucene_Search_Similarity */
require_once 'Zend/Search/Lucene/Search/Similarity.php';
Function __construct
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($tokenCategory, $tokenText, $position)
{
$this->text = $tokenText;
$this->position = $position + 1; // Start from 1
- 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
File yupe.php
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
File yupe.php
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
File ProductRepository.php
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class ProductRepository
*/
Comment
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class Comment extends yupe\models\YModel
{
/**
*
*/
File ProductBackendController.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class ProductBackendController
*/
Method getTermInfo
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTermInfo(Zend_Search_Lucene_Index_Term $term)
{
$termKey = $term->key();
if (isset($this->_termInfoCache[$termKey])) {
$termInfo = $this->_termInfoCache[$termKey];
Method __construct
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
Zend_Search_Lucene_Storage_Directory $directory,
$name,
$docCount,
$delGen = 0,
File view.php
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* @var $product Product */
$this->title = $product->getMetaTitle();
Method mergeSettings
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mergeSettings($settings = [])
{
$this->_config = CMap::mergeArray(
$this->_base,
Method actionCreate
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function actionCreate()
{
/**
* Если это не AJAX-запрос - посылаем:
**/
Function actionCreate
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function actionCreate()
{
$model = new Page();
$menuId = null;
$menuParentId = 0;
- 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 actionModuleStatus
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function actionModuleStatus()
{
if (!Yii::app()->getRequest()->getIsPostRequest() || !Yii::app()->getRequest()->getIsAjaxRequest()) {
throw new CHttpException(404, Yii::t('YupeModule.yupe', 'Page was not found!'));
}
- 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 getModulesDisabled
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function getModulesDisabled($enableModule = [])
{
if (($imports = Yii::app()->getCache()->get('pathForImports')) !== false) {
Yii::app()->getModule('yupe')->setImport($imports);
}
- 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"