YetiForceCompany/YetiForceCRM

View on GitHub
app/Fields/Currency.php

Summary

Maintainability
A
45 mins
Test Coverage
F
50%

Function getAll has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getAll($onlyActive = false)
    {
        if (\App\Cache::has('CurrencyGetAll', 'All')) {
            $currencies = \App\Cache::get('CurrencyGetAll', 'All');
        } else {
Severity: Minor
Found in app/Fields/Currency.php - About 45 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

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

            $currencies = (new \App\Db\Query())->from('vtiger_currencies')->indexBy('currency_code')->all();
Severity: Minor
Found in app/Fields/Currency.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

The method getAll has a boolean flag argument $onlyActive, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function getAll($onlyActive = false)
Severity: Minor
Found in app/Fields/Currency.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

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

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Minor
Found in app/Fields/Currency.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

The method formatToDisplay has a boolean flag argument $skipFormatting, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function formatToDisplay($value, $user = null, $skipConversion = false, $skipFormatting = false)
Severity: Minor
Found in app/Fields/Currency.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method formatToDisplay has a boolean flag argument $skipConversion, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function formatToDisplay($value, $user = null, $skipConversion = false, $skipFormatting = false)
Severity: Minor
Found in app/Fields/Currency.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

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

            $currencies = (new \App\Db\Query())->from('vtiger_currency_info')->where(['deleted' => 0])->indexBy('id')->all();
Severity: Minor
Found in app/Fields/Currency.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

The method getIdByCode has a boolean flag argument $active, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function getIdByCode(string $code, bool $active = true): ?int
Severity: Minor
Found in app/Fields/Currency.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Avoid using static access to class '\App\Cache' in method 'getAll'.
Open

            $currencies = \App\Cache::get('CurrencyGetAll', 'All');
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'getSupported'.
Open

        if (\App\Cache::has('CurrencySupported', 'All')) {
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'getSupported'.
Open

            $currencies = \App\Cache::get('CurrencySupported', 'All');
Severity: Minor
Found in app/Fields/Currency.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 'addCurrency'.
Open

            \App\Log::error('No currency code to add found: ' . $code);
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'getAll'.
Open

        if (\App\Cache::has('CurrencyGetAll', 'All')) {
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'clearCache'.
Open

        \App\Cache::delete('CurrencyGetAll', 'All');
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'getAll'.
Open

            \App\Cache::save('CurrencyGetAll', 'All', $currencies);
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'getSupported'.
Open

            \App\Cache::save('CurrencySupported', 'All', $currencies);
Severity: Minor
Found in app/Fields/Currency.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\Cache' in method 'clearCache'.
Open

        \App\Cache::delete('CurrencySupported', 'All');
Severity: Minor
Found in app/Fields/Currency.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

The method getAll uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $currencies = (new \App\Db\Query())->from('vtiger_currency_info')->where(['deleted' => 0])->indexBy('id')->all();
            \App\Cache::save('CurrencyGetAll', 'All', $currencies);
        }
Severity: Minor
Found in app/Fields/Currency.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\CurrencyField' in method 'formatToDisplay'.
Open

        return \CurrencyField::convertToUserFormat($value, $user, $skipConversion, $skipFormatting);
Severity: Minor
Found in app/Fields/Currency.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\User' in method 'formatToDb'.
Open

        $currentUser = \App\User::getCurrentUserModel();
Severity: Minor
Found in app/Fields/Currency.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

The method getSupported uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $currencies = (new \App\Db\Query())->from('vtiger_currencies')->indexBy('currency_code')->all();
            \App\Cache::save('CurrencySupported', 'All', $currencies);
        }
Severity: Minor
Found in app/Fields/Currency.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

        $db = \App\Db::getInstance();
Severity: Minor
Found in app/Fields/Currency.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

Define a constant instead of duplicating this literal "CurrencySupported" 4 times.
Open

        if (\App\Cache::has('CurrencySupported', 'All')) {
Severity: Critical
Found in app/Fields/Currency.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "currency_code" 3 times.
Open

        return array_column(static::getAll($active), 'id', 'currency_code')[\strtoupper($code)] ?? null;
Severity: Critical
Found in app/Fields/Currency.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "currency_name" 3 times.
Open

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Critical
Found in app/Fields/Currency.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_currency_info" 3 times.
Open

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Critical
Found in app/Fields/Currency.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "CurrencyGetAll" 4 times.
Open

        if (\App\Cache::has('CurrencyGetAll', 'All')) {
Severity: Critical
Found in app/Fields/Currency.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Doc-block of formatToDb has declared return type float which is not a permitted replacement of the nullable return type ?float declared in the signature ('?T' should be documented as 'T|null' or '?T')
Open

     * @return float
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to undeclared method \App\Db\Query::from
Open

            $currencies = (new \App\Db\Query())->from('vtiger_currencies')->indexBy('currency_code')->all();
Severity: Critical
Found in app/Fields/Currency.php by phan

Parameter $currencyName has undeclared type \App\Fields\type
Open

    public static function getCurrencyIdByName($currencyName)
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to undeclared method \App\Db::createCommand
Open

        $db->createCommand()
Severity: Critical
Found in app/Fields/Currency.php by phan

Returning type 0 but formatToDisplay() is declared to return string
Open

            return 0;
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to method error from undeclared class \App\Log
Open

            \App\Log::error('No currency code to add found: ' . $code);
Severity: Critical
Found in app/Fields/Currency.php by phan

Returning type string but addCurrency() is declared to return int|null
Open

        return $db->getLastInsertID('vtiger_currency_info_id_seq');
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Critical
Found in app/Fields/Currency.php by phan

Call to deprecated function \CurrencyField::convertToUserFormat() defined at /code/include/fields/CurrencyField.php:144
Open

        return \CurrencyField::convertToUserFormat($value, $user, $skipConversion, $skipFormatting);
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to undeclared method \App\Db\Query::from
Open

            $currencies = (new \App\Db\Query())->from('vtiger_currency_info')->where(['deleted' => 0])->indexBy('id')->all();
Severity: Critical
Found in app/Fields/Currency.php by phan

Returning type string but formatToDb() is declared to return ?float|float
Open

        return $value;
Severity: Minor
Found in app/Fields/Currency.php by phan

Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        $currentUser = \App\User::getCurrentUserModel();
Severity: Critical
Found in app/Fields/Currency.php by phan

Returning type 1 but getCurrencyIdByName() is declared to return \App\Fields\type
Open

        return $currencyId;
Severity: Minor
Found in app/Fields/Currency.php by phan

Return type of getCurrencyIdByName() is undeclared type \App\Fields\type
Open

    public static function getCurrencyIdByName($currencyName)
Severity: Minor
Found in app/Fields/Currency.php by phan

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

        $db = \App\Db::getInstance();
Severity: Minor
Found in app/Fields/Currency.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

    public static function getCurrencyByModule(int $record, string $moduleName)
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @return type
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

Line exceeds 120 characters; contains 152 characters
Open

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        return \CurrencyField::convertToUserFormat($value, $user, $skipConversion, $skipFormatting);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

        return array_column(static::getAll($active), 'id', 'currency_code')[\strtoupper($code)] ?? null;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

     * Get currency by id.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

    public static function getSupported(): array
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

    public static function formatToDb(string $value): ?float
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

    public static function getIdByCode(string $code, bool $active = true): ?int
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

            foreach ($currencies as $id => $currency) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        $row = (new \App\Db\Query())->select(['id'])->from('vtiger_currency_info')->where(['currency_name' => $currencyName, 'deleted' => 0])->scalar();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @return int|null
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param bool $onlyActive
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Get supported currencies.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        } else {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param string     $value          Date time
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param int    $record
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        return $currencies;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

        if (!\is_numeric($value)) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * @param string $code
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        if ($onlyActive) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            $currencies = (new \App\Db\Query())->from('vtiger_currencies')->indexBy('currency_code')->all();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * @param string $moduleName
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

            $currencies = \App\Cache::get('CurrencyGetAll', 'All');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param mixed      $skipConversion
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            return 0;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $currentUser = \App\User::getCurrentUserModel();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

     * @param type $currencyName
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            $currencyId = $row;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

        if (\App\Cache::has('CurrencyGetAll', 'All')) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

                if ('Active' !== $currency['currency_status']) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

                    unset($currencies[$id]);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        if ($row) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param bool   $active
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * Function returns the currency in user specified format.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        if (empty($value)) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            return null;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

            $currencies = (new \App\Db\Query())->from('vtiger_currency_info')->where(['deleted' => 0])->indexBy('id')->all();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

Line exceeds 120 characters; contains 125 characters
Open

            $currencies = (new \App\Db\Query())->from('vtiger_currency_info')->where(['deleted' => 0])->indexBy('id')->all();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

    public static function formatToDisplay($value, $user = null, $skipConversion = false, $skipFormatting = false)
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

        $currencyId = 1;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * Get currency id by name.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * Get all currencies.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * @param int $currencyId
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        } else {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

     * @param mixed|null $user
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param mixed      $skipFormatting
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Function to get value for db format.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        if (empty($value)) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            return 0;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

Line exceeds 120 characters; contains 170 characters
Open

        $value = str_replace([$currentUser->getDetail('currency_grouping_separator'), $currentUser->getDetail('currency_decimal_separator'), ' '], ['', '.', ''], $value);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        return \Vtiger_Record_Model::getInstanceById($record, $moduleName)->get('currency_id');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Get currency by code.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

            \App\Cache::save('CurrencySupported', 'All', $currencies);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * @param string $value
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        return $value;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Get currency by module name.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

    public static function getAll($onlyActive = false)
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        return $currencies;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

            $currencies = \App\Cache::get('CurrencySupported', 'All');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

     * @return float
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        $value = str_replace([$currentUser->getDetail('currency_grouping_separator'), $currentUser->getDetail('currency_decimal_separator'), ' '], ['', '.', ''], $value);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

    public static function getCurrencyIdByName($currencyName)
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        return $currencyId;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            \App\Cache::save('CurrencyGetAll', 'All', $currencies);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        if (\App\Cache::has('CurrencySupported', 'All')) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            return null;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        return false;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

                'currency_status' => 'Active',
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        \App\Cache::delete('CurrencyGetAll', 'All');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

    public static function addCurrency(string $code): ?int
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        $supported = self::getSupported();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

                'currency_symbol' => $supported[$code]['currency_symbol'],
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        self::clearCache();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @return array|bool
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        if (empty($supported[$code])) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            \App\Log::error('No currency code to add found: ' . $code);
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

    public static function getById(int $currencyId)
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Get current default currency data.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Function clears cache.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

    public static function clearCache(): void
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

                'currency_code' => $code,
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        $currencyInfo = static::getAll();
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        \App\Cache::delete('CurrencySupported', 'All');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        foreach (self::getAll(true) as $currency) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

     * @return int|null
Severity: Minor
Found in app/Fields/Currency.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/Currency.php by phpcodesniffer

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

                return $currency;
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

                'conversion_rate' => 1,
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            if (-11 === (int) $currency['defaultid']) {
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

            ->insert('vtiger_currency_info', [
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        $db->createCommand()
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

        return $db->getLastInsertID('vtiger_currency_info_id_seq');
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

                'currency_name' => $supported[$code]['currency_name'],
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

        return $currencyInfo[$currencyId] ?? [];
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

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

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

    public static function getDefault()
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * Add the currency by code.
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

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

     * @param string $code
Severity: Minor
Found in app/Fields/Currency.php by phpcodesniffer

There are no issues that match your filters.

Category
Status