YetiForceCompany/YetiForceCRM

View on GitHub
tests/App/Language.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

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

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('TestString', \App\Language::translate('TestString', \App\Module::getModuleId('Leads')));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotEmpty(\App\Language::getLangInfo('pl-PL'));
Severity: Minor
Found in tests/App/Language.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\Session' in method 'testGetLanguage'.
Open

        \App\Session::set('language', 'pl-PL');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('TestKey', \App\Language::translateSingleMod('TestKey'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNull(\App\Language::initLocale());
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotEmpty(\App\Language::getJsStrings('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('', \App\Language::translate('', '_Base'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $currLang = \App\Language::getLanguage();
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame($currLang, \App\Language::getLanguage());
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        \App\Language::setTemporaryLanguage('en-US');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leady', \App\Language::translateEncodeHtml('Leads', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        \App\Language::setTemporaryLanguage('pt-BR');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertContains(\App\Language::getLanguageLabel('pl-PL'), ['Język Polski', 'Polski']);
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Lead', \App\Language::translateSingularModuleName('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotEmpty(\App\Language::getJsStrings('Settings'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('SINGLE_Leads', \App\Language::getSingularModuleName('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('TestString', \App\Language::translate('TestString', \App\Module::getModuleId('Leads')));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('pl-PL', \App\Language::getLanguage());
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('miesiąc', \App\Language::translate('LBL_MONTH'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertTrue('Ostrzeżenia systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 2));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', true));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', false));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertTrue('aaa z bbb są poprawne dla wybranego szablonu.' === \App\Language::translateArgs('LBL_VALID_RECORDS', 'Vtiger', 'aaa', 'bbb'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        \App\Language::setTemporaryLanguage('ru-RU');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertTrue('Ostrzeżeń systemowych' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 9));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 0));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        \App\Language::setTemporaryLanguage('pl-PL');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        \App\Language::setTemporaryLanguage('ro-RO');
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.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 "Leads" 32 times.
Open

        $this->assertSame('SINGLE_Leads', \App\Language::getSingularModuleName('Leads'));
Severity: Critical
Found in tests/App/Language.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 "Leads_1" 3 times.
Open

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.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 "pl-PL" 11 times.
Open

        \App\Session::set('language', 'pl-PL');
Severity: Critical
Found in tests/App/Language.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 "Leads_2" 5 times.
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.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 "Settings::Vtiger" 3 times.
Open

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Critical
Found in tests/App/Language.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 "PLU_SYSTEM_WARNINGS" 3 times.
Open

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Critical
Found in tests/App/Language.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 undeclared method \Tests\App\Language::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotNull
Open

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNull
Open

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotNull
Open

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 0));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Language::getJsStrings('Settings'));
Severity: Critical
Found in tests/App/Language.php by phan

Argument 2 (moduleName) is bool|int but \App\Language::translate() takes string defined at /code/app/Language.php:161
Open

        $this->assertSame('TestString', \App\Language::translate('TestString', \App\Module::getModuleId('Leads')));
Severity: Minor
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('pl-PL', \App\Language::getLanguage());
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame($currLang, \App\Language::getLanguage());
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Lead', \App\Language::translateSingularModuleName('Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Language::getLangInfo('pl-PL'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertTrue
Open

        $this->assertTrue('aaa z bbb są poprawne dla wybranego szablonu.' === \App\Language::translateArgs('LBL_VALID_RECORDS', 'Vtiger', 'aaa', 'bbb'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('SINGLE_Leads', \App\Language::getSingularModuleName('Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leady', \App\Language::translateEncodeHtml('Leads', 'Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertTrue
Open

        $this->assertTrue('Ostrzeżenia systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 2));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('TestString', \App\Language::translate('TestString', \App\Module::getModuleId('Leads')));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('miesiąc', \App\Language::translate('LBL_MONTH'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Language::getJsStrings('Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNull
Open

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNull
Open

        $this->assertNull(\App\Language::initLocale());
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertTrue
Open

        $this->assertTrue('Ostrzeżeń systemowych' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 9));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('TestKey', \App\Language::translateSingleMod('TestKey'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertTrue
Open

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNull
Open

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', true));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertNull
Open

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', false));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('', \App\Language::translate('', '_Base'));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertContains
Open

        $this->assertContains(\App\Language::getLanguageLabel('pl-PL'), ['Język Polski', 'Polski']);
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Critical
Found in tests/App/Language.php by phan

Call to undeclared method \Tests\App\Language::assertSame
Open

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Critical
Found in tests/App/Language.php by phan

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing translate method.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testTranslate()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing load language file function.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 138 characters
Open

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', false));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('TestKey', \App\Language::translateSingleMod('TestKey'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testGetLangInfo()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertTrue('aaa z bbb są poprawne dla wybranego szablonu.' === \App\Language::translateArgs('LBL_VALID_RECORDS', 'Vtiger', 'aaa', 'bbb'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertTrue('Ostrzeżeń systemowych' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 9));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', true));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testGetLanguage()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Language::getLangInfo('pl-PL'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leady', \App\Language::translateEncodeHtml('Leads', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing get language function.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $currLang = \App\Language::getLanguage();
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Language::getJsStrings('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', false));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 138 characters
Open

        $this->assertTrue('Ostrzeżeń systemowych' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 9));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing init locale function.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNull(\App\Language::initLocale());
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('TestString', \App\Language::translate('TestString', \App\Module::getModuleId('Leads')));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('pl-PL', \App\Language::getLanguage());
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('SINGLE_Leads', \App\Language::getSingularModuleName('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 154 characters
Open

        $this->assertTrue('aaa z bbb są poprawne dla wybranego szablonu.' === \App\Language::translateArgs('LBL_VALID_RECORDS', 'Vtiger', 'aaa', 'bbb'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Language::getJsStrings('Settings'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * @throws \App\Exceptions\AppException
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertContains(\App\Language::getLanguageLabel('pl-PL'), ['Język Polski', 'Polski']);
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_0', \App\Language::translatePluralized('Leads', 'Leads', 1));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testGetFromFile()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing get all languages data.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Language::getAll(true, true));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertTrue('Ostrzeżenia systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 2));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNull(\App\Language::translationModify('pl-PL', 'Leads', 'PHP', 'FileTestString', 'file_test_string_content', true));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Language::setTemporaryLanguage('pt-BR');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Language::setTemporaryLanguage('en-US');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Language::setTemporaryLanguage('ro-RO');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 53));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testGetAll()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing get language info by prefix.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('', \App\Language::translate('', '_Base'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testInitLocale()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing get javascript strings.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testGetJsStrings()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_1', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 5));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Session::set('language', 'pl-PL');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('miesiąc', \App\Language::translate('LBL_MONTH'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

        $this->assertTrue('Ostrzeżenie systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 1));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Leads_2', \App\Language::translatePluralized('Leads', 'Leads', 0));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing get from file method.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNotNull(\App\Language::getFromFile('Leads', 'pl-PL'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testLoadLanguageFile()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertNull(\App\Language::loadLanguageFile('pl-PL', 'Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame($currLang, \App\Language::getLanguage());
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        $this->assertSame('Lead', \App\Language::translateSingularModuleName('Leads'));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

        $this->assertTrue('Ostrzeżenia systemowe' === \App\Language::translatePluralized('PLU_SYSTEM_WARNINGS', 'Settings::Vtiger', 2));
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Language::setTemporaryLanguage('ru-RU');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

        \App\Language::setTemporaryLanguage('pl-PL');
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     * Testing translation files modification method.
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    public function testTranslationModify()
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/App/Language.php by phpcodesniffer

There are no issues that match your filters.

Category
Status