Showing 4,652 of 306,333 total issues
Method sanitizeInventoryValues
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sanitizeInventoryValues(array $inventoryRow, array $inventoryFields): array
{
++$this->invNo;
$this->workSheet->setCellValueExplicitByColumnAndRow($this->colNo, $this->rowNo, $this->invNo, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_NUMERIC);
++$this->colNo;
Method row
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function row(App\Request $request): void
{
$relatedModuleSkip = $request->getBoolean('relatedModuleSkip', false);
$sourceModuleName = $request->getByType('sourceModuleName', \App\Purifier::ALNUM);
$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);
Method getAdvancedFilterOpsByFieldType
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getAdvancedFilterOpsByFieldType()
{
return [
'accountName' => ['is', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'],
'string' => ['is', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'not has changed', 'is empty', 'is not empty'],
Method getFieldInstanceByName
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
if (!isset($this->customFields[$name])) {
return parent::getFieldInstanceByName($name);
}
Method checkPermission
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function checkPermission(): void
{
parent::checkPermission();
$moduleName = $this->controller->request->getModule();
if ('POST' === $this->controller->method) {
Method __construct
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($message, $code = 500, \Throwable $previous = null)
{
$message = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $message), PHP_EOL);
if (!empty($previous)) {
parent::__construct($message, $code, $previous);
Function callBackFunction
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var callBackFunction = function (data) {
App.Fields.Picklist.showSelect2ElementView(data.find('select'));
data.find('.relLabel').val(data.find('.target option:selected').val());
data.on('change', '.target', function (e) {
let currentTarget = $(e.currentTarget);
Function registerEditTaskEvent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEditTaskEvent: function () {
let thisInstance = this,
container = this.getContainer();
container.on('click', '[data-url]', function (e) {
let currentElement = $(e.currentTarget),
Function data
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function (row) {
let action = '';
action += '<div class="o-tab__container--action">';
action += `<button type="button" class="btn btn-secondary btn-xs js-details" data-id="${
row['id']
Function registerUnreviewedCountEvent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerUnreviewedCountEvent: function () {
let ids = [];
let relatedContent = this.content;
let isUnreviewedActive = relatedContent.find('.unreviewed').length;
relatedContent.find('tr.listViewEntries').each(function () {
Function toggleSplit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleSplit: function (container) {
let commactHeight = container.closest('.commonActionsContainer').height();
let splitsArray = [];
this.split = this.registerSplit(container);
splitsArray.push(this.split);
Function transferOwnershipSave
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
transferOwnershipSave: function (form) {
let transferOwner = jQuery('#transferOwnerId').val();
let relatedModules = jQuery('#related_modules').val();
let recordId = jQuery('#recordId').val();
let params = {
Function registerFocusFirstField
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerFocusFirstField: function (container, afterTimeout) {
let elementToFocus, elementToFocusTabindex;
if (afterTimeout === undefined && container.closest('.js-modal-container').length) {
setTimeout((_) => {
this.registerFocusFirstField(container, true);
Function triggerTransferOwnership
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerTransferOwnership: function (massActionUrl) {
let thisInstance = this;
let listInstance = Vtiger_List_Js.getInstance();
let validationResult = listInstance.checkListRecordSelected();
if (validationResult != true) {
Function registerEvents
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEvents: function () {
this.registerRowClickEvent();
this.registerPageNavigationEvents();
this.registerMainCheckBoxClickEvent();
this.registerCheckBoxClickEvent();
Function registerChangeDiscount
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerChangeDiscount: function () {
this.form.on('click', '.js-change-discount', (e) => {
let parentRow;
const element = $(e.currentTarget);
let params = {
Function postLoadListViewRecordsEvents
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
postLoadListViewRecordsEvents: function (container) {
const self = this;
this.registerPostLoadDesktopEvents(container);
App.Fields.Picklist.showSelect2ElementView(container.find('select.select2'));
App.Fields.Picklist.changeSelectElementView(container);
Function onPaste
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onPaste: function (event) {
const self = this,
allowedTypes = 'image/jpeg|image/png|image/gif',
dataTransfer = event.data.dataTransfer,
editor = event.editor,
Function redraw_node
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.redraw_node = function (obj, deep, is_callback, force_render) {
obj = parent.redraw_node.apply(this, arguments);
if (this.get_node(obj).original.type == 'category') {
return obj;
}
Method exportModule
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function exportModule()
{
$moduleId = $this->moduleInstance->id;
$row = (new \App\Db\Query())
->select(['name', 'tablabel', 'version', 'type', 'premium'])