YetiForceCompany/YetiForceCRM

View on GitHub
tests/App/Encryption.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '26', column '19').
Open

        $instance = new \App\Encryption();
Severity: Minor
Found in tests/App/Encryption.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 '36', column '19').
Open

        $instance = new \App\Encryption();
Severity: Minor
Found in tests/App/Encryption.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

Avoid using static access to class '\App\Encryption' in method 'testEncryptionModule'.
Open

        $instance = clone \App\Encryption::getInstance(\App\Module::getModuleId('Passwords'));
Severity: Minor
Found in tests/App/Encryption.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\Config' in method 'testEncryptionWithPass'.
Open

        \App\Config::set('securityKeys', 'encryptionMethod', $method);
Severity: Minor
Found in tests/App/Encryption.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 'testEncryptionModule'.
Open

        $instance = clone \App\Encryption::getInstance(\App\Module::getModuleId('Passwords'));
Severity: Minor
Found in tests/App/Encryption.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\Encryption' in method 'testEncryptionWithPass'.
Open

            'method in getMethods' => \in_array($instance->get('method'), \App\Encryption::getMethods()),
Severity: Minor
Found in tests/App/Encryption.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\Encryption' in method 'testEncryptionWithPass'.
Open

        $instance = clone \App\Encryption::getInstance();
Severity: Minor
Found in tests/App/Encryption.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\Encryption' in method 'testAvailableMethods'.
Open

        $this->assertTrue(!empty(\App\Encryption::getMethods()), 'The system does not support any methods to encryption');
Severity: Minor
Found in tests/App/Encryption.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\Config' in method 'testEncryptionWithPass'.
Open

        \App\Config::set('securityKeys', 'encryptionPass', $password);
Severity: Minor
Found in tests/App/Encryption.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\Config' in method 'testEncryptionWithPass'.
Open

            'method !== securityKeys(\'encryptionMethod\')' => $instance->get('method') !== \App\Config::securityKeys('encryptionMethod'),
Severity: Minor
Found in tests/App/Encryption.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\Config' in method 'testEncryptionWithPass'.
Open

        $instance->set('pass', \App\Config::securityKeys('encryptionPass'));
Severity: Minor
Found in tests/App/Encryption.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 "TEST TEXT" 4 times.
Open

        $testText = 'TEST TEXT';
Severity: Critical
Found in tests/App/Encryption.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 "1234567890123456" 4 times.
Open

            ['aes-256-cbc', '1234567890123456'],
Severity: Critical
Found in tests/App/Encryption.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 "method" 5 times.
Open

        $instance->set('method', $method);
Severity: Critical
Found in tests/App/Encryption.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 getMethods from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

        $this->assertTrue(!empty(\App\Encryption::getMethods()), 'The system does not support any methods to encryption');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertTrue(!empty($encryptText), 'Encryption is not available');
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to method decrypt from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

        $this->assertSame($testText, $instance->decrypt($testText), 'Encryption should be disabeld');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertSame($testText, $instance->decrypt($testText), 'Encryption should be disabeld');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertSame($testText, $instance->decrypt($encryptText), 'The decrypted text does not match the encrypted text');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

                $this->assertTrue(!empty($encryptText), 'Encryption is not available');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

            $this->assertSame($testText, $instance->decrypt($encryptText, true), 'The decrypted text does not match the encrypted text');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $instance = new \App\Encryption();
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to method getInstance from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

        $instance = clone \App\Encryption::getInstance(\App\Module::getModuleId('Passwords'));
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $instance = new \App\Encryption();
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to method encrypt from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

        $this->assertSame($testText, $instance->encrypt($testText), 'Encryption should be disabeld');
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to method getMethods from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

            'method in getMethods' => \in_array($instance->get('method'), \App\Encryption::getMethods()),
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to undeclared method \Tests\App\Encryption::assertNotSame
Open

                $this->assertNotSame($testText, $encryptText, 'Encryption is not working');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertTrue(!empty(\App\Encryption::getMethods()), 'The system does not support any methods to encryption');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertSame($testText, $instance->encrypt($testText), 'Encryption should be disabeld');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertTrue($instance->isActive(), 'The encryption mechanism is not active');
Severity: Critical
Found in tests/App/Encryption.php by phan

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

        $this->assertTrue($instance->isActive(true), 'The encryption mechanism is not active');
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to undeclared method \Tests\App\Encryption::assertNotSame
Open

        $this->assertNotSame($testText, $encryptText, 'Encryption is not working');
Severity: Critical
Found in tests/App/Encryption.php by phan

Call to method getInstance from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
Open

        $instance = clone \App\Encryption::getInstance();
Severity: Critical
Found in tests/App/Encryption.php by phan

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

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

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

    public function testEncryptionWithPass(string $method, string $password)
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertSame($testText, $instance->decrypt($encryptText), 'The decrypted text does not match the encrypted text');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

        $instance = new \App\Encryption();
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * Provide test data for testEncryptionWithPass function.
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

            ['aes-256-ctr', '1234567890123456'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            ['aes-192-cbc', '1234567890123456'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            ['aes-192-ctr', '1234567890123456'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * Testing process function.
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $testText = 'TEST TEXT';
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertTrue(!empty($encryptText), 'Encryption is not available');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertSame($testText, $instance->encrypt($testText), 'Encryption should be disabeld');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @param string $password
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

                $this->assertNotSame($testText, $encryptText, 'Encryption is not working');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

     * @param string $method
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance = clone \App\Encryption::getInstance();
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

Line exceeds 120 characters; contains 138 characters
Open

            'method !== securityKeys(\'encryptionMethod\')' => $instance->get('method') !== \App\Config::securityKeys('encryptionMethod'),
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $encryptText = $instance->encrypt($testText);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

Line exceeds 120 characters; contains 127 characters
Open

        $this->assertSame($testText, $instance->decrypt($encryptText), 'The decrypted text does not match the encrypted text');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance->set('vector', $password);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        foreach (['TEST TEXT', ''] as $testText) {
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        ];
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

            'method in getMethods' => \in_array($instance->get('method'), \App\Encryption::getMethods()),
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertTrue($instance->isActive(true), 'The encryption mechanism is not active');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            $this->assertSame($testText, $instance->decrypt($encryptText, true), 'The decrypted text does not match the encrypted text');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * Test decrypt data when encryption is disabled.
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

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

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

        $instance = clone \App\Encryption::getInstance(\App\Module::getModuleId('Passwords'));
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance->set('method', $method);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            if ($testText) {
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $testText = 'TEST TEXT';
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertTrue(!empty(\App\Encryption::getMethods()), 'The system does not support any methods to encryption');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

        $instance->set('method', $method);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertNotSame($testText, $encryptText, 'Encryption is not working');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance->set('pass', $password);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

            ['des-ede3-cbc', '12354678'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            'method !== securityKeys(\'encryptionMethod\')' => $instance->get('method') !== \App\Config::securityKeys('encryptionMethod'),
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @param string $method
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

    public function testEncryptionModule(string $method, string $password)
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            $encryptText = $instance->encrypt($testText, true);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

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

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

        \App\Config::set('securityKeys', 'encryptionMethod', $method);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        \App\Config::set('securityKeys', 'encryptionPass', $password);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

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

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

        $instance->set('pass', \App\Config::securityKeys('encryptionPass'));
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->logs = [
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

            ['des-ede3-cfb', '12354678'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

        $this->assertTrue($instance->isActive(), 'The encryption mechanism is not active');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * Testing process function for module.
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

        $testText = 'TEST TEXT';
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

Line exceeds 120 characters; contains 122 characters
Open

        $this->assertTrue(!empty(\App\Encryption::getMethods()), 'The system does not support any methods to encryption');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @dataProvider encryptionProvider
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            'isEmpty(\'method\')' => $instance->isEmpty('method'),
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

     * Test encrypt data when encryption is disabled.
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance = new \App\Encryption();
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

            ['aes-256-cbc', '1234567890123456'],
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

            'function_exists(\'openssl_encrypt\')' => \function_exists('openssl_encrypt'),
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

            $this->assertSame($testText, $instance->decrypt($encryptText, true), 'The decrypted text does not match the encrypted text');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

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

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

        return [
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $instance->set('vector', $password);
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

                $this->assertTrue(!empty($encryptText), 'Encryption is not available');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

        $this->assertSame($testText, $instance->decrypt($testText), 'Encryption should be disabeld');
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

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

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

        ];
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @param string $password
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

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

     * @dataProvider encryptionProvider
Severity: Minor
Found in tests/App/Encryption.php by phpcodesniffer

There are no issues that match your filters.

Category
Status