YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function save(App\Request $request)
    {
        if ($request->isEmpty('record')) {
            //get instance from currency name, Aleady deleted and adding again same currency case
            $recordModel = Settings_Currency_Record_Model::getInstance($request->getByType('currency_name', 'Text'));
Severity: Minor
Found in modules/Settings/Currency/actions/SaveAjax.php - About 1 hr to fix

    Method __getChildEmployees has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function __getChildEmployees($id, &$childAccounts, $depth)
        {
            $userNameSql = App\Module::getSqlForNameInDisplayFormat('Users');
            $dataReader = (new App\Db\Query())
                ->select(['vtiger_ossemployees.*', 'user_name' => new \yii\db\Expression('CASE when (vtiger_users.user_name not like ' . App\Db::getInstance()->quoteValue('') . ") THEN $userNameSql ELSE vtiger_groups.groupname END")])
    Severity: Minor
    Found in modules/OSSEmployees/OSSEmployees.php - About 1 hr to fix

      Method getHeadLocks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getHeadLocks()
          {
              $return = '';
              foreach ($this->getLocks() as $lock) {
                  switch ($lock) {
      Severity: Minor
      Found in modules/Users/models/Record.php - About 1 hr to fix

        Method saveRule has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function saveRule(App\Request $request)
            {
                Settings_Vtiger_Tracker_Model::lockTracking(false);
                Settings_Vtiger_Tracker_Model::addBasic('save');
                $forModule = $request->getByType('for_module', 2);
        Severity: Minor
        Found in modules/Settings/SharingAccess/actions/IndexAjax.php - About 1 hr to fix

          Method getRecordLinks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getRecordLinks(): array
              {
                  $links = [];
                  $recordLinks = [
                      [
          Severity: Minor
          Found in modules/Settings/WebserviceUsers/services/ManageConsents.php - About 1 hr to fix

            Method getChildMenu has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getChildMenu($roleId, $parent, int $source = 0)
                {
                    $settingsModel = Settings_Menu_Module_Model::getInstance();
                    $menu = [];
                    $query = (new \App\Db\Query())->select(('yetiforce_menu.*, vtiger_tab.name'))
            Severity: Minor
            Found in modules/Settings/Menu/models/Record.php - About 1 hr to fix

              Method getValuesToSave has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getValuesToSave(array $data): array
                  {
                      if (!$this->getId()) {
                          $forSave[$this->getModule()->baseTable] = [];
                      }
              Severity: Minor
              Found in modules/Settings/AutomaticAssignment/models/Record.php - About 1 hr to fix

                Method getPickListView has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getPickListView(App\Request $request)
                    {
                        $pickListFields = $picklistValuesName = [];
                        $sourceModule = $request->getByType('source_module', 2);
                        $fieldId = $request->getInteger('fieldId');
                Severity: Minor
                Found in modules/Settings/Colors/views/IndexAjax.php - About 1 hr to fix

                  Method toSend has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function toSend(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 process has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function process(OSSMail_Mail_Model $mail)
                        {
                            $this->mail = $mail;
                            $ids = $this->findAndBind();
                            if ($ids) {
                    Severity: Minor
                    Found in modules/OSSMailScanner/scanneractions/BindHelpDesk.php - About 1 hr to fix

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

                          public function doTask($recordModel)
                          {
                              $referenceFields = $recordModel->getModule()->getFieldsByReference();
                              $referenceIds = [];
                              foreach ($referenceFields as $fieldModel) {
                      Severity: Minor
                      Found in modules/com_vtiger_workflow/tasks/VTUpdateWorkTime.php - About 1 hr to fix

                        Method getCommentLinks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getCommentLinks()
                            {
                                $links = [];
                                $stateColors = App\Config::search('LIST_ENTITY_STATE_COLOR');
                                if ($this->privilegeToArchive()) {
                        Severity: Minor
                        Found in modules/ModComments/models/Record.php - About 1 hr to fix

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

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

                            Method uploadAndSaveFile has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function uploadAndSaveFile($fileDetails)
                                {
                                    $id = $this->getId();
                                    $moduleName = $this->getModuleName();
                                    $result = false;
                            Severity: Minor
                            Found in modules/Documents/models/Record.php - About 1 hr to fix

                              Method getListViewDisplayValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getListViewDisplayValue($value, $record = false, $recordModel = false, $rawText = false)
                                  {
                                      $value = \App\Json::decode($value);
                                      if (!$value) {
                                          return '';
                              Severity: Minor
                              Found in modules/Vtiger/uitypes/MultiImage.php - About 1 hr to fix

                                Method getRecordsFromArray has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getRecordsFromArray(array $rows)
                                    {
                                        $listViewRecordModels = $relatedFields = [];
                                        $moduleModel = $this->getRelationModel()->getRelationModuleModel();
                                        $recordId = $this->getParentRecordModel()->getId();
                                Severity: Minor
                                Found in modules/Vtiger/models/RelationListView.php - About 1 hr to fix

                                  Method getDisplayValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
                                      {
                                          $extra = '';
                                          $href = $international = \App\Purifier::encodeHtml($value);
                                          if ((\Config\Main::$phoneFieldAdvancedVerification ?? false) && ($format = \App\Config::main('phoneFieldAdvancedHrefFormat', \libphonenumber\PhoneNumberFormat::RFC3966)) !== false) {
                                  Severity: Minor
                                  Found in modules/Vtiger/uitypes/Phone.php - About 1 hr to fix

                                    Method getDisplayValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
                                        {
                                            if (empty($value)) {
                                                return '';
                                            }
                                    Severity: Minor
                                    Found in modules/Vtiger/uitypes/Tree.php - About 1 hr to fix

                                      Method getTreeList has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function getTreeList()
                                          {
                                              $trees = [];
                                              $lastId = 0;
                                              $dataReader = (new App\Db\Query())
                                      Severity: Minor
                                      Found in modules/Vtiger/models/TreeInventoryModal.php - About 1 hr to fix

                                        Method getWatchingMembers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getWatchingMembers($getData = false)
                                            {
                                                $query = (new App\Db\Query())
                                                    ->select(['member', 'lock', 'exceptions'])
                                                    ->from('u_#__watchdog_module')
                                        Severity: Minor
                                        Found in modules/Vtiger/models/Watchdog.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language