YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method testGetProducts has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testGetProducts(): void
    {
        $recordModel = \Tests\Base\C_RecordActions::createProductRecord();
        $dataBefore = $recordModel->getData();
        $recordModel->set('share_externally', 1);
Severity: Minor
Found in tests/Integrations/WebservicePremiumTest.php - About 1 hr to fix

    Method initInventoryValuesAuto has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function initInventoryValuesAuto()
        {
            $invData = [];
            $counter = 1;
            foreach ($this->cleanRecordModels as $groupBy => $newRecordModel) {
    Severity: Minor
    Found in app/RecordConverter.php - About 1 hr to fix

      Method relatedRecordLevel has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function relatedRecordLevel($params)
          {
              [$fieldName, $relatedModule, $relatedRecord] = array_pad(explode('|', $params, 3), 3, '');
              if (
                  !isset($this->recordModel)
      Severity: Minor
      Found in app/TextParser.php - About 1 hr to fix

        Method purifyMultiDimensionArray has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function purifyMultiDimensionArray($values, $template)
            {
                if (\is_array($template)) {
                    foreach ($values as $firstKey => $value) {
                        if (\is_array($value)) {
        Severity: Minor
        Found in app/Request.php - About 1 hr to fix

          Method showHelp has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function showHelp(): void
              {
                  if ($this->climate->arguments->defined('module')) {
                      $module = $this->climate->arguments->get('module');
                      $className = "\\App\\Cli\\{$module}";
          Severity: Minor
          Found in app/Cli.php - About 1 hr to fix

            Method getWarnings has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function getWarnings($folders, $active = true)
                {
                    if (empty($folders)) {
                        return [];
                    }
            Severity: Minor
            Found in app/SystemWarnings.php - About 1 hr to fix

              Method import has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function import(): bool
                  {
                      $allChecked = false;
                      try {
                          if ($customers = $this->getCustomersFromApi()) {
              Severity: Minor
              Found in app/Integrations/Magento/Synchronizer/Customer.php - About 1 hr to fix

                Method syncAccount has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function syncAccount(array $data): int
                    {
                        $recordModel = \Vtiger_Record_Model::getCleanInstance('Accounts');
                        if ($id = $this->findAccount($data, $recordModel)) {
                            $recordModel = \Vtiger_Record_Model::getInstanceById($id, 'Accounts');
                Severity: Minor
                Found in app/Integrations/Magento/Synchronizer/Record.php - About 1 hr to fix

                  Method parsePhone has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function parsePhone(): void
                      {
                          $country = null;
                          if ($userId = $this->user ? $this->user->getId() : null) {
                              $country = \App\Fields\Country::getCountryCode(\App\User::getUserModel($userId)->getDetail('sync_carddav_default_country'));
                  Severity: Minor
                  Found in app/Integrations/Dav/Card.php - About 1 hr to fix

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

                        private function getDataFromApi(array $params): void
                        {
                            try {
                                $client = \App\RequestHttp::getClient(['headers' => ['Authorization' => 'Bearer ' . $this->bearerToken]]);
                                $response = $client->post($this->url . 'query', ['json' => $params]);
                    Severity: Minor
                    Found in app/RecordCollectors/VatifyEu.php - About 1 hr to fix

                      Method getInstance has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getInstance($value, $module = false, $type = '')
                          {
                              switch ($type) {
                                  case 'SELF':
                                      $fieldModel = parent::getInstance($value, $module);
                      Severity: Minor
                      Found in modules/Settings/MappedFields/models/Field.php - About 1 hr to fix

                        Method __getParentEmployees has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function __getParentEmployees($id, &$parentAccounts, &$encounteredAccounts)
                            {
                                $parentId = (new App\Db\Query())
                                    ->select(['parentid'])
                                    ->from('vtiger_ossemployees')
                        Severity: Minor
                        Found in modules/OSSEmployees/OSSEmployees.php - About 1 hr to fix

                          Method step has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

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

                                public function update(App\Request $request): void
                                {
                                    $db = \App\Db::getInstance('admin');
                                    $requestMode = \in_array($request->getByType('type'), ['forVerification', 'toSend', 'request']);
                                    $response = new Vtiger_Response();
                            Severity: Minor
                            Found in modules/Settings/MailRbl/actions/SaveAjax.php - About 1 hr to fix

                              Method insertIntoInviteTable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function insertIntoInviteTable()
                                  {
                                      if (!\App\Request::_has('inviteesid')) {
                                          \App\Log::info('No invitations in request, Exiting insertIntoInviteeTable method ...');
                                          return;
                              Severity: Minor
                              Found in modules/Calendar/models/Record.php - About 1 hr to fix

                                Method getPrivileges has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getPrivileges($userId)
                                    {
                                        $recordId = false;
                                        if (!empty($this->get('sourceRecord'))) {
                                            $recordId = $this->get('sourceRecord');
                                Severity: Minor
                                Found in modules/PermissionInspector/models/Module.php - About 1 hr to fix

                                  Method findEmailAddress has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function findEmailAddress($field, $searchModule = false, $returnArray = true)
                                      {
                                          $return = [];
                                          $emails = $this->get($field);
                                          if (empty($emails)) {
                                  Severity: Minor
                                  Found in modules/OSSMail/models/Mail.php - About 1 hr to fix

                                    Method recordSync has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function recordSync(): int
                                        {
                                            \App\Log::trace('Start', __METHOD__);
                                            $query = (new \App\Db\Query())->select([
                                                'dav_calendarobjects.*',
                                    Severity: Minor
                                    Found in modules/API/models/CalDAV.php - About 1 hr to fix

                                      Method getRoomsMessages has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function getRoomsMessages(App\Request $request)
                                          {
                                              $result = [];
                                              $roomList = \App\Chat::getRoomsByUser();
                                              $areNewEntries = false;
                                      Severity: Minor
                                      Found in modules/Chat/actions/ChatAjax.php - About 1 hr to fix

                                        Method reviewChanges has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function reviewChanges()
                                            {
                                                $db = \App\Db::getInstance();
                                                $recordsList = $this->getRecords();
                                                if (!empty($recordsList)) {
                                        Severity: Minor
                                        Found in modules/ModTracker/crons/ReviewChanges.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language