YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function build has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function build(filePath, isWatched = false) {
    const outputFile = `../${filePath.replace('.js', '.vue.js')}`
    const inputOptions = {
        input: filePath,
        external: 'vue',
Severity: Minor
Found in public_html/src/buildVue.js - About 1 hr to fix

    Function callback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                            function () {
                                let progressIndicatorElement = $.progressIndicator({
                                    blockInfo: { enabled: true }
                                });
                                let formData = new FormData();
    Severity: Minor
    Found in public_html/layouts/resources/app.js - About 1 hr to fix

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

              validate: function (dependentFieldList) {
                  let field = this.getElement();
                  let fieldInfo = field.data('fieldinfo');
                  let fieldLabel = fieldInfo.label;
                  let contextFormElem = field.closest('form');
      Severity: Minor
      Found in public_html/layouts/resources/validator/FieldValidator.js - About 1 hr to fix

        Method __create has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __create($moduleInstance)
            {
                $this->module = $moduleInstance;
                $this->isdefault = (true === $this->isdefault || 'true' == $this->isdefault) ? 1 : 0;
                $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
        Severity: Minor
        Found in vtlib/Vtiger/Filter.php - About 1 hr to fix

          Method testCheckConditions has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testCheckConditions()
              {
                  $recordModel = \Tests\Base\C_RecordActions::createSQuotesRecord();
                  $checkConditions = \App\Condition::checkConditions([
                      'condition' => 'AND',
          Severity: Minor
          Found in tests/App/Conditions.php - About 1 hr to fix

            Method updateUnlockStatus has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function updateUnlockStatus(int $id, int $status): void
                {
                    \App\Db::getInstance()
                        ->createCommand()
                        ->update('u_#__interests_conflict_unlock', [
            Severity: Minor
            Found in app/Components/InterestsConflict.php - About 1 hr to fix

              Method setUpBeforeClass has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function setUpBeforeClass(): void
                  {
                      if (!empty($_SERVER['YETI_MAIL_PASS'])) {
                          $db = \App\Db::getInstance();
                          $db->createCommand()
              Severity: Minor
              Found in tests/Base/G_Cron.php - About 1 hr to fix

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

                    public function process(\App\Request $request)
                    {
                        if (\Config\Security::$forceHttpsRedirection && !\App\RequestUtil::isHttps()) {
                            header("location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}", true, 301);
                        }
                Severity: Minor
                Found in app/Main/File.php - About 1 hr to fix

                  Method getArray has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getArray($key, $type = false, $value = [], ?string $keyType = null)
                      {
                          if (isset($this->purifiedValuesByArray[$key])) {
                              return $this->purifiedValuesByArray[$key];
                          }
                  Severity: Minor
                  Found in app/Request.php - About 1 hr to fix

                    Method getVendorLibraries has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getVendorLibraries()
                        {
                            $libraries = [];
                            if (file_exists(ROOT_DIRECTORY . '/composer.lock')) {
                                $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
                    Severity: Minor
                    Found in app/Installer/Credits.php - About 1 hr to fix

                      Method getRoomsUser has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getRoomsUser(?int $userId = null): array
                          {
                              if (empty($userId)) {
                                  $userId = User::getCurrentUserId();
                              }
                      Severity: Minor
                      Found in app/Chat.php - About 1 hr to fix

                        Method ram has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private static function ram(): array
                            {
                                $mathCountGroup = 1000;
                                $writeTime = $readTime = $readOperations = $writeOperations = 0;
                                for ($i = 0; $i < 5; ++$i) {
                        Severity: Minor
                        Found in app/Utils/Benchmarks.php - About 1 hr to fix

                          Method saveFromContent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function saveFromContent(self $file, $params = [])
                              {
                                  $notesTitle = $fileName = \App\Purifier::decodeHtml(\App\Purifier::purify($file->getName()));
                                  $fileNameLength = \App\TextUtils::getTextLength($fileName);
                                  $record = \Vtiger_Record_Model::getCleanInstance('Documents');
                          Severity: Minor
                          Found in app/Fields/File.php - About 1 hr to fix

                            Method addAdditionalInvData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function addAdditionalInvData(): array
                                {
                                    $additionalData = [];
                                    $additionalAmount = $this->data['grand_total'] - $this->data['subtotal_incl_tax'] - $this->data['discount_amount'] - $this->data['shipping_incl_tax'];
                                    if (!empty($additionalAmount)) {
                            Severity: Minor
                            Found in app/Integrations/Magento/Synchronizer/Maps/Order.php - About 1 hr to fix

                              Method search has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function search(): array
                                  {
                                      if (!$this->isActive()) {
                                          return [];
                                      }
                              Severity: Minor
                              Found in app/RecordCollectors/Vies.php - About 1 hr to fix

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

                                    public function save()
                                    {
                                        $entityInstance = $this->getModule()->getEntityInstance();
                                        $entityInstance->column_fields['user_name'] = $this->get('user_name');
                                        if (!$this->isNew() && empty($this->getPreviousValue())) {
                                Severity: Minor
                                Found in modules/Users/models/Record.php - About 1 hr to fix

                                  Method updateForeignKey has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function updateForeignKey(Base $importer)
                                      {
                                          if (!isset($importer->foreignKey)) {
                                              return;
                                          }
                                  Severity: Minor
                                  Found in app/Db/Importer.php - About 1 hr to fix

                                    Method afterSaveToDb has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function afterSaveToDb()
                                        {
                                            $dbCommand = \App\Db::getInstance()->createCommand();
                                            $this->cleanAttachments();
                                            if ($this->isNew() || false !== $this->getPreviousValue('roleid') || false !== $this->getPreviousValue('is_admin')) {
                                    Severity: Minor
                                    Found in modules/Users/models/Record.php - About 1 hr to fix

                                      Method importUserModuleStep3 has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function importUserModuleStep3(App\Request $request)
                                          {
                                              $viewer = $this->getViewer($request);
                                              $qualifiedModuleName = $request->getModule(false);
                                              $importModuleName = $request->get('module_import_name');
                                      Severity: Minor
                                      Found in modules/Settings/ModuleManager/views/ModuleImport.php - About 1 hr to fix

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

                                            public function process(App\Request $request)
                                            {
                                                if ($mode = $request->getMode()) {
                                                    $this->invokeExposedMethod($mode, $request);
                                                } else {
                                        Severity: Minor
                                        Found in modules/Users/actions/Save.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language