YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

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

    public function setDataFromRequest(App\Request $request)
    {
        foreach (array_keys($this->getEditFields()) as $field) {
            if ($request->has($field)) {
                switch ($field) {
Severity: Minor
Found in modules/Settings/WebserviceUsers/services/WebservicePremium.php - About 1 hr to fix

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

        public function save()
        {
            $db = App\Db::getInstance('webservice');
            $table = $this->baseTable;
            $index = $this->baseIndex;
    Severity: Minor
    Found in modules/Settings/WebserviceUsers/models/Record.php - About 1 hr to fix

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

          public function getFormatDataSession(array $row): array
          {
              foreach ($row as $key => $value) {
                  switch ($key) {
                      case 'parent_id':
      Severity: Minor
      Found in modules/Settings/WebserviceUsers/models/Record.php - About 1 hr to fix

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

            public function showFieldLayout(App\Request $request)
            {
                $sourceModule = $request->getByType('sourceModule', 2);
                $menuModelsList = \App\Module::getQuickCreateModules();
        
        
        Severity: Minor
        Found in modules/Settings/QuickCreateEditor/views/Index.php - About 1 hr to fix

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

              public function encryption(App\Request $request)
              {
                  $method = $request->isEmpty('methods') ? '' : $request->getByType('methods', 'Text');
                  $vector = $request->getRaw('vector');
                  $pass = $request->getRaw('password');
          Severity: Minor
          Found in modules/Settings/Password/actions/Save.php - About 1 hr to fix

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

                public function doTask($recordModel)
                {
                    if (!empty($this->mailTemplate) && !empty($this->pdfTemplate) && \App\Record::isExists($this->mailTemplate, 'EmailTemplates') && \Vtiger_PDF_Model::getInstanceById($this->pdfTemplate)) {
                        $mailerContent = [];
                        if (!empty($this->smtp)) {
            Severity: Minor
            Found in modules/com_vtiger_workflow/tasks/VTSendPdf.php - About 1 hr to fix

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

                  public static function deleteAllRecords(string $untilModifiedTime, int $userId)
                  {
                      $actualUserId = App\User::getCurrentUserId();
                      try {
                          if (!App\User::isExists($userId)) {
              Severity: Minor
              Found in modules/RecycleBin/models/Module.php - About 1 hr to fix

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

                    public function calculateProgress()
                    {
                        $db = \App\Db::getInstance();
                        $params = [];
                
                
                Severity: Minor
                Found in modules/ServiceContracts/ServiceContracts.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)
                      {
                          $this->preProcess($request);
                          $moduleName = $request->getModule();
                          $srcModule = $request->getByType('srcModule', 'Alnum');
                  Severity: Minor
                  Found in modules/PermissionInspector/views/UserListModal.php - About 1 hr to fix

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

                        public function getHeaders()
                        {
                            $headerFields = parent::getHeaders();
                            if ('IStorages' === $this->getRelationModel()->get('modulename') && 'getManyToMany' === $this->getRelationModel()->get('name')) {
                                $qtyInStockField = new Vtiger_Field_Model();
                    Severity: Minor
                    Found in modules/Products/models/RelationListView.php - About 1 hr to fix

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

                          public function davSync(): int
                          {
                              $create = $updates = 0;
                              foreach ($this->davUsers as $userId => $user) {
                                  $this->calendarId = $user->get('calendarsid');
                      Severity: Minor
                      Found in modules/API/models/CalDAV.php - About 1 hr to fix

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

                            public function moduleHandler($moduleName, $eventType)
                            {
                                $dbCommand = App\Db::getInstance()->createCommand();
                                if ('module.postinstall' === $eventType) {
                                    $displayLabel = 'OSSMailView';
                        Severity: Minor
                        Found in modules/OSSMailView/OSSMailView.php - About 1 hr to fix

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

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

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

                                public function getPicklistValues()
                                {
                                    $params = $this->getFieldModel()->getFieldParams();
                                    $condition = ['and',
                                        ['<>', 'vtiger_field.presence', 1],
                            Severity: Minor
                            Found in modules/Vtiger/uitypes/MultiListFields.php - About 1 hr to fix

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

                                  public function getReferenceList()
                                  {
                                      if (isset($this->referenceList)) {
                                          return $this->referenceList;
                                      }
                              Severity: Minor
                              Found in modules/Vtiger/models/Field.php - About 1 hr to fix

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

                                    public function getRelationField()
                                    {
                                        if ($this->has('RelationField')) {
                                            return $this->get('RelationField');
                                        }
                                Severity: Minor
                                Found in modules/Vtiger/models/Relation.php - About 1 hr to fix

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

                                      public function getQueryFields()
                                      {
                                          if ($this->has('QueryFields')) {
                                              return $this->get('QueryFields');
                                          }
                                  Severity: Minor
                                  Found in modules/Vtiger/models/Relation.php - About 1 hr to fix

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

                                        public function isLockByFields()
                                        {
                                            if (!isset($this->privileges['isLockByFields'])) {
                                                $isLock = false;
                                                $moduleName = $this->getModuleName();
                                    Severity: Minor
                                    Found in modules/Vtiger/models/Record.php - About 1 hr to fix

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

                                          public function initInventoryData(array $items, bool $userFormat = true)
                                          {
                                              \App\Log::trace('Entering ' . __METHOD__);
                                              $inventoryModel = Vtiger_Inventory_Model::getInstance($this->getModuleName());
                                              $fields = $inventoryModel->getFields();
                                      Severity: Minor
                                      Found in modules/Vtiger/models/Record.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)
                                            {
                                                $moduleName = $request->getModule();
                                                $transferOwnerId = $request->getInteger('transferOwnerId');
                                                $relatedModules = $request->getByType('related_modules', 'Text');
                                        Severity: Minor
                                        Found in modules/Vtiger/actions/TransferOwnership.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language