YetiForceCompany/YetiForceCRM

View on GitHub
app/Fields/Picklist/Item.php

Summary

Maintainability
F
4 days
Test Coverage
F
0%

File Item.php has 515 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Picklist value item.
 *
 * @package App
Severity: Major
Found in app/Fields/Picklist/Item.php - About 1 day to fix

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

        public function getFieldInstanceByName($name)
        {
            $params = [];
            $qualifiedModuleName = 'Settings:Picklist';
            $tableName = $this->getTableName();
    Severity: Major
    Found in app/Fields/Picklist/Item.php - About 5 hrs to fix

      The class Item has an overall complexity of 119 which is very high. The configured complexity threshold is 50.
      Open

      class Item extends \App\Base
      {
          /** @var int Item ID */
          protected $id;
          /** @var string Item name */
      Severity: Minor
      Found in app/Fields/Picklist/Item.php by phpmd

      Function saveToDb has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function saveToDb(): bool
          {
              $db = \App\Db::getInstance();
              $result = false;
              $fieldName = $this->fieldModel->getName();
      Severity: Minor
      Found in app/Fields/Picklist/Item.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Item has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Item extends \App\Base
      {
          /** @var int Item ID */
          protected $id;
          /** @var string Item name */
      Severity: Minor
      Found in app/Fields/Picklist/Item.php - About 2 hrs to fix

        Method delete has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function delete(int $replaceId)
            {
                $db = \App\Db::getInstance();
                $fieldName = $this->fieldModel->getName();
                $transaction = $db->beginTransaction();
        Severity: Minor
        Found in app/Fields/Picklist/Item.php - About 2 hrs to fix

          Method saveToDb has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function saveToDb(): bool
              {
                  $db = \App\Db::getInstance();
                  $result = false;
                  $fieldName = $this->fieldModel->getName();
          Severity: Minor
          Found in app/Fields/Picklist/Item.php - About 1 hr to fix

            Function getFieldInstanceByName has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getFieldInstanceByName($name)
                {
                    $params = [];
                    $qualifiedModuleName = 'Settings:Picklist';
                    $tableName = $this->getTableName();
            Severity: Minor
            Found in app/Fields/Picklist/Item.php - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function getEditFields has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getEditFields(): array
                {
                    $fields = [];
                    $editFields = ['name'];
                    $editFields[] = 'icon';
            Severity: Minor
            Found in app/Fields/Picklist/Item.php - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method validateValue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function validateValue(string $fieldName, $value)
                {
                    switch ($fieldName) {
                        case 'name':
                            $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
            Severity: Minor
            Found in app/Fields/Picklist/Item.php - About 1 hr to fix

              Function validateValue has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function validateValue(string $fieldName, $value)
                  {
                      switch ($fieldName) {
                          case 'name':
                              $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
              Severity: Minor
              Found in app/Fields/Picklist/Item.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Consider simplifying this complex logical expression.
              Open

                          if ($itemPropertyModel && isset($this->{$name}) && ($this->getId() || (!$this->getId() && '' !== $this->{$name}))) {
                              $this->validateValue($name, $this->{$name});
                              $forSave[$itemPropertyModel->getTableName()][$itemPropertyModel->getColumnName()] = $this->{$name};
                          } elseif (isset($this->{$name}) && ($this->getId() || (!$this->getId() && '' !== $this->{$name}))) {
                              $this->validateValue($name, $this->{$name});
              Severity: Critical
              Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                Method getEditFields has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getEditFields(): array
                    {
                        $fields = [];
                        $editFields = ['name'];
                        $editFields[] = 'icon';
                Severity: Minor
                Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                  Method rename has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function rename()
                      {
                          $newValue = $this->name;
                          $previousValue = $this->getPreviousValue('name');
                          $fieldName = $this->fieldModel->getName();
                  Severity: Minor
                  Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                    Function getValuesToSave has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function getValuesToSave(): array
                        {
                            $forSave = [];
                            $tableName = $this->getTableName();
                            if (!$this->getId()) {
                    Severity: Minor
                    Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Consider simplifying this complex logical expression.
                    Open

                            if ($this->getId() && !\in_array($key, ['id']) && ($propertyExists && $this->{$key} !== $value && (null !== $this->{$key} || '' !== $value)) && !\array_key_exists($key, $this->changes)) {
                                $this->changes[$key] = $this->get($key);
                            }
                    Severity: Major
                    Found in app/Fields/Picklist/Item.php - About 1 hr to fix

                      Function updateRolePermissions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function updateRolePermissions()
                          {
                              if ($this->valueid && null !== $this->roles) {
                                  $dbCommand = \App\Db::getInstance()->createCommand();
                                  $dbCommand->delete('vtiger_role2picklist', ['picklistvalueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function getData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getData()
                          {
                              $data = [];
                              foreach (get_object_vars($this) as $name => $value) {
                                  if (\is_object($value) || 'value' === $name || 'changes' === $name || null === $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      The method getFieldInstanceByName() has 136 lines of code. Current threshold is set to 100. Avoid really long methods.
                      Open

                          public function getFieldInstanceByName($name)
                          {
                              $params = [];
                              $qualifiedModuleName = 'Settings:Picklist';
                              $tableName = $this->getTableName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      The method saveToDb() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function saveToDb(): bool
                          {
                              $db = \App\Db::getInstance();
                              $result = false;
                              $fieldName = $this->fieldModel->getName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CyclomaticComplexity

                      Since: 0.1

                      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                      Example

                      // Cyclomatic Complexity = 11
                      class Foo {
                      1   public function example() {
                      2       if ($a == $b) {
                      3           if ($a1 == $b1) {
                                      fiddle();
                      4           } elseif ($a2 == $b2) {
                                      fiddle();
                                  } else {
                                      fiddle();
                                  }
                      5       } elseif ($c == $d) {
                      6           while ($c == $d) {
                                      fiddle();
                                  }
                      7        } elseif ($e == $f) {
                      8           for ($n = 0; $n < $h; $n++) {
                                      fiddle();
                                  }
                              } else {
                                  switch ($z) {
                      9               case 1:
                                          fiddle();
                                          break;
                      10              case 2:
                                          fiddle();
                                          break;
                      11              case 3:
                                          fiddle();
                                          break;
                                      default:
                                          fiddle();
                                          break;
                                  }
                              }
                          }
                      }

                      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                      The method validateValue() has a Cyclomatic Complexity of 19. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function validateValue(string $fieldName, $value)
                          {
                              switch ($fieldName) {
                                  case 'name':
                                      $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CyclomaticComplexity

                      Since: 0.1

                      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                      Example

                      // Cyclomatic Complexity = 11
                      class Foo {
                      1   public function example() {
                      2       if ($a == $b) {
                      3           if ($a1 == $b1) {
                                      fiddle();
                      4           } elseif ($a2 == $b2) {
                                      fiddle();
                                  } else {
                                      fiddle();
                                  }
                      5       } elseif ($c == $d) {
                      6           while ($c == $d) {
                                      fiddle();
                                  }
                      7        } elseif ($e == $f) {
                      8           for ($n = 0; $n < $h; $n++) {
                                      fiddle();
                                  }
                              } else {
                                  switch ($z) {
                      9               case 1:
                                          fiddle();
                                          break;
                      10              case 2:
                                          fiddle();
                                          break;
                      11              case 3:
                                          fiddle();
                                          break;
                                      default:
                                          fiddle();
                                          break;
                                  }
                              }
                          }
                      }

                      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                      The method getValuesToSave() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
                      Open

                          private function getValuesToSave(): array
                          {
                              $forSave = [];
                              $tableName = $this->getTableName();
                              if (!$this->getId()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CyclomaticComplexity

                      Since: 0.1

                      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                      Example

                      // Cyclomatic Complexity = 11
                      class Foo {
                      1   public function example() {
                      2       if ($a == $b) {
                      3           if ($a1 == $b1) {
                                      fiddle();
                      4           } elseif ($a2 == $b2) {
                                      fiddle();
                                  } else {
                                      fiddle();
                                  }
                      5       } elseif ($c == $d) {
                      6           while ($c == $d) {
                                      fiddle();
                                  }
                      7        } elseif ($e == $f) {
                      8           for ($n = 0; $n < $h; $n++) {
                                      fiddle();
                                  }
                              } else {
                                  switch ($z) {
                      9               case 1:
                                          fiddle();
                                          break;
                      10              case 2:
                                          fiddle();
                                          break;
                      11              case 3:
                                          fiddle();
                                          break;
                                      default:
                                          fiddle();
                                          break;
                                  }
                              }
                          }
                      }

                      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                      The method getFieldInstanceByName() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function getFieldInstanceByName($name)
                          {
                              $params = [];
                              $qualifiedModuleName = 'Settings:Picklist';
                              $tableName = $this->getTableName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CyclomaticComplexity

                      Since: 0.1

                      Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                      Example

                      // Cyclomatic Complexity = 11
                      class Foo {
                      1   public function example() {
                      2       if ($a == $b) {
                      3           if ($a1 == $b1) {
                                      fiddle();
                      4           } elseif ($a2 == $b2) {
                                      fiddle();
                                  } else {
                                      fiddle();
                                  }
                      5       } elseif ($c == $d) {
                      6           while ($c == $d) {
                                      fiddle();
                                  }
                      7        } elseif ($e == $f) {
                      8           for ($n = 0; $n < $h; $n++) {
                                      fiddle();
                                  }
                              } else {
                                  switch ($z) {
                      9               case 1:
                                          fiddle();
                                          break;
                      10              case 2:
                                          fiddle();
                                          break;
                      11              case 3:
                                          fiddle();
                                          break;
                                      default:
                                          fiddle();
                                          break;
                                  }
                              }
                          }
                      }

                      Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                      The class Item has a coupling between objects value of 17. Consider to reduce the number of dependencies under 13.
                      Open

                      class Item extends \App\Base
                      {
                          /** @var int Item ID */
                          protected $id;
                          /** @var string Item name */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CouplingBetweenObjects

                      Since: 1.1.0

                      A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                      Example

                      class Foo {
                          /**
                           * @var \foo\bar\X
                           */
                          private $x = null;
                      
                          /**
                           * @var \foo\bar\Y
                           */
                          private $y = null;
                      
                          /**
                           * @var \foo\bar\Z
                           */
                          private $z = null;
                      
                          public function setFoo(\Foo $foo) {}
                          public function setBar(\Bar $bar) {}
                          public function setBaz(\Baz $baz) {}
                      
                          /**
                           * @return \SplObjectStorage
                           * @throws \OutOfRangeException
                           * @throws \InvalidArgumentException
                           * @throws \ErrorException
                           */
                          public function process(\Iterator $it) {}
                      
                          // ...
                      }

                      Source https://phpmd.org/rules/design.html#couplingbetweenobjects

                      Missing class import via use statement (line '75', column '40').
                      Open

                                  $instance->close_state = (int) (new \App\Db\Query())->from('u_#__picklist_close_state')->where(['valueid' => $instance->valueid, 'fieldid' => $fieldModel->getId()])->exists();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '520', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("LBL_NOT_FILLED_MANDATORY_FIELDS||{$fieldName}", 512);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '549', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '523', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_SPECIAL_CHARACTERS_NOT_ALLOWED||{$fieldName}||{$value}", 512);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '529', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_DUPLICATES_VALUES_FOUND||{$fieldName}||{$value}", 513);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '553', column '15').
                      Open

                                      throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '339', column '23').
                      Open

                                  $dataReader = (new \App\Db\Query())->select(['tablename', 'columnname', 'fieldid', 'tabid'])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '544', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '333', column '25').
                      Open

                                  $dependencyId = (new \App\Db\Query())->select(['s_#__picklist_dependency.id'])->from('s_#__picklist_dependency')->innerJoin('s_#__picklist_dependency_data', 's_#__picklist_dependency_data.id = s_#__picklist_dependency.id')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '526', column '16').
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_EXCEEDED_NUMBER_CHARACTERS||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '353', column '25').
                      Open

                                      $eventHandler = new \App\EventHandler();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '235', column '21').
                      Open

                              return (int) (new \App\Db\Query())->from($this->getTableName())->max('sortorderid') + 1;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '323', column '51').
                      Open

                                  $replaceValue = \App\Purifier::decodeHtml((new \App\Db\Query())->select([$this->fieldModel->getName()])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '294', column '24').
                      Open

                                  $eventHandler = new \App\EventHandler();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '280', column '22').
                      Open

                              $dataReader = (new \App\Db\Query())->select(['tablename', 'columnname', 'fieldid', 'tabid'])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Avoid assigning values to variables in if clauses and the like (line '211', column '9').
                      Open

                          public function updateRolePermissions()
                          {
                              if ($this->valueid && null !== $this->roles) {
                                  $dbCommand = \App\Db::getInstance()->createCommand();
                                  $dbCommand->delete('vtiger_role2picklist', ['picklistvalueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

                      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                      Avoid using static access to class '\App\Fields\Picklist' in method 'getInstance'.
                      Open

                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Log' in method 'saveToDb'.
                      Open

                                  \App\Log::error($ex->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Log' in method 'save'.
                      Open

                                  \App\Log::error($e->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'saveToDb'.
                      Open

                              $primaryKey = \App\Fields\Picklist::getPickListId($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\vtlib\Utils' in method 'saveToDb'.
                      Open

                                      \vtlib\Utils::addColumn($baseTable, $column, $criteria);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Db' in method 'saveToDb'.
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'save'.
                      Open

                              \App\Fields\Picklist::clearCache($this->fieldModel->getName(), $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'rename'.
                      Open

                              \App\Fields\Picklist::clearCache($fieldName, $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'delete'.
                      Open

                              \App\Fields\Picklist::clearCache($fieldName, $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'delete'.
                      Open

                                  $primaryKey = \App\Fields\Picklist::getPickListId($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\Settings_Roles_Record_Model' in method 'getFieldInstanceByName'.
                      Open

                                      foreach (\Settings_Roles_Record_Model::getAll() as $key => $roleModel) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Module' in method 'rename'.
                      Open

                                  $moduleName = \App\Module::getModuleName($row['tabid']);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'rename'.
                      Open

                                  \App\Fields\Picklist::clearCache($fieldName, $moduleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'validate'.
                      Open

                                      'message' => \App\Language::translate('LBL_DUPLICATE', 'Settings:Picklist')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'updateRolePermissions'.
                      Open

                                      $picklistId = \App\Fields\Picklist::getPicklistIdNr($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Db' in method 'delete'.
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Module' in method 'delete'.
                      Open

                                      $moduleName = \App\Module::getModuleName($row['tabid']);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'delete'.
                      Open

                                      \App\Fields\Picklist::clearCache($fieldName, $moduleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                              \App\RecordStatus::TIME_COUNTING_REACTION => \App\Language::translate('LBL_TIME_COUNTING_REACTION', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                              \App\RecordStatus::TIME_COUNTING_IDLE => \App\Language::translate('LBL_TIME_COUNTING_IDLE', $qualifiedModuleName)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                          $params['picklistValues'][$key] = \App\Language::translate($value, $qualifiedModuleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                          $params['picklistValues'][$key] = \App\Language::translate($roleModel->get('rolename'), 'Settings:Roles');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Validator' in method 'validateValue'.
                      Open

                                      if (!\App\Validator::integer($value)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\RecordStatus' in method 'getFieldInstanceByName'.
                      Open

                                      foreach (\App\RecordStatus::getLabels() as $key => $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'getTableName'.
                      Open

                              return \App\Fields\Picklist::getPickListTableName($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Fields\Picklist' in method 'isDuplicateValue'.
                      Open

                              $picklistValues = \App\Fields\Picklist::getValuesName($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                              0 => \App\Language::translate('LBL_NONE', '_Base'),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Purifier' in method 'delete'.
                      Open

                                  $replaceValue = \App\Purifier::decodeHtml((new \App\Db\Query())->select([$this->fieldModel->getName()])
                                      ->from($this->getTableName())
                                      ->where([$primaryKey => $replaceId])
                                      ->scalar());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Log' in method 'delete'.
                      Open

                                  \App\Log::error($ex->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                              \App\RecordStatus::TIME_COUNTING_RESOLVE => \App\Language::translate('LBL_TIME_COUNTING_RESOLVE', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      Avoid assigning values to variables in if clauses and the like (line '464', column '15').
                      Open

                          public function getEditFields(): array
                          {
                              $fields = [];
                              $editFields = ['name'];
                              $editFields[] = 'icon';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      IfStatementAssignment

                      Since: 2.7.0

                      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                      Example

                      class Foo
                      {
                          public function bar($flag)
                          {
                              if ($foo = 'bar') { // possible typo
                                  // ...
                              }
                              if ($baz = 0) { // always false
                                  // ...
                              }
                          }
                      }

                      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                      Avoid using static access to class '\App\Language' in method 'getFieldInstanceByName'.
                      Open

                                              'all' => \App\Language::translate('LBL_ALL_ROLES', $qualifiedModuleName)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      StaticAccess

                      Since: 1.4.0

                      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                      Example

                      class Foo
                      {
                          public function bar()
                          {
                              Bar::baz();
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#staticaccess

                      syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')'
                      Open

                                      if ($insertValueList = array_map(fn ($roleid) => [$roleid, $this->valueid, $picklistId], $this->roles)) {
                      Severity: Critical
                      Found in app/Fields/Picklist/Item.php by phan

                      The property $record_state is not named in camelCase.
                      Open

                      class Item extends \App\Base
                      {
                          /** @var int Item ID */
                          protected $id;
                          /** @var string Item name */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CamelCasePropertyName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name attributes.

                      Example

                      class ClassName {
                          protected $property_name;
                      }

                      Source

                      Avoid variables with short names like $id. Configured minimum length is 3.
                      Open

                          public static function getInstance(\Vtiger_Field_Model $fieldModel, ?int $id): self
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      ShortVariable

                      Since: 0.2

                      Detects when a field, local, or parameter has a very short name.

                      Example

                      class Something {
                          private $q = 15; // VIOLATION - Field
                          public static function main( array $as ) { // VIOLATION - Formal
                              $r = 20 + $this->q; // VIOLATION - Local
                              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                  $r += $this->q;
                              }
                          }
                      }

                      Source https://phpmd.org/rules/naming.html#shortvariable

                      The property $time_counting is not named in camelCase.
                      Open

                      class Item extends \App\Base
                      {
                          /** @var int Item ID */
                          protected $id;
                          /** @var string Item name */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CamelCasePropertyName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name attributes.

                      Example

                      class ClassName {
                          protected $property_name;
                      }

                      Source

                      The property $close_state is not named in camelCase.
                      Open

                      class Item extends \App\Base
                      {
                          /** @var int Item ID */
                          protected $id;
                          /** @var string Item name */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      CamelCasePropertyName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name attributes.

                      Example

                      class ClassName {
                          protected $property_name;
                      }

                      Source

                      Avoid variables with short names like $id. Configured minimum length is 3.
                      Open

                          protected $id;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      ShortVariable

                      Since: 0.2

                      Detects when a field, local, or parameter has a very short name.

                      Example

                      class Something {
                          private $q = 15; // VIOLATION - Field
                          public static function main( array $as ) { // VIOLATION - Formal
                              $r = 20 + $this->q; // VIOLATION - Local
                              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                  $r += $this->q;
                              }
                          }
                      }

                      Source https://phpmd.org/rules/naming.html#shortvariable

                      Avoid variables with short names like $db. Configured minimum length is 3.
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      ShortVariable

                      Since: 0.2

                      Detects when a field, local, or parameter has a very short name.

                      Example

                      class Something {
                          private $q = 15; // VIOLATION - Field
                          public static function main( array $as ) { // VIOLATION - Formal
                              $r = 20 + $this->q; // VIOLATION - Local
                              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                  $r += $this->q;
                              }
                          }
                      }

                      Source https://phpmd.org/rules/naming.html#shortvariable

                      Avoid variables with short names like $db. Configured minimum length is 3.
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpmd

                      ShortVariable

                      Since: 0.2

                      Detects when a field, local, or parameter has a very short name.

                      Example

                      class Something {
                          private $q = 15; // VIOLATION - Field
                          public static function main( array $as ) { // VIOLATION - Formal
                              $r = 20 + $this->q; // VIOLATION - Local
                              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                  $r += $this->q;
                              }
                          }
                      }

                      Source https://phpmd.org/rules/naming.html#shortvariable

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Sort ID */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $fieldModel;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 187 characters
                      Open

                                  $instance->close_state = (int) (new \App\Db\Query())->from('u_#__picklist_close_state')->where(['valueid' => $instance->valueid, 'fieldid' => $fieldModel->getId()])->exists();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (isset($dataForSave[$baseTable][$column])) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $criteria = $db->getSchema()->createColumnSchemaBuilder($type, $length)->defaultValue('');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      \vtlib\Utils::addColumn($baseTable, $column, $criteria);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->presence = (int) $data['presence'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->prefix = $data['prefix'] ?? null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getId(): int
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $primaryKey = \App\Fields\Picklist::getPickListId($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Item ID */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $color;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $record_state;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get instance.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->description = $data['description'] ?? null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function set($key, $value)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($this->getId() && !\in_array($key, ['id']) && ($propertyExists && $this->{$key} !== $value && (null !== $this->{$key} || '' !== $value)) && !\array_key_exists($key, $this->changes)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($this->getPreviousValue('name')) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string Icon */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return self
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $data = \App\Fields\Picklist::getValues($fieldModel->getName())[$id];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $instance;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  'icon' => [\yii\db\Schema::TYPE_STRING, 255]
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $result = $this->saveToDb();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string Description */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $valueid;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($id) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->valueid = isset($data['picklist_valueid']) ? (int) $data['picklist_valueid'] : null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Record state */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 195 characters
                      Open

                              if ($this->getId() && !\in_array($key, ['id']) && ($propertyExists && $this->{$key} !== $value && (null !== $this->{$key} || '' !== $value)) && !\array_key_exists($key, $this->changes)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $time_counting;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function get($key)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $this->validate();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $dataForSave = $this->getValuesToSave();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param int|null            $id
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->id = $id;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->name = $data['picklistValue'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->sortorderid = (int) $data['sortorderid'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var \Settings_Picklist_Field_Model */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $instance->fieldModel = $fieldModel;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              \App\Fields\Picklist::clearCache($this->fieldModel->getName(), $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $transaction = $db->beginTransaction();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Item ID for role */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $name;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var array Changes */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $instance = new self();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $this->rename();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Function to get the Id.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              try {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return \property_exists($this, $key) ? $this->{$key} : parent::get($key);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  'prefix' => [\yii\db\Schema::TYPE_STRING, 30],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              } catch (\Throwable $e) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              foreach ($this->getDbTypes() as $column => $type) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string Item name */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $icon;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string Color */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Time counting */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->color = $data['color'] ?? null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return (int) $this->id;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function save(): bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  \App\Log::error($e->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $description;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $propertyExists = \property_exists($this, $key);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Gets field datatypes.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  throw $e;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $prefix;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $propertyExists ? $this->{$key} = $value : parent::set($key, $value);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** {@inheritdoc} */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getDbTypes(): array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Save.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int Permission level */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string Prefix for numbering */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var int State for the record */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param \Vtiger_Field_Model $fieldModel
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public static function getInstance(\Vtiger_Field_Model $fieldModel, ?int $id): self
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return int
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $result = false;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $fieldName = $this->fieldModel->getName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $baseTable = $this->getTableName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $roles;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** {@inheritdoc} */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  'color' => [\yii\db\Schema::TYPE_STRING, 25],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $result;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function saveToDb(): bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (\is_array($type)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $id;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $sortorderid;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $changes = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** @var string[] Role IDs */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->icon = $data['icon'] ?? null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->record_state = isset($data['record_state']) ? (int) $data['record_state'] : null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->close_state = (int) (new \App\Db\Query())->from('u_#__picklist_close_state')->where(['valueid' => $instance->valueid, 'fieldid' => $fieldModel->getId()])->exists();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $this->changes[$key] = $this->get($key);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  'description' => \yii\db\Schema::TYPE_TEXT,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Save data to database.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          [$type, $length] = $type;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $presence = 1;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          protected $close_state;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $instance->time_counting = isset($data['time_counting']) ? (int) $data['time_counting'] : null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              try {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $length = null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $db->createCommand()->delete($tableName, ['fieldid' => $this->fieldModel->getId(), 'valueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand->update('vtiger_field', ['defaultvalue' => $newValue], ['defaultvalue' => $previousValue, 'fieldid' => $row['fieldid']])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $moduleName = \App\Module::getModuleName($row['tabid']);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $eventHandler->trigger('PicklistAfterRename');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $eventHandler->setParams([
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return void
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $transaction = $db->beginTransaction();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand = \App\Db::getInstance()->createCommand();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get next sequence number.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getNextSeq(): int
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get writable fields.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getWritableFields(): array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Rename item value in other data.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $previousValue = $this->getPreviousValue('name');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $eventHandler = new \App\EventHandler();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $replaceValue = \App\Purifier::decodeHtml((new \App\Db\Query())->select([$this->fieldModel->getName()])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              $vId = $db->getUniqueID('vtiger_picklistvalues');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $db->createCommand()->update($tableName, $tableData, [$primaryKey => $this->getId()])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return (bool) $result;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if ($insertValueList = array_map(fn ($roleid) => [$roleid, $this->valueid, $picklistId], $this->roles)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          if ($this->fieldModel->isRoleBased()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return string
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get field model.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function isDeletable(): bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param int $replaceId Item ID
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return \Settings_Picklist_Field_Model
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getFieldModel(): \Settings_Picklist_Field_Model
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $tableName = $row['tablename'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand->update($tableName, [$columnName => $newValue], [$columnName => $previousValue])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              \App\Fields\Picklist::clearCache($fieldName, $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  foreach ($dataForSave as $tableName => $tableData) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $transaction->commit();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function rename()
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      } elseif ('u_#__picklist_close_state' === $tableName) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              } catch (\Throwable $ex) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  throw $ex;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return void
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return (int) (new \App\Db\Query())->from($this->getTableName())->max('sortorderid') + 1;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  \App\Fields\Picklist::clearCache($fieldName, $moduleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $transaction->rollBack();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $picklistId = \App\Fields\Picklist::getPicklistIdNr($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 121 characters
                      Open

                                      if ($insertValueList = array_map(fn ($roleid) => [$roleid, $this->valueid, $picklistId], $this->roles)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 144 characters
                      Open

                              return ['name', 'presence', 'sortorderid', 'presence', 'description', 'prefix', 'icon', 'record_state', 'time_counting', 'close_state'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $this->fieldModel;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return void
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'oldvalue' => $previousValue,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $fieldName = $this->fieldModel->getName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (!$this->getId() && $baseTable === $tableName) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $dbCommand->batchInsert('vtiger_role2picklist', ['roleid', 'picklistvalueid', 'picklistid'], $insertValueList)->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return int
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $dataReader = (new \App\Db\Query())->select(['tablename', 'columnname', 'fieldid', 'tabid'])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ->createCommand()->query();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $result = $db->createCommand()->insert($tableName, $tableData)->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $this->id = $db->getLastInsertID($tableName . '_' . $primaryKey . '_seq');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Update role permissions.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand->delete('vtiger_role2picklist', ['picklistvalueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($this->roles) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getTableName(): string
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              $tableData['picklist_valueid'] = $vId;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      } elseif ($baseTable === $tableName) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  \App\Log::error($ex->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function updateRolePermissions()
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return ['name', 'presence', 'sortorderid', 'presence', 'description', 'prefix', 'icon', 'record_state', 'time_counting', 'close_state'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Check if item is deletable.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($this->valueid && null !== $this->roles) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $columnName = $row['columnname'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get table name.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $primaryKey = \App\Fields\Picklist::getPickListId($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $fieldName = $this->fieldModel->getName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ->from('vtiger_field')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 172 characters
                      Open

                                              $db->createCommand()->insert($tableName, ['fieldid' => $this->fieldModel->getId(), 'valueid' => $this->valueid, 'value' => $this->name])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $this->updateRolePermissions();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return \App\Fields\Picklist::getPickListTableName($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $dbCommand = \App\Db::getInstance()->createCommand();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'newvalue' => $newValue,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'id' => $this->getId(),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          if ($this->close_state) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return 1 === $this->presence && $this->fieldModel->isEditable();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $newValue = $this->name;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              while ($row = $dataReader->read()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Delete item.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand = $db->createCommand();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->from($this->getTableName())
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              $this->set('valueid', $vId);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 144 characters
                      Open

                                          $db->createCommand()->delete($tableName, ['fieldid' => $this->fieldModel->getId(), 'valueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ->where(['fieldname' => $fieldName, 'uitype' => [15, 16, 33]])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function delete(int $replaceId)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $db = \App\Db::getInstance();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              $db->createCommand()->insert($tableName, ['fieldid' => $this->fieldModel->getId(), 'valueid' => $this->valueid, 'value' => $this->name])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 142 characters
                      Open

                                          $dbCommand->batchInsert('vtiger_role2picklist', ['roleid', 'picklistvalueid', 'picklistid'], $insertValueList)->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 143 characters
                      Open

                                  $dbCommand->update('vtiger_field', ['defaultvalue' => $newValue], ['defaultvalue' => $previousValue, 'fieldid' => $row['fieldid']])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'fieldname' => $fieldName,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'module' => $moduleName,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ]);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              try {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->where([$primaryKey => $replaceId])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Function formats data for saving.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $propertyModel->set('fieldvalue', $defaultValue);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'message' => \App\Language::translate('LBL_DUPLICATE', 'Settings:Picklist')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $propertyModel->set('fieldvalue', $this->get($fieldName));
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $fields;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->where(['fieldname' => $fieldName, 'uitype' => [15, 16, 33]])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              \App\Fields\Picklist::clearCache($fieldName, $this->fieldModel->getModuleName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $response = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->scalar());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->where(['source_field' => $this->fieldModel->getId(), 'source_id' => $this->getId()])->column();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->from('vtiger_field')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $columnName = $row['columnname'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 148 characters
                      Open

                                      $dbCommand->update('vtiger_field', ['defaultvalue' => $replaceValue], ['defaultvalue' => $this->name, 'fieldid' => $row['fieldid']])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          private function getValuesToSave(): array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $forSave[$itemPropertyModel->getTableName()][$itemPropertyModel->getColumnName()] = $this->{$name};
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  } elseif (isset($this->{$name}) && ($this->getId() || (!$this->getId() && '' !== $this->{$name}))) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return mixed
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $data;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get fields for edit.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function validate(): array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $response[] = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $dbCommand->update('vtiger_field', ['defaultvalue' => $replaceValue], ['defaultvalue' => $this->name, 'fieldid' => $row['fieldid']])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          ->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  throw $ex;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /** {@inheritdoc} */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getEditFields(): array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              foreach ($editFields as $fieldName) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($this->isDuplicateValue()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $dbCommand->delete('vtiger_role2picklist', ['picklistvalueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'module' => $moduleName,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getPreviousValue(?string $fieldName = '')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'replacevalue' => $replaceValue,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (\is_object($value) || 'value' === $name || 'changes' === $name || null === $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $fields = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($this->fieldModel->getModule()->isEntityModule()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($this->fieldModel->getFieldParams()['isProcessStatusField'] ?? false) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $editFields[] = 'time_counting';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $editFields[] = 'record_state';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (15 === $this->fieldModel->getUIType()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $dbCommand->delete('s_#__picklist_dependency_data', ['id' => $dependencyId, 'source_id' => $this->getId()])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 135 characters
                      Open

                                      $dbCommand->delete('s_#__picklist_dependency_data', ['id' => $dependencyId, 'source_id' => $this->getId()])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ->createCommand()->query();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  while ($row = $dataReader->read()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $transaction->commit();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              } catch (\Throwable $ex) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 128 characters
                      Open

                                  if ($itemPropertyModel && isset($this->{$name}) && ($this->getId() || (!$this->getId() && '' !== $this->{$name}))) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param string $fieldName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $value = implode(',', $value);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (!$this->getId()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $editFields[] = 'description';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $dbCommand->delete('u_#__picklist_close_state', ['valueid' => $this->valueid])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $eventHandler->trigger('PicklistAfterDelete');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($itemPropertyModel && isset($this->{$name}) && ($this->getId() || (!$this->getId() && '' !== $this->{$name}))) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dependencyId = (new \App\Db\Query())->select(['s_#__picklist_dependency.id'])->from('s_#__picklist_dependency')->innerJoin('s_#__picklist_dependency_data', 's_#__picklist_dependency_data.id = s_#__picklist_dependency.id')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $eventHandler->setParams([
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return array
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $forSave = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'sortorderid' => $this->getNextSeq(),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $forSave;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $data = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $editFields[] = 'icon';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $fields[$fieldName] = $propertyModel;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 234 characters
                      Open

                                  $dependencyId = (new \App\Db\Query())->select(['s_#__picklist_dependency.id'])->from('s_#__picklist_dependency')->innerJoin('s_#__picklist_dependency_data', 's_#__picklist_dependency_data.id = s_#__picklist_dependency.id')
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'valuetodelete' => [$this->name],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ]);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dataReader->close();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if (!$this->getId()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $forSave[$tableName][$name] = $this->{$name};
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getData()
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $data[$name] = $value;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (\App\Db::getInstance()->getTableSchema($this->getTableName())->getColumn('time_counting')) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $propertyModel = $this->getFieldInstanceByName($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dataReader = (new \App\Db\Query())->select(['tablename', 'columnname', 'fieldid', 'tabid'])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          ->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $transaction->rollBack();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              foreach ($fields as $name) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $this->validateValue($name, $this->{$name});
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get pervious value by field.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($dependencyId) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $dbCommand->update($tableName, [$columnName => $replaceValue], [$columnName => $this->name])
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'fieldname' => $fieldName,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $fields = $this->getId() ? array_keys($this->changes) : $this->getWritableFields();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if ($this->fieldModel->isRoleBased()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $dbCommand->delete($this->getTableName(), [$primaryKey => $this->getId()])->execute();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $tableName = $this->getTableName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $fieldName ? ($this->changes[$fieldName] ?? null) : $this->changes;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Basic validation.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'result' => false,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $tableName = $row['tablename'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $forSave[$this->getTableName()] = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $this->validateValue($name, $this->{$name});
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $editFields = ['name'];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $editFields[] = 'roles';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $editFields[] = 'close_state';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $moduleName = \App\Module::getModuleName($row['tabid']);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      \App\Fields\Picklist::clearCache($fieldName, $moduleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $eventHandler = new \App\EventHandler();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  \App\Log::error($ex->__toString());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      'presence' => $this->presence,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $itemPropertyModel = $this->getFieldInstanceByName($name);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              foreach (get_object_vars($this) as $name => $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      continue;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (\is_array($value)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  $editFields[] = 'prefix';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  if (null !== $this->get($fieldName)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  } elseif (($defaultValue = $propertyModel->get('defaultvalue')) !== null) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 122 characters
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_EXCEEDED_NUMBER_CHARACTERS||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_DUPLICATES_VALUES_FOUND||{$fieldName}||{$value}", 513);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param string $name
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::TEXT,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::HTML,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  unset($picklistValues[$this->id]);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              switch ($fieldName) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (!\App\Validator::integer($value)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (1 !== $value && 0 !== $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'validator' => [['name' => 'FieldLabel']]
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 1,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'tooltip' => 'LBL_BLOCKED_RECORD_INFO',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $picklistValues = \App\Fields\Picklist::getValuesName($this->fieldModel->getName());
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function validateValue(string $fieldName, $value)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Get fields instance by name.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_CLOSES_RECORD',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'color':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'description':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'time_counting':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  default:
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return Vtiger_Field_Model
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => $this->fieldModel->getMaxValue(),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_DESCRIPTION',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '65535',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'tooltip' => 'LBL_DESCRIPTION_PREFIXES',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'close_state':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 62,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (empty($value)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if ($itemPropertyModel->getMaxValue() && \strlen($value) > $itemPropertyModel->getMaxValue()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_ICON',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param string $fieldName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @param mixed  $value
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'sortorderid':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~O',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $itemPropertyModel = $this->getFieldInstanceByName($fieldName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_EXCEEDED_NUMBER_CHARACTERS||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 1,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_PREFIX',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'icon':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (1 !== $this->presence || !$this->fieldModel->isEditable()) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~O',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Validate item data.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $itemPropertyModel->getUITypeModel()->validate($value, false);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("LBL_NOT_FILLED_MANDATORY_FIELDS||{$fieldName}", 512);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~O',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => 'u_#__picklist_close_state'
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           */
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'record_state':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $this->fieldModel->getName(),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_ITEM_VALUE',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 56,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function getFieldInstanceByName($name)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $qualifiedModuleName = 'Settings:Picklist';
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~M',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'tooltip' => 'LBL_DESCRIPTION_VALUE_LIST',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::BOOL,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::TEXT,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if (preg_match('/[\<\>\"\#]/', $value)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_SPECIAL_CHARACTERS_NOT_ALLOWED||{$fieldName}||{$value}", 512);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $params = [];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              $tableName = $this->getTableName();
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::TEXT,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'C~O',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '5',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '255',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'name':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'icon':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $itemPropertyModel->getUITypeModel()->validate($value, false);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$fieldName}||{$value}", 406);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'name':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $params['isEditableReadOnly'] = true;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * Check if picklist value exists.
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'prefix':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           *
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 126 characters
                      Open

                                          throw new \App\Exceptions\IllegalValue("ERR_SPECIAL_CHARACTERS_NOT_ALLOWED||{$fieldName}||{$value}", 512);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      if ($this->isDuplicateValue($value, $this->getId())) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 300,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '25',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $response;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          public function isDuplicateValue(): bool
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              if ($this->id) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return \in_array(strtolower($this->name), array_map('strtolower', $picklistValues));
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          /**
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                           * @return void
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'prefix':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'close_state':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'presence':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              switch ($name) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'description':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'time_counting':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'picklistValues' => [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 146 characters
                      Open

                                              \App\RecordStatus::TIME_COUNTING_REACTION => \App\Language::translate('LBL_TIME_COUNTING_REACTION', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~O',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 140 characters
                      Open

                              return $params ? \Vtiger_Field_Model::init($qualifiedModuleName, $params, $name)->set('sourceFieldModel', $this->fieldModel) : null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                          }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'tooltip' => 'LBL_RECORD_STATE_INFO',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~M',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 16,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              \App\RecordStatus::TIME_COUNTING_REACTION => \App\Language::translate('LBL_TIME_COUNTING_REACTION', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          ],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_RECORD_STATE',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $params['picklistValues'][$key] = \App\Language::translate($value, $qualifiedModuleName);
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'picklistValues' => [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '250',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              \App\RecordStatus::TIME_COUNTING_IDLE => \App\Language::translate('LBL_TIME_COUNTING_IDLE', $qualifiedModuleName)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'record_state':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_ASSIGN_TO_ROLE',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '500',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 126 characters
                      Open

                                          $params['picklistValues'][$key] = \App\Language::translate($roleModel->get('rolename'), 'Settings:Roles');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  default:
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 144 characters
                      Open

                                              \App\RecordStatus::TIME_COUNTING_RESOLVE => \App\Language::translate('LBL_TIME_COUNTING_RESOLVE', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'defaultvalue' => 'all',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          $params['picklistValues'][$key] = \App\Language::translate($roleModel->get('rolename'), 'Settings:Roles');
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      foreach (\App\RecordStatus::getLabels() as $key => $value) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::TEXT,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              'all' => \App\Language::translate('LBL_ALL_ROLES', $qualifiedModuleName)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              \App\RecordStatus::TIME_COUNTING_RESOLVE => \App\Language::translate('LBL_TIME_COUNTING_RESOLVE', $qualifiedModuleName),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'maximumlength' => '250',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'defaultvalue' => \App\RecordStatus::RECORD_STATE_NO_CONCERN,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'picklistValues' => [],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'table' => $tableName
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Line exceeds 120 characters; contains 137 characters
                      Open

                                              \App\RecordStatus::TIME_COUNTING_IDLE => \App\Language::translate('LBL_TIME_COUNTING_IDLE', $qualifiedModuleName)
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      break;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'typeofdata' => 'V~M',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                              return $params ? \Vtiger_Field_Model::init($qualifiedModuleName, $params, $name)->set('sourceFieldModel', $this->fieldModel) : null;
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'label' => 'LBL_TIME_COUNTING',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          ],
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::INTEGER,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'column' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 33,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'name' => $name,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'defaultvalue' => 0,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      ];
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      foreach (\Settings_Roles_Record_Model::getAll() as $key => $roleModel) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      }
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'uitype' => 16,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'tooltip' => 'LBL_TIME_COUNTING_INFO',
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                              0 => \App\Language::translate('LBL_NONE', '_Base'),
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                      $params = [
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                          'purifyType' => \App\Purifier::INTEGER,
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Spaces must be used to indent lines; tabs are not allowed
                      Open

                                  case 'roles':
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      Space before opening parenthesis of function call prohibited
                      Open

                                      if ($insertValueList = array_map(fn ($roleid) => [$roleid, $this->valueid, $picklistId], $this->roles)) {
                      Severity: Minor
                      Found in app/Fields/Picklist/Item.php by phpcodesniffer

                      There are no issues that match your filters.

                      Category
                      Status