Showing 4,652 of 306,333 total issues
Project_Gantt_Model
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Project_Gantt_Model
{
/**
* @var array project tasks,milesones and projects
*/
Function reloadLogTable
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reloadLogTable: function (page) {
const self = this;
let container = $('.contentsDiv'),
limit = 30;
AppConnector.request({
Function saveModuleCustomNumbering
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
saveModuleCustomNumbering() {
if ($('.saveButton').attr('disabled')) {
return;
}
const editViewForm = this.getForm();
Function registerWarningsFolders
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerWarningsFolders: function (container) {
const thisInstance = this;
let data = [];
const treeValues = container.find('.js-tree-values').val();
if (treeValues) {
Function massMove
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
massMove: function (url) {
var listInstance = Vtiger_List_Js.getInstance();
var validationResult = listInstance.checkListRecordSelected();
if (validationResult != true) {
var selectedIds = listInstance.readSelectedIds(true);
Function saveAjax
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
saveAjax: function (params, progressIndicator = false) {
const aDeferred = $.Deferred();
if (typeof params === 'undefined' || $.isEmptyObject(params)) {
aDeferred.reject();
return aDeferred.promise();
Function triggerMassAction
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerMassAction: function (massActionUrl, callBackFunction, beforeShowCb, css) {
if (typeof beforeShowCb === 'undefined') {
beforeShowCb = function () {
return true;
};
Function fixYAxisLabels
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fixYAxisLabels: function fixYAxisLabels(chart) {
let shortenYTicks = function shortenYTicks(data, options) {
if (typeof options.scales === 'undefined') {
options.scales = {};
}
Method getRelatedFieldForModule
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getRelatedFieldForModule($moduleName = false, $forModule = false)
{
$key = 'all';
if (Cache::has('getRelatedFieldForModule', $key)) {
$fields = Cache::get('getRelatedFieldForModule', $key);
Method translate
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
{
if (empty($key)) { // nothing to translate
return $key;
}
Method createUserPrivilegesfile
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function createUserPrivilegesfile($userid)
{
$fileUserPrivileges = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges/user_privileges_' . $userid . '.php';
$handle = fopen($fileUserPrivileges, 'w+');
if ($handle) {
Method calculate
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calculate()
{
$product = \App\YetiForce\Register::getProduct('YetiForceMap');
if (!\App\RequestUtil::isNetConnection() || ((empty($product['params']['login']) || empty($product['params']['pass'])) && empty($product['params']['token']))) {
throw new \App\Exceptions\AppException('ERR_NO_INTERNET_CONNECTION');
Method import
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function import(): bool
{
$allChecked = false;
try {
if ($invoices = $this->getInvoicesFromApi()) {
Method getFieldInstanceByName
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName(string $name, string $label = ''): Vtiger_Field_Model
{
$moduleName = $this->getModule()->getName(true);
$labels = $this->getModule()->getFormFields();
$label = $label ?: ($labels[$name]['label'] ?? '');
Method save
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function save(Vtiger_PDF_Model $pdfModel, $step = 1)
{
$db = \App\Db::getInstance('admin');
switch ($step) {
Method getPagination
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPagination(App\Request $request)
{
$viewer = $this->getViewer($request);
$pageNumber = $request->getInteger('page');
$searchResult = $request->get('searchResult');
Method getFieldInstanceByName
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
$params = [];
$qualifiedModuleName = $this->getName(true);
$tableName = $this->getModule()->baseTable;
Method getListViewEntries
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getListViewEntries($pagingModel)
{
$module = $this->getModule();
$moduleName = $module->getName();
$parentModuleName = $module->getParentName();
Method getFileFromImage
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getFileFromImage(DOMElement $element, array $params, array &$attachments): array
{
$src = trim($element->getAttribute('src'), '\'');
$element->removeAttribute('src');
$file = [];
Method process
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$uid = $request->getInteger('uid');
$params = null;