YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getSourceVariable has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getSourceVariable()
    {
        if (empty(self::$sourceModules[$this->moduleName])) {
            return false;
        }
Severity: Minor
Found in app/TextParser.php - About 1 hr to fix

    Method organization has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function organization(string $params): string
        {
            if (!$params) {
                return '';
            }
    Severity: Minor
    Found in app/TextParser.php - About 1 hr to fix

      Method getModuleConverters has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getModuleConverters(string $moduleName, string $view = '', array $recordIds = [], ?int $userId = null): array
          {
              $converters = [];
              if (null === $userId) {
                  $userId = \App\User::getCurrentUserId();
      Severity: Minor
      Found in app/RecordConverter.php - About 1 hr to fix

        Method get has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function get(): array
            {
                $fullVer = \explode('.', \App\Version::get());
                array_pop($fullVer);
                self::$version = \implode('.', $fullVer);
        Severity: Minor
        Found in app/YetiForce/Updater.php - About 1 hr to fix

          Method getUnreadByType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function getUnreadByType(string $roomType = 'global')
              {
                  $dataReader = static::getQueryForUnread($roomType)->createCommand()->query();
                  $rows = [];
                  while ($row = $dataReader->read()) {
          Severity: Minor
          Found in app/Chat.php - About 1 hr to fix

            Method saveEnv has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function saveEnv(): void
                {
                    $data = self::getEnv();
                    $key = \PHP_SAPI !== 'cli' ? 'www' : 'cli';
                    $data[$key]['sapi'] = \PHP_SAPI;
            Severity: Minor
            Found in app/Utils/ConfReport.php - About 1 hr to fix

              Method businessTime has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function businessTime(string $start, string $end, string $startHour, string $endHour, array $days, bool $holidays): int
                  {
                      $start = new \DateTime($start);
                      $end = new \DateTime($end);
                      $holidaysDates = $dates = [];
              Severity: Minor
              Found in app/Utils/ServiceContracts.php - About 1 hr to fix

                Method check has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function check(): array
                    {
                        $result = [];
                        if (!\App\YetiForce\Shop::check('YetiForceVulnerabilities')) {
                            return $result;
                Severity: Minor
                Found in app/Security/Dependency.php - About 1 hr to fix

                  Method loadFromUrl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function loadFromUrl($url, $param = [])
                      {
                          if (empty($url)) {
                              Log::warning('No url: ' . $url, __CLASS__);
                              return false;
                  Severity: Minor
                  Found in app/Fields/File.php - About 1 hr to fix

                    Method getErrorMessage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getErrorMessage(int $code): string
                        {
                            switch ($code) {
                                case UPLOAD_ERR_INI_SIZE:
                                    $message = 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
                    Severity: Minor
                    Found in app/Fields/File.php - About 1 hr to fix

                      Method dropForeignKeys has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function dropForeignKeys(array $foreignKeys)
                          {
                              $this->logs .= "> start drop foreign keys\n";
                              $startMain = microtime(true);
                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Db/Importer.php - About 1 hr to fix

                        Method getDataFromApi has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function getDataFromApi(string $cnpj): void
                            {
                                try {
                                    $this->setApiKey();
                                    if ($this->apiKey) {
                        Severity: Minor
                        Found in app/RecordCollectors/BrReceitaWsCnpj.php - About 1 hr to fix

                          Method recordPreSave has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function recordPreSave(App\Request $request): void
                              {
                                  $message = '';
                                  $moduleName = $request->getModule();
                                  $checkUserName = false;
                          Severity: Minor
                          Found in modules/Users/actions/VerifyData.php - About 1 hr to fix

                            Method parseTreeDataForSave has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function parseTreeDataForSave(array $tree): array
                                {
                                    $values = [];
                                    foreach ($tree as $branch) {
                                        $value = [];
                            Severity: Minor
                            Found in modules/Settings/TreesManager/models/Record.php - About 1 hr to fix

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

                                  public function process(App\Request $request)
                                  {
                                      $viewer = $this->getViewer($request);
                                      $moduleName = $request->getModule();
                                      $qualifiedModuleName = $request->getModule(false);
                              Severity: Minor
                              Found in modules/Settings/SlaPolicy/views/Conditions.php - About 1 hr to fix

                                Method verifyPasswordChange has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function verifyPasswordChange(App\User $userModel): void
                                    {
                                        $passConfig = \Settings_Password_Record_Model::getUserPassConfig();
                                        $time = (int) $passConfig['change_time'];
                                        if (1 === (int) $userModel->getDetail('force_password_change')) {
                                Severity: Minor
                                Found in modules/Users/models/Record.php - About 1 hr to fix

                                  Method reset has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function reset(App\Request $request): void
                                      {
                                          $moduleName = $request->getModule();
                                          $password = \App\Encryption::generateUserPassword();
                                          $userRecordModel = Users_Record_Model::getInstanceById($request->getInteger('record'), $moduleName);
                                  Severity: Minor
                                  Found in modules/Users/actions/Password.php - About 1 hr to fix

                                    Method getItemModelFromRequest has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function getItemModelFromRequest(App\Request $request): App\Fields\Picklist\Item
                                        {
                                            $moduleName = $request->getByType('source_module', \App\Purifier::ALNUM);
                                            $pickListFieldName = $request->getByType('picklistName', \App\Purifier::ALNUM);
                                            $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
                                    Severity: Minor
                                    Found in modules/Settings/Picklist/actions/SaveAjax.php - About 1 hr to fix

                                      Method getDependencyGraph has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getDependencyGraph(App\Request $request)
                                          {
                                              $qualifiedName = $request->getModule(false);
                                              $recordModel = Settings_PickListDependency_Record_Model::getCleanInstance();
                                              foreach (['tabid', 'source_field'] as $fieldName) {
                                      Severity: Minor
                                      Found in modules/Settings/PickListDependency/views/IndexAjax.php - About 1 hr to fix

                                        Method getInstanceById has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function getInstanceById(int $id)
                                            {
                                                $db = App\Db::getInstance('admin');
                                                $instance = self::getCleanInstance();
                                                $baseTable = $instance->getTable();
                                        Severity: Minor
                                        Found in modules/Settings/AutomaticAssignment/models/Record.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language