YetiForceCompany/YetiForceCRM

View on GitHub
app/Mail.php

Summary

Maintainability
A
0 mins
Test Coverage
D
60%

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

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Minor
Found in app/Mail.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 '138', column '26').
Open

            $queryGenerator = new \App\QueryGenerator('EmailTemplates');
Severity: Minor
Found in app/Mail.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 '160', column '15').
Open

        $ids = (new \App\Db\Query())->select(['u_#__documents_emailtemplates.crmid'])->from('u_#__documents_emailtemplates')
Severity: Minor
Found in app/Mail.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 getAttachmentsFromDocument has a boolean flag argument $returnOnlyName, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function getAttachmentsFromDocument($ids, $returnOnlyName = true)
Severity: Minor
Found in app/Mail.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 getTemplateList has a boolean flag argument $hideSystem, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function getTemplateList(string $moduleName = '', string $type = '', bool $hideSystem = true, ?int $userId = null)
Severity: Minor
Found in app/Mail.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 '185', column '17').
Open

        $query = (new \App\Db\Query())->select(['vtiger_attachments.*'])->from('vtiger_attachments')
Severity: Minor
Found in app/Mail.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 getTemplate has a boolean flag argument $attachments, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function getTemplate($id, bool $attachments = true): array
Severity: Minor
Found in app/Mail.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 'checkMailClient'.
Open

            return Cache::staticGet('MailCheckMailClient');
Severity: Minor
Found in app/Mail.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 'getSmtpById'.
Open

        Cache::save('SmtpServer', $smtpId, $smtp, Cache::LONG);
Severity: Minor
Found in app/Mail.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 'getDefaultSmtp'.
Open

        Cache::save('DefaultSmtp', '', $id, Cache::LONG);
Severity: Minor
Found in app/Mail.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\Record' in method 'getTemplate'.
Open

        if (!$id || !\App\Record::isExists($id, 'EmailTemplates')) {
Severity: Minor
Found in app/Mail.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 'getDefaultSmtp'.
Open

        if (Cache::has('DefaultSmtp', '')) {
Severity: Minor
Found in app/Mail.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 'getDefaultSmtp'.
Open

            $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->limit(1)->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromDocument'.
Open

        Cache::save('MailAttachmentsFromDocument', $cacheId, $attachments, Cache::LONG);
Severity: Minor
Found in app/Mail.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

            return Cache::get('SmtpServers', 'all');
Severity: Minor
Found in app/Mail.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 'getDefaultSmtp'.
Open

        $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.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 'getTemplateList'.
Open

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Minor
Found in app/Mail.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 'getTemplateIdFromSysName'.
Open

        if (Cache::has($cacheName, '')) {
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromTemplate'.
Open

        if (Cache::has('MailAttachmentsFromTemplete', $id)) {
Severity: Minor
Found in app/Mail.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 'checkMailClient'.
Open

        if (Cache::staticHas('MailCheckMailClient')) {
Severity: Minor
Found in app/Mail.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 'getDefaultSmtp'.
Open

            return Cache::get('DefaultSmtp', '');
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromDocument'.
Open

                $attachments[$filePath] = $returnOnlyName ? Purifier::decodeHtml($row['name']) : $row;
Severity: Minor
Found in app/Mail.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 'getSmtpById'.
Open

            return Cache::get('SmtpServer', $smtpId);
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromDocument'.
Open

        if (Cache::has('MailAttachmentsFromDocument', $cacheId)) {
Severity: Minor
Found in app/Mail.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 (Cache::has('SmtpServers', 'all')) {
Severity: Minor
Found in app/Mail.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 'getTemplateIdFromSysName'.
Open

            $templates = Cache::get($cacheName, '');
Severity: Minor
Found in app/Mail.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\Privilege' in method 'checkMailClient'.
Open

        $return = \Config\Main::$isActiveSendingMails && \App\Privilege::isPermitted('OSSMail');
Severity: Minor
Found in app/Mail.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 'checkInternalMailClient'.
Open

            return Cache::staticGet('MailCheckInternalMailClient');
Severity: Minor
Found in app/Mail.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 '\Vtiger_Record_Model' in method 'getTemplate'.
Open

        $template = \Vtiger_Record_Model::getInstanceById($id, 'EmailTemplates');
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromTemplate'.
Open

        Cache::save('MailAttachmentsFromTemplete', $id, $attachments, Cache::LONG);
Severity: Minor
Found in app/Mail.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 'getSmtpById'.
Open

        if (Cache::has('SmtpServer', $smtpId)) {
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromTemplate'.
Open

            return Cache::get('MailAttachmentsFromTemplete', $id);
Severity: Minor
Found in app/Mail.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 'getAll'.
Open

        $all = (new Db\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.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 'getTemplateIdFromSysName'.
Open

            Cache::save($cacheName, '', $templates, Cache::LONG);
Severity: Minor
Found in app/Mail.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 'getAttachmentsFromDocument'.
Open

            return Cache::get('MailAttachmentsFromDocument', $cacheId);
Severity: Minor
Found in app/Mail.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

        Cache::save('SmtpServers', 'all', $all, Cache::LONG);
Severity: Minor
Found in app/Mail.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 'checkInternalMailClient'.
Open

        if (Cache::staticHas('MailCheckInternalMailClient')) {
Severity: Minor
Found in app/Mail.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 getTemplateIdFromSysName uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $queryGenerator = new \App\QueryGenerator('EmailTemplates');
            $queryGenerator->setFields(['id']);
            $queryGenerator->permissions = false;
            $queryGenerator->addNativeCondition(['not', ['sys_name' => null]]);
Severity: Minor
Found in app/Mail.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\Cache' in method 'checkMailClient'.
Open

        Cache::staticSave('MailCheckMailClient', '', $return);
Severity: Minor
Found in app/Mail.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 'checkInternalMailClient'.
Open

        Cache::staticSave('MailCheckInternalMailClient', '', $return);
Severity: Minor
Found in app/Mail.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 "DefaultSmtp" 3 times.
Open

        if (Cache::has('DefaultSmtp', '')) {
Severity: Critical
Found in app/Mail.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 "SmtpServer" 3 times.
Open

        if (Cache::has('SmtpServer', $smtpId)) {
Severity: Critical
Found in app/Mail.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 "EmailTemplates" 4 times.
Open

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Critical
Found in app/Mail.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 "s_#__mail_smtp" 3 times.
Open

        $all = (new Db\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));
Severity: Critical
Found in app/Mail.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 "MailAttachmentsFromDocument" 3 times.
Open

        if (Cache::has('MailAttachmentsFromDocument', $cacheId)) {
Severity: Critical
Found in app/Mail.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 "admin" 3 times.
Open

        $all = (new Db\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));
Severity: Critical
Found in app/Mail.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 "MailCheckMailClient" 3 times.
Open

        if (Cache::staticHas('MailCheckMailClient')) {
Severity: Critical
Found in app/Mail.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 "MailAttachmentsFromTemplete" 3 times.
Open

        if (Cache::has('MailAttachmentsFromTemplete', $id)) {
Severity: Critical
Found in app/Mail.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 "MailCheckInternalMailClient" 3 times.
Open

        if (Cache::staticHas('MailCheckInternalMailClient')) {
Severity: Critical
Found in app/Mail.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 "SmtpServers" 3 times.
Open

        if (Cache::has('SmtpServers', 'all')) {
Severity: Critical
Found in app/Mail.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.

Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

        $queryGenerator->setFields(['id', 'name', 'module_name']);
Severity: Critical
Found in app/Mail.php by phan

Argument 2 (key) is int but \App\Cache::save() takes string defined at /code/app/Cache.php:89
Open

        Cache::save('SmtpServer', $smtpId, $smtp, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phan

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

        $return = self::checkMailClient() && 1 === (int) \App\User::getCurrentUserModel()->getDetail('internal_mailer') && file_exists(ROOT_DIRECTORY . '/public_html/modules/OSSMail/roundcube/');
Severity: Critical
Found in app/Mail.php by phan

Suspicious type true of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

        $cacheId = "$returnOnlyName|" . \is_array($ids) ? implode(',', $ids) : $ids;
Severity: Minor
Found in app/Mail.php by phan

Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator->addNativeCondition(['not', ['sys_name' => null]]);
Severity: Critical
Found in app/Mail.php by phan

Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $templates = $queryGenerator->createQuery()->select(['sys_name', 'emailtemplatesid'])->createCommand()->queryAllByGroup();
Severity: Critical
Found in app/Mail.php by phan

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

            $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->limit(1)->scalar(Db::getInstance('admin'));
Severity: Critical
Found in app/Mail.php by phan

Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Critical
Found in app/Mail.php by phan

Call to method addCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator->addCondition('module_name', $moduleName, 'e');
Severity: Critical
Found in app/Mail.php by phan

Argument 2 (key) is int but \App\Cache::has() takes string defined at /code/app/Cache.php:74
Open

        if (Cache::has('SmtpServer', $smtpId)) {
Severity: Minor
Found in app/Mail.php by phan

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

        $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));
Severity: Critical
Found in app/Mail.php by phan

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

        $ids = (new \App\Db\Query())->select(['u_#__documents_emailtemplates.crmid'])->from('u_#__documents_emailtemplates')
Severity: Critical
Found in app/Mail.php by phan

Reference to static property isActiveSendingMails from undeclared class \Config\Main
Open

        $return = \Config\Main::$isActiveSendingMails && \App\Privilege::isPermitted('OSSMail');
Severity: Critical
Found in app/Mail.php by phan

Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

        return $queryGenerator->createQuery()->all();
Severity: Critical
Found in app/Mail.php by phan

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

        $all = (new Db\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));
Severity: Critical
Found in app/Mail.php by phan

Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator->setFields(['id']);
Severity: Critical
Found in app/Mail.php by phan

Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator = new \App\QueryGenerator('EmailTemplates');
Severity: Critical
Found in app/Mail.php by phan

Argument 2 (key) is int but \App\Cache::get() takes string defined at /code/app/Cache.php:61
Open

            return Cache::get('SmtpServer', $smtpId);
Severity: Minor
Found in app/Mail.php by phan

Reference to instance property permissions from undeclared class \App\QueryGenerator
Open

            $queryGenerator->permissions = false;
Severity: Minor
Found in app/Mail.php by phan

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

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Critical
Found in app/Mail.php by phan

Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator->addNativeCondition(['u_#__emailtemplates.sys_name' => [null, '']]);
Severity: Critical
Found in app/Mail.php by phan

Suspicious type bool of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

        $cacheId = "$returnOnlyName|" . \is_array($ids) ? implode(',', $ids) : $ids;
Severity: Minor
Found in app/Mail.php by phan

Call to method addCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $queryGenerator->addCondition('email_template_type', $type, 'e');
Severity: Critical
Found in app/Mail.php by phan

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

        $query = (new \App\Db\Query())->select(['vtiger_attachments.*'])->from('vtiger_attachments')
Severity: Critical
Found in app/Mail.php by phan

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

    public static function getTemplate($id, bool $attachments = true): array
Severity: Minor
Found in app/Mail.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 $id. Configured minimum length is 3.
Open

        $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.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 $id. Configured minimum length is 3.
Open

    public static function getAttachmentsFromTemplate($id)
Severity: Minor
Found in app/Mail.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

Only one argument is allowed per line in a multi-line function call
Open

            $template->getData(), static::getAttachmentsFromTemplate($template->getId())
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (Cache::has('SmtpServer', $smtpId)) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (isset($servers[$smtpId])) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $all = (new Db\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Get template ID.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

            return Cache::get('SmtpServer', $smtpId);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return array_merge(
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

    public static function getDefaultSmtp()
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

     * @param string   $type
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        if (!$attachments) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $queryGenerator->permissions = false;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $smtp;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Get a list of all smtp servers.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

    public static function getAll()
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

    public static function getTemplateList(string $moduleName = '', string $type = '', bool $hideSystem = true, ?int $userId = null)
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $queryGenerator = new \App\QueryGenerator('EmailTemplates', $userId ?? \App\User::getCurrentUserId());
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param int|string $id
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $queryGenerator = new \App\QueryGenerator('EmailTemplates');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

    public static function getSmtpById(int $smtpId): array
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if (Cache::has('SmtpServers', 'all')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param bool     $hideSystem
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param int|null $userId
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

            return $template->getData();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            Cache::save($cacheName, '', $templates, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $smtp = $servers[$smtpId];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

Line exceeds 120 characters; contains 132 characters
Open

    public static function getTemplateList(string $moduleName = '', string $type = '', bool $hideSystem = true, ?int $userId = null)
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $queryGenerator->addCondition('module_name', $moduleName, 'e');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

     * Get template list for module.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        if ($hideSystem) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Get mail template.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if (!$id || !\App\Record::isExists($id, 'EmailTemplates')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $templates = $queryGenerator->createQuery()->select(['sys_name', 'emailtemplatesid'])->createCommand()->queryAllByGroup();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        return $id;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if ($moduleName) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $queryGenerator->addNativeCondition(['u_#__emailtemplates.sys_name' => [null, '']]);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

    public static function getTemplate($id, bool $attachments = true): array
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (!is_numeric($id)) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $id = self::getTemplateIdFromSysName($id);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        return $templates[$name] ?? null;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

        $queryGenerator->setFields(['id', 'name', 'module_name']);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        $cacheName = 'TemplateIdFromSysName';
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (Cache::has($cacheName, '')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        $smtp = [];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        Cache::save('SmtpServers', 'all', $all, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $all;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            return Cache::get('DefaultSmtp', '');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param bool       $attachments
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        );
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

    public static function getTemplateIdFromSysName(string $name): ?int
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if (!$id) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        Cache::save('DefaultSmtp', '', $id, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            return [];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            $templates = Cache::get($cacheName, '');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $queryGenerator->setFields(['id']);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Get smtp server by id.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param int $smtpId
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        Cache::save('SmtpServer', $smtpId, $smtp, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

            $queryGenerator->addCondition('email_template_type', $type, 'e');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        $template = \Vtiger_Record_Model::getInstanceById($id, 'EmailTemplates');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

     * Get default smtp Id.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

     * @param string $name
Severity: Minor
Found in app/Mail.php by phpcodesniffer

Line exceeds 120 characters; contains 134 characters
Open

            $templates = $queryGenerator->createQuery()->select(['sys_name', 'emailtemplatesid'])->createCommand()->queryAllByGroup();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            return Cache::get('SmtpServers', 'all');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

Line exceeds 120 characters; contains 130 characters
Open

        $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $id = (new Db\Query())->select(['id'])->from('s_#__mail_smtp')->limit(1)->scalar(Db::getInstance('admin'));
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            $queryGenerator->addNativeCondition(['not', ['sys_name' => null]]);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $servers = static::getAll();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        return $queryGenerator->createQuery()->all();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $template->getData(), static::getAttachmentsFromTemplate($template->getId())
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

        if (Cache::has('DefaultSmtp', '')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if ($type) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

     * Get attachments email template.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

            $filePath = realpath(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . $row['path'] . $row['attachmentsid']);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

    public static function checkInternalMailClient(): bool
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            ->innerJoin('vtiger_crmentity', 'u_#__documents_emailtemplates.relcrmid = vtiger_crmentity.crmid')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if ($ids) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            ->innerJoin('vtiger_seattachmentsrel', 'vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $attachments;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

                $attachments[$filePath] = $returnOnlyName ? Purifier::decodeHtml($row['name']) : $row;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            return Cache::staticGet('MailCheckMailClient');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

Line exceeds 120 characters; contains 195 characters
Open

        $return = self::checkMailClient() && 1 === (int) \App\User::getCurrentUserModel()->getDetail('internal_mailer') && file_exists(ROOT_DIRECTORY . '/public_html/modules/OSSMail/roundcube/');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

    public static function checkMailClient(): bool
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

Line exceeds 120 characters; contains 124 characters
Open

        $ids = (new \App\Db\Query())->select(['u_#__documents_emailtemplates.crmid'])->from('u_#__documents_emailtemplates')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        Cache::save('MailAttachmentsFromTemplete', $id, $attachments, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

            ->where(['vtiger_seattachmentsrel.crmid' => $ids]);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if (Cache::staticHas('MailCheckInternalMailClient')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $return = self::checkMailClient() && 1 === (int) \App\User::getCurrentUserModel()->getDetail('internal_mailer') && file_exists(ROOT_DIRECTORY . '/public_html/modules/OSSMail/roundcube/');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

     * @param int|int[] $ids
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

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

Line exceeds 120 characters; contains 126 characters
Open

            ->innerJoin('vtiger_seattachmentsrel', 'vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $return = \Config\Main::$isActiveSendingMails && \App\Privilege::isPermitted('OSSMail');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $return;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param int|string $id
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        if (Cache::has('MailAttachmentsFromTemplete', $id)) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

        Cache::staticSave('MailCheckMailClient', '', $return);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            return Cache::staticGet('MailCheckInternalMailClient');
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

        Cache::save('MailAttachmentsFromDocument', $cacheId, $attachments, Cache::LONG);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $return;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

            if (is_file($filePath)) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (Cache::staticHas('MailCheckMailClient')) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            ->where(['vtiger_crmentity.deleted' => 0, 'u_#__documents_emailtemplates.relcrmid' => $id])->column();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Get attachments from document.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $cacheId = "$returnOnlyName|" . \is_array($ids) ? implode(',', $ids) : $ids;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        return $attachments;
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @return bool
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            return Cache::get('MailAttachmentsFromTemplete', $id);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $ids = (new \App\Db\Query())->select(['u_#__documents_emailtemplates.crmid'])->from('u_#__documents_emailtemplates')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $query = (new \App\Db\Query())->select(['vtiger_attachments.*'])->from('vtiger_attachments')
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @return bool
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

            return Cache::get('MailAttachmentsFromDocument', $cacheId);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        Cache::staticSave('MailCheckInternalMailClient', '', $return);
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

    public static function getAttachmentsFromTemplate($id)
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

            $attachments['attachments'] = ['ids' => $ids];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * @param mixed     $returnOnlyName
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Check if the user has access to the mail client.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

     * Check if the user has access to the internal mail client.
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $attachments = [];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

    public static function getAttachmentsFromDocument($ids, $returnOnlyName = true)
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        if (Cache::has('MailAttachmentsFromDocument', $cacheId)) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

        $attachments = [];
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        $dataReader = $query->createCommand()->query();
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

        while ($row = $dataReader->read()) {
Severity: Minor
Found in app/Mail.php by phpcodesniffer

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

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

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

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

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

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

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

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

There are no issues that match your filters.

Category
Status