YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method secureFile has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function secureFile(self $file): bool
    {
        if ('image' !== $file->getShortMimeType(0)) {
            return false;
        }
Severity: Minor
Found in app/Fields/File.php - About 2 hrs to fix

    Method getDiff has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function getDiff($start, $end, $format = '%a')
        {
            $interval = (new \DateTime($start))->diff(new \DateTime($end));
            switch ($format) {
                case 'years':
    Severity: Minor
    Found in app/Fields/DateTime.php - About 2 hrs to fix

      Method delete has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function delete(int $replaceId)
          {
              $db = \App\Db::getInstance();
              $fieldName = $this->fieldModel->getName();
              $transaction = $db->beginTransaction();
      Severity: Minor
      Found in app/Fields/Picklist/Item.php - About 2 hrs to fix

        Method importDataFromXML has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function importDataFromXML($uploadedXml)
            {
                $combine = ['tabid' => 'source', 'reltabid' => 'target'];
                $instances = [];
                $i = 0;
        Severity: Minor
        Found in modules/Settings/MappedFields/models/Module.php - About 2 hrs to fix

          Method access has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function access(App\Request $request)
              {
                  $rows = $columns = $userData = [];
                  foreach ($request->getArray('columns') as $key => $value) {
                      $columns[$key] = $value['name'];
          Severity: Minor
          Found in modules/Settings/AdminAccess/actions/GetData.php - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            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) {
            Severity: Critical
            Found in modules/Settings/Password/models/Record.php - About 2 hrs to fix

              Method getEntity has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getEntity()
                  {
                      $return = [];
                      $currentUser = \App\User::getCurrentUserModel();
                      $moduleModel = Vtiger_Module_Model::getInstance($this->getModuleName());
              Severity: Minor
              Found in modules/Calendar/models/Calendar.php - About 2 hrs to fix

                Method getMail has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                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);
                Severity: Minor
                Found in modules/OSSMail/models/Record.php - About 2 hrs to fix

                  Method save has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function save(): bool
                      {
                          $relatedRecord = $this->getRelatedRecord();
                          $relatedId = $relatedModule = false;
                          if (false !== $relatedRecord) {
                  Severity: Minor
                  Found in modules/Notification/models/Record.php - About 2 hrs to fix

                    Method createTable has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function createTable()
                        {
                            $db = \App\Db::getInstance();
                            $schema = $db->getSchema();
                            $tableName = Import_Module_Model::getDbTableName($this->user);
                    Severity: Minor
                    Found in modules/Import/readers/FileReader.php - About 2 hrs to fix

                      Method process has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function process()
                          {
                              $html = '';
                              $relationModuleName = 'Products';
                              $relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
                      Severity: Minor
                      Found in modules/IStorages/textparsers/ProductsValueTable.php - About 2 hrs to fix

                        Method getTicketsByPriority has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getTicketsByPriority($time, $owner)
                            {
                                $moduleName = 'HelpDesk';
                                $ticketStatus = Settings_SupportProcesses_Module_Model::getTicketStatusNotModify();
                                $listViewUrl = Vtiger_Module_Model::getInstance($moduleName)->getListViewUrl();
                        Severity: Minor
                        Found in modules/HelpDesk/dashboards/ClosedTicketsByPriority.php - About 2 hrs to fix

                          Method process has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function process(App\Request $request, $widget = null)
                              {
                                  $viewer = $this->getViewer($request);
                                  $moduleName = $request->getModule();
                                  if ($widget && !$request->has('widgetid')) {
                          Severity: Minor
                          Found in modules/Vtiger/dashboards/Multifilter.php - About 2 hrs to fix

                            Method initializeListViewContents has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
                                {
                                    $moduleName = $request->getByType('forModule');
                                    $cvId = $request->getByType('viewname', 2);
                                    $pageNumber = $request->getInteger('page');
                            Severity: Minor
                            Found in modules/Import/views/List.php - About 2 hrs to fix

                              Method process has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function process()
                                  {
                                      $html = '';
                                      $relationModuleName = 'Products';
                                      $relationListView = \Vtiger_RelationListView_Model::getInstance($this->textParser->recordModel, $relationModuleName);
                              Severity: Minor
                              Found in modules/IStorages/textparsers/ProductsTable.php - About 2 hrs to fix

                                Method getProductBundles has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function getProductBundles(): array
                                    {
                                        $products = [];
                                        $productRelationModel = \Vtiger_Relation_Model::getInstance($this->recordModel->getModule(), $this->recordModel->getModule());
                                        $productRelationModel->set('parentRecord', $this->recordModel);
                                Severity: Minor
                                Found in api/webservice/WebservicePremium/Products/Record.php - About 2 hrs to fix

                                  Function registerOnChangeEventForSourceModule has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  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

                                        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

                                              deleteRelation(target) {
                                                  let params = {};
                                                  if (target.data('url')) {
                                                      params = target.data('url');
                                                  } else {
                                      Severity: Minor
                                      Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

                                        Function saveMiniListWidget has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                saveMiniListWidget: function (data, element, moduleNameLabel, filterid, filterLabel, form) {
                                                    const thisInstance = this,
                                                        paramsForm = {
                                                            data: JSON.stringify(data),
                                                            blockid: element.data('block-id'),
                                        Severity: Minor
                                        Found in public_html/layouts/basic/modules/Vtiger/resources/DashBoard.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language