Showing 4,652 of 306,333 total issues
Method secureFile
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function secureFile(self $file): bool
{
if ('image' !== $file->getShortMimeType(0)) {
return false;
}
Method getDiff
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getDiff($start, $end, $format = '%a')
{
$interval = (new \DateTime($start))->diff(new \DateTime($end));
switch ($format) {
case 'years':
Method delete
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete(int $replaceId)
{
$db = \App\Db::getInstance();
$fieldName = $this->fieldModel->getName();
$transaction = $db->beginTransaction();
Method importDataFromXML
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importDataFromXML($uploadedXml)
{
$combine = ['tabid' => 'source', 'reltabid' => 'target'];
$instances = [];
$i = 0;
Method access
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function access(App\Request $request)
{
$rows = $columns = $userData = [];
foreach ($request->getArray('columns') as $key => $value) {
$columns[$key] = $value['name'];
Consider simplifying this complex logical expression. Open
Open
if ('min_length' == $type) {
$returnVal = is_numeric($vale) && (int) $vale <= (int) static::getUserPassConfig('max_length');
} elseif ('max_length' == $type) {
$returnVal = is_numeric($vale) && (int) $vale >= (int) static::getUserPassConfig('min_length');
} elseif ('change_time' == $type || 'lock_time' == $type || 'pwned_time' == $type) {
Method getEntity
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEntity()
{
$return = [];
$currentUser = \App\User::getCurrentUserModel();
$moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());
Method getMail
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getMail($mbox, $id, $msgno = false, bool $fullMode = true)
{
if (!$msgno) {
\App\Log::beginProfile(__METHOD__ . '|imap_msgno', 'Mail|IMAP');
$msgno = imap_msgno($mbox, $id);
Method save
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save(): bool
{
$relatedRecord = $this->getRelatedRecord();
$relatedId = $relatedModule = false;
if (false !== $relatedRecord) {
Method createTable
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createTable()
{
$db = \App\Db::getInstance();
$schema = $db->getSchema();
$tableName = Import_Module_Model::getDbTableName($this->user);
Method process
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$html = '';
$relationModuleName = 'Products';
$relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
Method getTicketsByPriority
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTicketsByPriority($time, $owner)
{
$moduleName = 'HelpDesk';
$ticketStatus = Settings_SupportProcesses_Module_Model::getTicketStatusNotModify();
$listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
Method process
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request, $widget = null)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
if ($widget && !$request->has('widgetid')) {
Method initializeListViewContents
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $request->getByType('forModule');
$cvId = $request->getByType('viewname', 2);
$pageNumber = $request->getInteger('page');
Method process
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
$html = '';
$relationModuleName = 'Products';
$relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
Method getProductBundles
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getProductBundles(): array
{
$products = [];
$productRelationModel = \Vtiger_Relation_Model::getInstance($this->recordModel->getModule(), $this->recordModel->getModule());
$productRelationModel->set('parentRecord', $this->recordModel);
Function registerOnChangeEventForSourceModule
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerOnChangeEventForSourceModule: function () {
var form = jQuery('#leadsMapping');
form.on('change', '.leadsFields', function (e) {
var element = jQuery(e.currentTarget);
var container = jQuery(element.closest('tr'));
Function showStats
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showStats: function (data, modules) {
const thisInstance = this;
let container = $('.LangManagement'),
html = '<div class="col-md-12"><div class="panel panel-default"><div class="panel-body col-md-12">',
langStats = 0,
Function deleteRelation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteRelation(target) {
let params = {};
if (target.data('url')) {
params = target.data('url');
} else {
Function saveMiniListWidget
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
saveMiniListWidget: function (data, element, moduleNameLabel, filterid, filterLabel, form) {
const thisInstance = this,
paramsForm = {
data: JSON.stringify(data),
blockid: element.data('block-id'),