YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method deleteRelation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function deleteRelation($sourceRecordId, $relatedRecordId)
    {
        $sourceModuleName = $this->getParentModuleModel()->getName();
        $destinationModuleName = $this->getRelationModuleModel()->getName();
        $result = false;
Severity: Minor
Found in modules/Vtiger/models/Relation.php - About 1 hr to fix

    Method saveInventoryData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function saveInventoryData()
        {
            \App\Log::trace('Start ' . __METHOD__);
            $inventoryData = $this->getInventoryData();
            $prevValue = $this->getPreviousInventoryItems();
    Severity: Minor
    Found in modules/Vtiger/models/Record.php - About 1 hr to fix

      Method showInventoryEntries has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function showInventoryEntries(App\Request $request)
          {
              $recordId = $request->getInteger('record');
              $pageNumber = $request->getInteger('page');
              $moduleName = $request->getModule();
      Severity: Minor
      Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

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

            public function process(App\Request $request)
            {
                $moduleName = $request->getModule();
                $componentName = $request->getByType('name');
                if (!empty($componentName)) {
        Severity: Minor
        Found in modules/Vtiger/views/ShowWidget.php - About 1 hr to fix

          Method saveRecord has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function saveRecord(App\Request $request)
              {
                  $this->getRecordModelFromRequest($request);
                  $eventHandler = $this->record->getEventHandler();
                  $skipHandlers = $request->getArray('skipHandlers', \App\Purifier::ALNUM, [], \App\Purifier::INTEGER);
          Severity: Minor
          Found in modules/Vtiger/actions/Save.php - About 1 hr to fix

            Method __construct has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __construct()
                {
                    parent::__construct();
                    $this->exposeMethod('showDetailViewByMode');
                    $this->exposeMethod('showModuleDetailView');
            Severity: Minor
            Found in modules/Vtiger/views/Detail.php - About 1 hr to fix

              Method getFieldInstanceByName has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getFieldInstanceByName($name)
                  {
                      if (!isset($this->customFields[$name])) {
                          return parent::getFieldInstanceByName($name);
                      }
              Severity: Minor
              Found in modules/Vtiger/dashboards/UpcomingEventsModel.php - About 1 hr to fix

                Method setRelatedFieldsInHierarchy has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function setRelatedFieldsInHierarchy(Vtiger_Record_Model $recordModel, $fieldName)
                    {
                        $fieldValue = $recordModel->get($fieldName);
                        $relatedModules = \App\ModuleHierarchy::getRelationFieldByHierarchy($recordModel->getModuleName(), $fieldName);
                        if ($relatedModules && !empty($fieldValue) && $recordModel->getPreviousValue($fieldName) !== $fieldValue) {
                Severity: Minor
                Found in modules/Vtiger/actions/SaveAjax.php - About 1 hr to fix

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

                      public function get(App\Request $request)
                      {
                          if ($request->isEmpty('key', true)) {
                              throw new \App\Exceptions\NoPermitted('Not Acceptable', 406);
                          }
                  Severity: Minor
                  Found in modules/Vtiger/files/MultiAttachment.php - About 1 hr to fix

                    Method getRecordRelatedListViewLinksLeftSide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getRecordRelatedListViewLinksLeftSide(Vtiger_RelationListView_Model $viewModel)
                        {
                            $links = parent::getRecordRelatedListViewLinksLeftSide($viewModel);
                            if (\App\Mail::checkMailClient()) {
                                if (\App\Mail::checkInternalMailClient()) {
                    Severity: Minor
                    Found in modules/Contacts/models/Record.php - About 1 hr to fix

                      Method getInventoryData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getInventoryData(XMLReader $xmlToImport, $keyType)
                          {
                              $recordInventoryData = [];
                              $labels = [];
                              $columnsName = [];
                      Severity: Minor
                      Found in modules/Import/readers/XmlReader.php - About 1 hr to fix

                        Method getDetailViewLinks has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getDetailViewLinks(array $linkParams): array
                            {
                                $recordModel = $this->getRecord();
                                $linkModelList = parent::getDetailViewLinks($linkParams);
                                if (!$recordModel->isReadOnly()) {
                        Severity: Minor
                        Found in modules/Project/models/DetailView.php - About 1 hr to fix

                          Method findOutStartDates has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function findOutStartDates(&$node)
                              {
                                  $maxTimeStampValue = 2147483647;
                                  $firstDate = $this->iterateNodes($node, $maxTimeStampValue, function (&$child, $firstDate) {
                                      if (!empty($child['start_date']) && '1970-01-01' !== $child['start_date']) {
                          Severity: Minor
                          Found in modules/Project/models/Gantt.php - About 1 hr to fix

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

                                public function process(): void
                                {
                                    $handlerClass = $this->getActionClassName();
                                    $this->request->loadData();
                                    $this->debugRequest();
                            Severity: Minor
                            Found in api/webservice/Controller.php - About 1 hr to fix

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

                                  public function get(): array
                                  {
                                      $response = [];
                                      $moduleName = $this->controller->request->getModule();
                                      $columns = array_flip(['id', 'type', 'label', 'wcol', 'sequence', 'data', 'name']);
                              Severity: Minor
                              Found in api/webservice/WebservicePremium/BaseModule/Widgets.php - About 1 hr to fix

                                Method post has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function post(): string
                                    {
                                        $multiFactorAuth = new \Api\Core\TwoFactorAuth($this);
                                        if (!$multiFactorAuth->isActive()) {
                                            $this->saveLoginHistory([
                                Severity: Minor
                                Found in api/webservice/WebserviceStandard/Users/TwoFactorAuth.php - About 1 hr to fix

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

                                      public function process(App\Request $request)
                                      {
                                          $response = new Vtiger_Response();
                                          try {
                                              $ilon = $request->getByType('ilon', 'float');
                                  Severity: Minor
                                  Found in modules/OpenStreetMap/actions/GetRoute.php - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                                if (
                                                                    initial === false &&
                                                                    (this.tagName === 'SPAN' || this.selected) &&
                                                                    ((prevVal < num && prevVal >= 0) || (!prevVal && num > 0))
                                                                ) {
                                    Severity: Major
                                    Found in public_html/layouts/basic/modules/OSSMail/resources/checkmails.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                      if (
                                                          fieldValue.indexOf('http://') === 0 ||
                                                          fieldValue.indexOf('https://') === 0 ||
                                                          fieldValue.indexOf('ftp://') === 0 ||
                                                          fieldValue.indexOf('ftps://') === 0 ||
                                      Severity: Major
                                      Found in public_html/layouts/resources/validator/FieldValidator.js - About 1 hr to fix

                                        Method addLink has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
                                        Severity: Major
                                        Found in vtlib/Vtiger/Link.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language