Showing 838 of 1,520 total issues
Method load
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function load($data)
{
$termDictionary = [];
$termInfos = [];
$pos = 0;
Zend_Search_Lucene_MultiSearcher
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class Zend_Search_Lucene_MultiSearcher implements Zend_Search_Lucene_Interface
{
/**
* List of indices for searching.
* Array of Zend_Search_Lucene_Interface objects
File MultiSearcher.php
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Zend Framework
*
* LICENSE
File _form.php
has 438 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @category YupeView
* @package yupe
* @author Yupe Team <support@yupe.ru>
Zend_Search_Lucene_Proxy
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class Zend_Search_Lucene_Proxy implements Zend_Search_Lucene_Interface
{
/**
* Index object
*
File index.php
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @var $this ProductBackendController
* @var $model Product
* @var $form ActiveForm
Function addDocument
has a Cognitive Complexity of 41 (exceeds 5 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';
- 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 store.js
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
function showNotify(element, result, message) {
$('#notifications').html('<div class="alert alert-' + result + '">' + message + '</div>').fadeIn().delay(3000).fadeOut();
}
$(document).ajaxError(function () {
Function _load21DelFile
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
private function _load21DelFile()
{
$delFile = $this->_directory->getFileObject($this->_name . '_' . base_convert($this->_delGen, 10, 36) . '.del');
$format = $delFile->readInt();
- 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 actionDbsettings
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function actionDbsettings()
{
$this->_markFinished('requirements');
$dbConfFile = Yii::app()->basePath.'/config/'.'db.php';
File _form.php
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @category YupeView
* @package yupe
* @author Yupe Team <support@yupe.ru>
File Migrator.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Migrator class file.
*
* @category YupeComponent
Function rewrite
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function rewrite(Zend_Search_Lucene_Interface $index)
{
$this->_matches = [];
if ($this->_pattern->field === null) {
- 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 _sloppyPhraseFreq
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _sloppyPhraseFreq($docId, Zend_Search_Lucene_Interface $reader)
{
$freq = 0;
$phraseQueue = [];
- 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 Blog.php
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Blog
*
Order
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
class Order extends yupe\models\YModel
{
/**
*
*/
Function run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
// Сбрасываем CSS и JS - они нам не нужны:
Yii::app()->clientScript->reset();
- 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 __construct
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
private function __construct($fileName, $storeContent)
{
if (!class_exists('ZipArchive', false)) {
require_once 'Zend/Search/Lucene/Exception.php';
throw new Zend_Search_Lucene_Exception('MS Office documents processing functionality requires Zip extension to be loaded');
- 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 getModules
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getModules($navigationOnly = false, $disableModule = false)
{
$this->otherCategoryName = Yii::t('YupeModule.yupe', 'Other');
$this->categoryIcon = [
Function rewrite
has a Cognitive Complexity of 36 (exceeds 5 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();
- 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"