YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function validate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        validate: function (dependentFieldList) {
            var field = this.getElement();
            var fieldInfo = field.data('fieldinfo');
            var fieldLabel;
            if (typeof fieldInfo === 'undefined') {
Severity: Minor
Found in public_html/layouts/resources/validator/FieldValidator.js - About 1 hr to fix

    Function getPageController has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getPageController: function () {
            if (window.pageController) {
                return window.pageController;
            }
            const moduleName = app.getModuleName();
    Severity: Minor
    Found in public_html/layouts/resources/app.js - About 1 hr to fix

      Method testUploadFiles has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testUploadFiles(): void
          {
              $request = $this->httpClient->post('Documents/Record/', \App\Utils::merge(['multipart' => [
                  ['name' => 'notes_title', 'contents' => 'test request 1'],
                  ['name' => 'filelocationtype', 'contents' => 'I'],
      Severity: Minor
      Found in tests/Integrations/WebservicePremiumTest.php - About 1 hr to fix

        Method getFieldPermission has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function getFieldPermission($tabMix, $fieldMix, $readOnly = true)
            {
                $tabId = $tabMix;
                if (!is_numeric($tabMix)) {
                    $tabId = Module::getModuleId($tabMix);
        Severity: Minor
        Found in app/Field.php - About 1 hr to fix

          Method findByEmailField has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function findByEmailField(string $moduleName, array $fields, array $emails): array
              {
                  $activeFields = $conditions = $return = [];
                  foreach ($emails as $i => $email) {
                      if (isset(self::$emailsCache[$moduleName][$email])) {
          Severity: Minor
          Found in app/Mail/RecordFinder.php - About 1 hr to fix

            Method getFieldInstances has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getFieldInstances(): array
                {
                    $company = \App\Company::getCompany();
                    $fields = [];
                    foreach (self::COMPANY_FORM_FIELDS as $fieldName) {
            Severity: Minor
            Found in app/YetiForce/Order.php - About 1 hr to fix

              Method updateList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function updateList(int $record): int
                  {
                      $sender = $this->getSender();
                      $return = 0;
                      if (!empty($sender['ip'])) {
              Severity: Minor
              Found in app/Mail/Rbl.php - About 1 hr to fix

                Method getAddressFieldValue has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getAddressFieldValue(string $type, string $fieldNameCrm, string $fieldName)
                    {
                        $methodName = 'getCrm' . \ucfirst($fieldNameCrm);
                        if (!empty($fieldParsed = $this->getAddressDataByType($type))) {
                            if (\method_exists($this, $methodName)) {
                Severity: Minor
                Found in app/Integrations/Magento/Synchronizer/Maps/Base.php - About 1 hr to fix

                  Method forVerification has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function forVerification(App\Request $request)
                      {
                          $rows = [];
                          $query = $this->getQuery($request);
                          $query->from('s_#__mail_rbl_request')->select(['id',  'type', 'datetime', 'user', 'header']);
                  Severity: Minor
                  Found in modules/Settings/MailRbl/actions/GetData.php - About 1 hr to fix

                    Method checkLoop has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function checkLoop(): ?int
                        {
                            $error = null;
                            $groupsDown = $allGroups = $this->getMembersByType(\App\PrivilegeUtil::MEMBER_TYPE_GROUPS);
                            if (!$groupsDown) {
                    Severity: Minor
                    Found in modules/Settings/Groups/models/Record.php - About 1 hr to fix

                      Method executeCron has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function executeCron($whoTrigger)
                          {
                              \App\Log::trace('Start executeCron');
                              if (!self::isPermissionToScan($whoTrigger)) {
                                  \App\Log::warning(\App\Language::translate('ERROR_ACTIVE_CRON', 'OSSMailScanner'));
                      Severity: Minor
                      Found in modules/OSSMailScanner/models/Record.php - About 1 hr to fix

                        Method getChild has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getChild($id, &$childRow, $depthBase)
                            {
                                if (empty($id) || $depthBase == App\Config::module('Partners', 'MAX_HIERARCHY_DEPTH')) {
                                    \App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');
                        
                        
                        Severity: Minor
                        Found in modules/Partners/Partners.php - About 1 hr to fix

                          Method moduleHandler has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function moduleHandler($moduleName, $eventType)
                              {
                                  $dbCommand = \App\Db::getInstance()->createCommand();
                                  if ('module.postinstall' === $eventType) {
                                      $this->turnOn();
                          Severity: Minor
                          Found in modules/OSSMailScanner/OSSMailScanner.php - About 1 hr to fix

                            Method doTask has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function doTask($recordModel)
                                {
                                    if (empty($this->recordCollector)) {
                                        return;
                                    }
                            Severity: Minor
                            Found in modules/com_vtiger_workflow/tasks/RecordCollector.php - About 1 hr to fix

                              Method getComponentActivityStateLabel has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function getComponentActivityStateLabel($key = '')
                                  {
                                      $pickListValues = App\Fields\Picklist::getValuesName('activitystatus');
                                      if (!\is_array($pickListValues)) {
                                          return [];
                              Severity: Minor
                              Found in modules/Calendar/models/Module.php - About 1 hr to fix

                                Method getHierarchyData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
                                    {
                                        \App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
                                        $currentUser = Users_Privileges_Model::getCurrentUserModel();
                                        $hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('Competition', 'DetailView', $recordId);
                                Severity: Minor
                                Found in modules/Competition/Competition.php - About 1 hr to fix

                                  Method getHierarchyData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getHierarchyData($id, $accountInfoBase, $accountId, &$listViewEntries)
                                      {
                                          \App\Log::trace('Entering getHierarchyData(' . $id . ',' . $accountId . ') method ...');
                                          $hasRecordViewAccess = \App\Privilege::isPermitted('Accounts', 'DetailView', $accountId);
                                          foreach ($this->hierarchyFields as &$field) {
                                  Severity: Minor
                                  Found in modules/Accounts/Accounts.php - About 1 hr to fix

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

                                        public function process(App\Request $request)
                                        {
                                            $currentUserId = \App\User::getCurrentUserId();
                                            $viewer = $this->getViewer($request);
                                            $moduleName = $request->getModule();
                                    Severity: Minor
                                    Found in modules/Accounts/dashboards/AccountsByIndustry.php - About 1 hr to fix

                                      Method getHierarchyData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
                                          {
                                              \App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
                                              $currentUser = Users_Privileges_Model::getCurrentUserModel();
                                              $hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('MultiCompany', 'DetailView', $recordId);
                                      Severity: Minor
                                      Found in modules/MultiCompany/MultiCompany.php - About 1 hr to fix

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

                                            public function process(App\Request $request)
                                            {
                                                $currentUserId = \App\User::getCurrentUserId();
                                                $viewer = $this->getViewer($request);
                                                $moduleName = $request->getModule();
                                        Severity: Minor
                                        Found in modules/Leads/dashboards/LeadsByStatus.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language