YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method __convertToUserFormat has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function __convertToUserFormat($date, $format)
    {
        \App\Log::trace('Start ' . __METHOD__ . ' ' . serialize($date) . ' | ' . $format);
        if (!\is_array($date)) {
            $date = explode(' ', $date);
Severity: Major
Found in include/fields/DateTimeField.php - About 2 hrs to fix

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

        public function process(): void
        {
            if ($this->checkExceptions('CreatedHelpDesk')) {
                return;
            }
    Severity: Major
    Found in app/Mail/ScannerAction/CreatedHelpDesk.php - About 2 hrs to fix

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

          public function process()
          {
              if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
                  return '';
              }
      Severity: Major
      Found in app/TextParser/TableCurrencySTwoLang.php - About 2 hrs to fix

        Method getHistoryByType has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getHistoryByType(string $roomType = 'global', ?int $messageId = null)
            {
                $columnMessage = static::COLUMN_NAME['message'][$roomType];
                $columnRoomName = static::COLUMN_NAME['room_name'][$roomType];
                $roomNameId = 'global' === $roomType || 'private' === $roomType ? static::COLUMN_NAME['room'][$roomType] : $columnMessage;
        Severity: Major
        Found in app/Chat.php - About 2 hrs to fix

          Method getExpectedTimes has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static function getExpectedTimes(int $id, \Vtiger_Record_Model $recordModel, array $type): array
              {
                  $return = [];
                  $date = new \DateTime();
                  if ($id && ($rules = self::getRulesForServiceContracts($id, $recordModel)) || ($rules = self::getSlaPolicyRulesForModule($recordModel))) {
          Severity: Major
          Found in app/Utils/ServiceContracts.php - About 2 hrs to fix

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

                public function process(): int
                {
                    $query = (new \App\Db\Query())->select([
                        'dbo.ARTYKUL.*',
                        'category' => 'dbo.KATEGORIA_ARTYKULU_TREE.NAZWA',
            Severity: Major
            Found in app/Integrations/Wapro/Synchronizer/Products.php - About 2 hrs to fix

              Method sanitizeSpecialChars has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function sanitizeSpecialChars(string $string, string $delimiter = '_'): string
                  {
                      $string = mb_convert_encoding((string) $string, 'UTF-8', mb_list_encodings());
                      $replace = [
                          'ъ' => '-', 'Ь' => '-', 'Ъ' => '-', 'ь' => '-',
              Severity: Major
              Found in app/Utils.php - About 2 hrs to fix

                Method updateSmtp has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function updateSmtp(App\Request $request)
                    {
                        $encryptInstance = \App\Encryption::getInstance();
                        $data = [
                            'mailer_type' => $request->getByType('mailer_type'),
                Severity: Major
                Found in modules/Settings/MailSmtp/actions/SaveAjax.php - About 2 hrs to fix

                  Method getFields has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function getFields(string $moduleName): array
                      {
                          $config = App\Config::security();
                          $fields = [
                              'proxyConnection' => [
                  Severity: Major
                  Found in modules/Settings/Proxy/models/ConfigForm.php - About 2 hrs to fix

                    Method setFieldMapping has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function setFieldMapping($fieldValueMapping, $recordModel, $parentRecordModel)
                        {
                            $ownerFields = [];
                            $entityType = $this->entity_type;
                            foreach ($recordModel->getModule()->getFields() as $name => $fieldModel) {
                    Severity: Major
                    Found in modules/com_vtiger_workflow/tasks/VTCreateEntityTask.php - About 2 hrs to fix

                      Method getRecordsListQuery has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getRecordsListQuery($skipRecords = false, $module = false, $lockRecords = false)
                          {
                              $cvId = $this->getId();
                              $moduleModel = $this->getModule();
                              $moduleName = $moduleModel->get('name');
                      Severity: Major
                      Found in modules/CustomView/models/Record.php - About 2 hrs to fix

                        Method checkLimits has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function checkLimits(App\Request $request)
                            {
                                $moduleName = $request->getModule();
                                $record = $request->getInteger('record');
                                if (!\App\Privilege::isPermitted($moduleName, 'EditView', $record)) {
                        Severity: Major
                        Found in modules/Vtiger/actions/Inventory.php - About 2 hrs to fix

                          File Module.php has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          namespace App;
                          
                          /**
                          Severity: Minor
                          Found in app/Module.php - About 2 hrs to fix

                            Function registerIconsSelect has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    registerIconsSelect(container, params) {
                                        AppConnector.request(
                                            $.extend(
                                                {
                                                    module: app.getModuleName(),
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Settings/Vtiger/resources/Index.js - About 2 hrs to fix

                              Function registerLanguage has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  registerLanguage() {
                                      this.options.locale = {
                                          name: CONFIG.langKey,
                                          weekStart: this.weekStart,
                                          weekdays: [
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Project/resources/Gantt.js - About 2 hrs to fix

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

                                    public function importLayout($zipfile)
                                    {
                                        $name = $this->_modulexml->name;
                                        $label = $this->_modulexml->label;
                                        \App\Log::trace("Importing $name ... STARTED", __METHOD__);
                                Severity: Minor
                                Found in vtlib/Vtiger/LayoutImport.php - About 2 hrs to fix

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

                                      public static function getLicenseInformation($dir, $libraryName)
                                      {
                                          $licenseError = false;
                                          $returnLicense = '';
                                          $licenseToDisplay = '';
                                  Severity: Minor
                                  Found in app/Installer/Credits.php - About 2 hrs to fix

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

                                        private function addAdvConditions(\App\QueryGenerator $queryGenerator, int $relationId, string $operator, ?array $condition, ?int $userId)
                                        {
                                            $relationModel = \Vtiger_Relation_Model::getInstanceById($relationId);
                                            if (\Vtiger_Relation_Model::RELATION_M2M !== $relationModel->getRelationType()) {
                                                $parentModuleName = $relationModel->getParentModuleModel()->getName();
                                    Severity: Minor
                                    Found in app/TextParser/UserRecordsList.php - About 2 hrs to fix

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

                                          protected function getMenuHeaderLinks(\App\Request $request): array
                                          {
                                              $userModel = \App\User::getCurrentUserModel();
                                              $headerLinks = $headerLinkInstances = [];
                                      
                                      
                                      Severity: Minor
                                      Found in app/Controller/View/Page.php - About 2 hrs to fix

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

                                            private function getQueryMessage(?int $messageId, string $condition = '>', ?string $searchVal = null, bool $isLimit = true): Db\Query
                                            {
                                                $query = null;
                                                switch ($this->roomType) {
                                                    case 'crm':
                                        Severity: Minor
                                        Found in app/Chat.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language