YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function sidebarKeyboard has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    sidebarKeyboard: function (e) {
        let target = $(e.target);
        if (e.which == this.keyboard.LEFT) {
            if (target.hasClass('js-submenu-toggler') && !target.hasClass('collapsed')) {
                target.click();
Severity: Minor
Found in public_html/layouts/resources/app.js - About 1 hr to fix

    Function cb has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    cb: (modal) => {
                        if (btn.data('iframe')) {
                            let iframe = btn.siblings('iframe');
                            let message = iframe.clone();
                            if (message[0].hasAttribute('srcdoctemp')) {
    Severity: Minor
    Found in public_html/layouts/resources/app.js - About 1 hr to fix

      Method testEditRole has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testEditRole()
          {
              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
              $this->assertNotNull($recordModel);
      
      
      Severity: Minor
      Found in tests/Settings/Roles.php - About 1 hr to fix

        Method updateBySelect has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function updateBySelect(): void
            {
                $options = [];
                $toInstall = \App\YetiForce\Updater::getToInstall();
                foreach ($toInstall as $package) {
        Severity: Minor
        Found in app/Cli/System.php - About 1 hr to fix

          Method getColumnPermission has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function getColumnPermission($tabMix, $columnName, $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 populateSharingtmptables has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function populateSharingtmptables($userid)
                {
                    $dbCommand = \App\Db::getInstance()->createCommand();
                    \vtlib\Deprecated::checkFileAccessForInclusion('user_privileges/sharing_privileges_' . $userid . '.php');
            
            
            Severity: Minor
            Found in app/UserPrivilegesFile.php - About 1 hr to fix

              Method preProcessAjax has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function preProcessAjax(\App\Request $request)
                  {
                      $moduleName = $request->getModule(false);
                      $view = $request->getByType('view', 2);
                      if ($this->modalId) {
              Severity: Minor
              Found in app/Controller/Modal.php - About 1 hr to fix

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

                    public function check(string $password): array
                    {
                        $status = ['status' => true];
                        $product = \App\YetiForce\Register::getProduct('YetiForcePassword');
                        if (empty($password) || !\App\RequestUtil::isNetConnection() || empty($product['params']['login']) || empty($product['params']['pass'])) {
                Severity: Minor
                Found in app/Extension/PwnedPassword/YetiForce.php - About 1 hr to fix

                  Method send has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function send()
                      {
                          $config = \App\Config::component('YetiForce');
                          if (empty($config['watchdogUrl']) || !\App\RequestUtil::isNetConnection()) {
                              return;
                  Severity: Minor
                  Found in app/YetiForce/Watchdog.php - About 1 hr to fix

                    Method getNumberOfNewMessages has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getNumberOfNewMessages(?array $roomInfo = null): array
                        {
                            $numberOfNewMessages = 0;
                            $roomList = [];
                            $lastMessagesData = [];
                    Severity: Minor
                    Found in app/Chat.php - About 1 hr to fix

                      Method afterLogin has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function afterLogin(array $params): void
                          {
                              $file = ROOT_DIRECTORY . '/app_data/PwnedPassword.php';
                              $userName = \App\Session::get('user_name');
                              $config = \Settings_Password_Record_Model::getUserPassConfig();
                      Severity: Minor
                      Found in app/Extension/PwnedPassword.php - About 1 hr to fix

                        Method initUsers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function &initUsers($status = 'Active', $assignedUser = '', $private = '', $roles = false)
                            {
                                $cacheKeyMod = 'private' === $private ? $this->moduleName : '';
                                $cacheKeyAss = \is_array($assignedUser) ? md5(json_encode($assignedUser)) : $assignedUser;
                                $cacheKeyRole = \is_array($roles) ? md5(json_encode($roles)) : $roles;
                        Severity: Minor
                        Found in app/Fields/Owner.php - About 1 hr to fix

                          Method getAvailableUsersQuery has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getAvailableUsersQuery(): QueryGenerator
                              {
                                  $queryGenerator = (new QueryGenerator('Users'))
                                      ->setFields(['id'])
                                      ->addCondition('status', 'Active', 'e')
                          Severity: Minor
                          Found in app/AutoAssign.php - About 1 hr to fix

                            Method formatToDb has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function formatToDb($value, $leadingZeros = false)
                                {
                                    if ($leadingZeros) {
                                        $delim = ['/', '.'];
                                        foreach ($delim as $delimiter) {
                            Severity: Minor
                            Found in app/Fields/DateTime.php - About 1 hr to fix

                              Method getChildModules has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function getChildModules($moduleName, $hierarchy = [1])
                                  {
                                      $modules = [];
                                      switch (static::getModuleLevel($moduleName)) {
                                          case 0:
                              Severity: Minor
                              Found in app/ModuleHierarchy.php - About 1 hr to fix

                                Method saveInventoryCrm has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function saveInventoryCrm(\Vtiger_Record_Model $recordModel, Maps\Inventory $mapModel): bool
                                    {
                                        $inventoryData = [];
                                        $savedAllProducts = true;
                                        if ($mapModel->dataCrm['currency_id']) {
                                Severity: Minor
                                Found in app/Integrations/Magento/Synchronizer/Base.php - About 1 hr to fix

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

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

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

                                        public function save()
                                        {
                                            $db = \App\Db::getInstance();
                                            $id = $this->getId();
                                            $tableName = Settings_Currency_Module_Model::TABLE_NAME;
                                    Severity: Minor
                                    Found in modules/Settings/Currency/models/Record.php - About 1 hr to fix

                                      Method fetchCurrencyRates has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function fetchCurrencyRates($dateCur, $cron = false)
                                          {
                                              if (!\App\RequestUtil::isNetConnection()) {
                                                  return false;
                                              }
                                      Severity: Minor
                                      Found in modules/Settings/CurrencyUpdate/models/Module.php - About 1 hr to fix

                                        Method update has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function update(App\Request $request): void
                                            {
                                                $response = new Vtiger_Response();
                                                try {
                                                    $fieldInstance = Settings_LayoutEditor_Field_Model::getInstance($request->getInteger('fieldId'));
                                        Severity: Minor
                                        Found in modules/Settings/LayoutEditor/actions/WebserviceApps.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language