YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Project_Gantt_Model has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class Project_Gantt_Model
{
    /**
     * @var array project tasks,milesones and projects
     */
Severity: Minor
Found in modules/Project/models/Gantt.php - About 2 hrs to fix

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

              saveModuleCustomNumbering() {
                  if ($('.saveButton').attr('disabled')) {
                      return;
                  }
                  const editViewForm = this.getForm();

        Function registerWarningsFolders has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            registerWarningsFolders: function (container) {
                const thisInstance = this;
                let data = [];
                const treeValues = container.find('.js-tree-values').val();
                if (treeValues) {
        Severity: Major
        Found in public_html/layouts/basic/modules/Settings/Logs/resources/Index.js - About 2 hrs to fix

          Function massMove has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  massMove: function (url) {
                      var listInstance = Vtiger_List_Js.getInstance();
                      var validationResult = listInstance.checkListRecordSelected();
                      if (validationResult != true) {
                          var selectedIds = listInstance.readSelectedIds(true);
          Severity: Major
          Found in public_html/layouts/basic/modules/Documents/resources/List.js - About 2 hrs to fix

            Function saveAjax has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    saveAjax: function (params, progressIndicator = false) {
                        const aDeferred = $.Deferred();
                        if (typeof params === 'undefined' || $.isEmptyObject(params)) {
                            aDeferred.reject();
                            return aDeferred.promise();
            Severity: Major
            Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 2 hrs to fix

              Function triggerMassAction has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      triggerMassAction: function (massActionUrl, callBackFunction, beforeShowCb, css) {
                          if (typeof beforeShowCb === 'undefined') {
                              beforeShowCb = function () {
                                  return true;
                              };
              Severity: Major
              Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 2 hrs to fix

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

                      public static function getRelatedFieldForModule($moduleName = false, $forModule = false)
                      {
                          $key = 'all';
                          if (Cache::has('getRelatedFieldForModule', $key)) {
                              $fields = Cache::get('getRelatedFieldForModule', $key);
                  Severity: Major
                  Found in app/Field.php - About 2 hrs to fix

                    Method translate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    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;
                            }
                    Severity: Major
                    Found in app/Language.php - About 2 hrs to fix

                      Method createUserPrivilegesfile has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function createUserPrivilegesfile($userid)
                          {
                              $fileUserPrivileges = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges/user_privileges_' . $userid . '.php';
                              $handle = fopen($fileUserPrivileges, 'w+');
                              if ($handle) {
                      Severity: Major
                      Found in app/UserPrivilegesFile.php - About 2 hrs to fix

                        Method calculate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        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');
                        Severity: Major
                        Found in app/Map/Routing/YetiForce.php - About 2 hrs to fix

                          Method import has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function import(): bool
                              {
                                  $allChecked = false;
                                  try {
                                      if ($invoices = $this->getInvoicesFromApi()) {
                          Severity: Major
                          Found in app/Integrations/Magento/Synchronizer/Invoice.php - About 2 hrs to fix

                            Method getFieldInstanceByName has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            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'] ?? '');
                            Severity: Major
                            Found in modules/Settings/Companies/models/Record.php - About 2 hrs to fix

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

                                  public static function save(Vtiger_PDF_Model $pdfModel, $step = 1)
                                  {
                                      $db = \App\Db::getInstance('admin');
                              
                                      switch ($step) {
                              Severity: Major
                              Found in modules/Settings/PDF/models/Record.php - About 2 hrs to fix

                                Method getPagination has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getPagination(App\Request $request)
                                    {
                                        $viewer = $this->getViewer($request);
                                        $pageNumber = $request->getInteger('page');
                                        $searchResult = $request->get('searchResult');
                                Severity: Major
                                Found in modules/Settings/Vtiger/views/Pagination.php - About 2 hrs to fix

                                  Method getFieldInstanceByName has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getFieldInstanceByName($name)
                                      {
                                          $params = [];
                                          $qualifiedModuleName = $this->getName(true);
                                          $tableName = $this->getModule()->baseTable;
                                  Severity: Major
                                  Found in modules/Settings/PickListDependency/models/Record.php - About 2 hrs to fix

                                    Method getListViewEntries has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getListViewEntries($pagingModel)
                                        {
                                            $module = $this->getModule();
                                            $moduleName = $module->getName();
                                            $parentModuleName = $module->getParentName();
                                    Severity: Major
                                    Found in modules/Settings/Workflows/models/ListView.php - About 2 hrs to fix

                                      Method getFileFromImage has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function getFileFromImage(DOMElement $element, array $params, array &$attachments): array
                                          {
                                              $src = trim($element->getAttribute('src'), '\'');
                                              $element->removeAttribute('src');
                                              $file = [];
                                      Severity: Major
                                      Found in modules/OSSMail/models/Mail.php - About 2 hrs to fix

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

                                            public function process(App\Request $request)
                                            {
                                                $moduleName = $request->getModule();
                                                $uid = $request->getInteger('uid');
                                                $params = null;
                                        Severity: Major
                                        Found in modules/OSSMail/views/MailActionBar.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language