YetiForceCompany/YetiForceCRM

View on GitHub
tests/Base/C_RecordActions.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

The class C_RecordActions has 14 public methods. Consider refactoring C_RecordActions to keep number of public methods under 10.
Open

class C_RecordActions extends \Tests\Base
{
    /**
     * Temporary record object.
     *
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

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

    public static function createProductRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

Missing class import via use statement (line '329', column '29').
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

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

        $this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

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

    public static function createSQuotesRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

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

    public static function createDocumentsRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

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

        $this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

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

    public static function createAccountRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

Missing class import via use statement (line '331', column '29').
Open

        $this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

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

    public static function createContactRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

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

    public static function createLeadRecord($cache = true): \Vtiger_Record_Model
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\User' in method 'createLeadRecord'.
Open

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createDocumentsRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Documents');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createAccountRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Accounts');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createContactRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Contacts');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Fields\File' in method 'createDocumentsRecord'.
Open

        $path = \App\Fields\File::getTmpPath() . 'phpunit.xml';
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createSQuotesRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('SQuotes');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\User' in method 'createContactRecord'.
Open

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createLeadRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Leads');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\Vtiger_Record_Model' in method 'createProductRecord'.
Open

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Products');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Fields\File' in method 'createDocumentsRecord'.
Open

        $file = \App\Fields\File::loadFromPath($path);
Severity: Minor
Found in tests/Base/C_RecordActions.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 "vtiger_crmentity" 3 times.
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.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 "crmid" 3 times.
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.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 "deleted" 3 times.
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.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.

Static call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open

        self::assertSame('SQuotes', $record->getModuleName());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Static call to undeclared method \Tests\Base\C_RecordActions::assertNotEmpty
Open

        self::assertNotEmpty($record->getInventoryData());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->isCreateable());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open

        $this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Saw unextractable annotation for comment '* @var bool'
Open

     * @var bool
Severity: Info
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->privilegeToArchive());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Argument 1 (state) is 'Active' but \Vtiger_Record_Model::changeState() takes \type defined at /code/modules/Vtiger/models/Record.php:1784
Open

        self::$recordAccounts->changeState('Active');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertFalse
Open

        $this->assertFalse(self::$recordAccounts->isLockByFields());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

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

        $this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue('YetiForce S.A.' === self::$recordAccounts->getDisplayName());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

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

        $this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Static call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open

        self::assertSame('Accounts', $record->getModuleName());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->privilegeToDelete());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

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

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->isViewable());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertFalse
Open

        $this->assertFalse(self::$recordAccounts->privilegeToActivate());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Argument 1 (state) is 'Trash' but \Vtiger_Record_Model::changeState() takes \type defined at /code/modules/Vtiger/models/Record.php:1784
Open

        self::$recordAccounts->changeState('Trash');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open

        $this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Saw unextractable annotation for comment '* @var bool'
Open

     * @var bool
Severity: Info
Found in tests/Base/C_RecordActions.php by phan

Static call to undeclared method \Tests\Base\C_RecordActions::assertIsInt
Open

        self::assertIsInt($record->getId());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertSame
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Argument 1 (state) is 'Archived' but \Vtiger_Record_Model::changeState() takes \type defined at /code/modules/Vtiger/models/Record.php:1784
Open

        self::$recordAccounts->changeState('Archived');
Severity: Minor
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->isEditable());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

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

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

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

        $this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Saw unextractable annotation for comment '* @var bool'
Open

     * @var bool
Severity: Info
Found in tests/Base/C_RecordActions.php by phan

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

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Saw unextractable annotation for comment '* @var bool'
Open

     * @var bool
Severity: Info
Found in tests/Base/C_RecordActions.php by phan

Static call to undeclared method \Tests\Base\C_RecordActions::assertIsInt
Open

        self::assertIsInt($record->getId());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Call to undeclared method \Tests\Base\C_RecordActions::assertTrue
Open

        $this->assertTrue(self::$recordAccounts->privilegeToMoveToTrash());
Severity: Critical
Found in tests/Base/C_RecordActions.php by phan

Saw unextractable annotation for comment '* @var bool'
Open

     * @var bool
Severity: Info
Found in tests/Base/C_RecordActions.php by phan

Reference to undeclared property \Vtiger_Record_Model->file (Did you mean $file)
Open

        $recordModel->file = [
Severity: Minor
Found in tests/Base/C_RecordActions.php by phan

The class C_RecordActions is not named in CamelCase.
Open

class C_RecordActions extends \Tests\Base
{
    /**
     * Temporary record object.
     *
Severity: Minor
Found in tests/Base/C_RecordActions.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

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

    /**

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

     * Load lorem ipsum clear text for tests.

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

    public static function createLoremIpsumText()

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

     * Load lorem ipsum html text for tests.

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

     *

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

     * @param mixed $cache

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

    {

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

     *

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

     */

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

     * Temporary record object.

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

    protected static $recordContacts;

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

    /**

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

    /**

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

     */

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

     *

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

     *

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

    public static function createLeadRecord($cache = true): \Vtiger_Record_Model

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

    /**

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

        if (self::$recordContacts && $cache) {

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

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());

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

     *

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

        $recordModel->set('accountname', 'YetiForce S.A.');

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

     * @param mixed $cache

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

    public static function createSQuotesRecord($cache = true): \Vtiger_Record_Model

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

        if ($cache) {

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

            self::$recordProducts = $recordModel;

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

        }

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

     */

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

     * @var \Vtiger_Record_Model

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

     */

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

        if (self::$loremIpsumHtml) {

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

        $recordModel->save();

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

    }

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

        $recordModel->set('contactstatus', 'Active');

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

    }

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

        $recordModel->setInventoryItemPart(1, 'total', 10);

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

        }

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

     *

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

    public static function createProductRecord($cache = true): \Vtiger_Record_Model

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

        if (self::$recordProducts && $cache) {

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

        if (self::$recordDocuments && $cache) {

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

        $recordModel->set('filename', $fileName);

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

        if ($cache) {

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

    }

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

    {

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

        $record = self::createSQuotesRecord();

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

     * @var \Vtiger_Record_Model

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

     *

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

        return self::$loremIpsumText = \file_get_contents('./tests/data/stringText.txt');

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

        if ($cache) {

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

     * @param mixed $cache

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

        }

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

     */

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

        $recordModel->setInventoryItemPart(1, 'discountmode', 1);

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

        $recordModel->set('discontinued', 1);

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

     *

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

     * @param mixed $cache

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

            'name' => $fileName,

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

            'size' => $file->getSize(),

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

        self::assertIsInt($record->getId());

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

    /**

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

    /** @var \Vtiger_Record_Model Temporary Documents record object. */

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

     *

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

     * @var \Vtiger_Record_Model

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

    {

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

    public static function createLoremIpsumHtml()

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

     * @var bool

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

        $recordModel->set('lastname', 'Testowy');

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

        if (self::$recordSQuotes && $cache) {

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

        return $recordModel;

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

     * Creating Documents module record for tests.

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

            return self::$recordDocuments;

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

        $file = \App\Fields\File::loadFromPath($path);

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

    public function testCheckLockFields()

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

     * Testing record editing.

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

     * Testing the record label.

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

    }

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

    /**

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

     *

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

    protected static $recordProducts;

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

     * Temporary Leads record object.

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

     *

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

     * @var string

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

    /**

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

     * @return \Vtiger_Record_Model

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

     */

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Leads');

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

     * @return \Vtiger_Record_Model

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

    {

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

        if ($cache) {

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

    public static function createAccountRecord($cache = true): \Vtiger_Record_Model

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

    {

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

        $recordModel->save();

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

            self::$recordSQuotes = $recordModel;

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

     * @var bool

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

    }

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

        }

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

        copy(ROOT_DIRECTORY . '/tests/phpunit.xml', $path);

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

        ];

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

    protected static $recordDocuments;

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

     * @var string

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

        return self::$loremIpsumHtml = \file_get_contents('./tests/data/stringHtml.txt');

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

        $recordModel->save();

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

     * Creating account module record for tests.

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

        $recordModel->setInventoryItemPart(1, 'taxmode', 1);

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

        $recordModel->setInventoryItemPart(1, 'price', 5);

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

        $recordModel->setInventoryItemPart(1, 'net', 10);

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

        $recordModel->setInventoryItemPart(1, 'purchase', 0);

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

     *

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

            return self::$recordProducts;

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

        $recordModel->set('notes_title', $fileName);

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

     * Testing the record creation.

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

        self::createSQuotesRecord();

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

     */

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

        $this->assertTrue(self::$recordAccounts->privilegeToDelete());

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

     */

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

        self::$recordAccounts->changeState('Active');

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

     * @var \Vtiger_Record_Model

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

    /**

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

     * @var \Vtiger_Record_Model

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

    protected static $recordSQuotes;

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

    protected static $recordLeads;

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

        if (self::$loremIpsumText) {

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

        }

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

     *

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

    }

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

     * @var bool

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

    {

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

            return self::$recordSQuotes;

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

        }

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('SQuotes');

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

        $recordModel->setInventoryItemPart(1, 'gross', 10);

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

     */

Line exceeds 120 characters; contains 122 characters
Open

        $this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());

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

    /**

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

     * Temporary loremIpsum html.

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

     *

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

            return self::$loremIpsumHtml;

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

            return self::$recordLeads;

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

        $recordModel->set('assigned_user_id', \App\User::getCurrentUserId());

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

            return self::$recordContacts;

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

    /**

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

        $recordModel->setInventoryItemPart(1, 'name', self::createProductRecord()->getId());

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

        $recordModel->save();

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

        return $recordModel;

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

        $recordModel->save();

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

            'type' => $file->getMimeType(),

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

        self::createDocumentsRecord();

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

    }

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

    /**

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

    }

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

    /**

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

        self::$recordAccounts->set('accounttype', 'Customer');

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

    {

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

     * Temporary record object.

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

    /**

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

     *

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

     * Temporary Products record object.

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

    /**

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

     * Creating leads module record for tests.

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

        return $recordModel;

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

        }

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

        $recordModel->setInventoryItemPart(1, 'qty', 2);

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

    }

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

     */

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Products');

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

        $recordModel->set('pscategory', 'T3');

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

        if ($cache) {

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

        $recordModel->save();

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

    /**

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

        self::assertNotEmpty($record->getInventoryData());

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

    public function testPermission()

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

     * Temporary loremIpsum text.

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

    }

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

     */

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

        }

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

     * Creating contacts module record for tests.

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

    public static function createContactRecord($cache = true): \Vtiger_Record_Model

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Contacts');

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

        $recordModel->set('parent_id', self::createAccountRecord()->getId());

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

    }

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

            self::$recordAccounts = $recordModel;

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

    /**

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

     * Creating Product module record for tests.

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

     * @param mixed $cache

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

     *

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

     * @var bool

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

        return $recordModel;

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

        $record = self::createAccountRecord();

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

        self::assertIsInt($record->getId());

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

        self::assertSame('SQuotes', $record->getModuleName());

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

     * Testing the edit block feature.

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

     *

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

     */

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

     * @var \Vtiger_Record_Model

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

     * @return string

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

        $recordModel->set('firstname', 'Test');

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

            self::$recordContacts = $recordModel;

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

        return $recordModel;

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

            return self::$recordAccounts;

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

        $recordModel->setInventoryItemPart(1, 'margin', 0);

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

    public static function createDocumentsRecord($cache = true): \Vtiger_Record_Model

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

        $path = \App\Fields\File::getTmpPath() . 'phpunit.xml';

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

            'tmp_name' => $file->getPath(),

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

        self::createDocumentsRecord();

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

    /**

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

        self::$recordAccounts->changeState('Archived');

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

    protected static $recordAccounts;

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

    protected static $recordCampaigns;

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

     * Temporary SQuotes record object.

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

     */

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

    protected static $loremIpsumHtml;

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

     * @return string

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

        }

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

        if (self::$recordLeads && $cache) {

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

        $recordModel->set('description', 'autogenerated test lead for \App\TextParser tests');

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

        $recordModel->set('salutationtype', 'Mr.');

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Accounts');

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

        if ($cache) {

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

     * Creating SQuotes module record for tests.

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

        $recordModel->set('subject', 'System CRM YetiForce');

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

        $recordModel->setInventoryItemPart(1, 'currency', 1);

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

    {

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

        $recordModel->set('unit_price', '{"currencies":{"1":{"price":"2222"}},"currencyId":1}');

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

        }

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

    /**

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

        $recordModel->file = [

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

    {

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

    {

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

    public function testGetDisplayName()

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

     */

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

     * Temporary Contacts record object.

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

     */

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

     *

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

    protected static $loremIpsumText;

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

    /**

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

     *

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

     */

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

     *

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

     * @param mixed $cache

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

     */

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

     * @var bool

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

     *

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

        $recordModel->setInventoryItemPart(1, 'discount', 0);

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

        $recordModel->setInventoryItemPart(1, 'marginp', 0);

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

        $recordModel->setInventoryItemPart(1, 'tax', 0);

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

        $recordModel->setInventoryItemPart(1, 'comment1', '');

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

        }

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

        $recordModel->set('productname', 'System CRM YetiForce');

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

        $recordModel = \Vtiger_Record_Model::getCleanInstance('Documents');

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

            self::$recordDocuments = $recordModel;

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

        $this->assertFalse(self::$recordAccounts->privilegeToActivate());

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

     */

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

        $this->assertTrue('YetiForce S.A.' === self::$recordAccounts->getDisplayName());

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

    }

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

        $this->assertFalse(self::$recordAccounts->isLockByFields());

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

    public function testStateRecord()

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

    {

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

        self::$recordAccounts->changeState('Trash');

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

        $this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

Line exceeds 120 characters; contains 161 characters
Open

        $this->assertSame(0, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

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

    /**

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

     */

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

            return self::$loremIpsumText;

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

    {

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

            self::$recordLeads = $recordModel;

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

        }

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

        }

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

     *

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

        $recordModel->set('filestatus', 1);

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

        self::assertSame('Accounts', $record->getModuleName());

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

        $this->assertTrue(self::$recordAccounts->isCreateable());

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

    public function testEditRecord()

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

    /**

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

     * Testing the change record state.

Line exceeds 120 characters; contains 161 characters
Open

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

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

        $this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

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

     */

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

     *

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

        $recordModel->set('company', 'TestLead sp. z o.o.');

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

        }

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

        $recordModel->set('verification', 'Address details');

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

        return $recordModel;

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

        $recordModel->set('imagename', '[]');

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

     */

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

        $fileName = $file->getName();

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

        $recordModel->set('filelocationtype', 'I');

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

    {

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

        $this->assertTrue(self::$recordAccounts->isViewable());

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

        $this->assertTrue((new \App\Db\Query())->from('vtiger_account')->where(['account_type' => 'Customer'])->exists());

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

        $this->assertSame(1, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

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

        $this->assertTrue(self::$recordAccounts->privilegeToArchive());

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

     */

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

    }

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

        self::$recordAccounts->save();

Line exceeds 120 characters; contains 161 characters
Open

        $this->assertSame(2, (new \App\Db\Query())->select(['deleted'])->from('vtiger_crmentity')->where(['crmid' => self::$recordAccounts->getId()])->scalar());

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

    /**

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

        if (self::$recordAccounts && $cache) {

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

        $recordModel->set('legal_form', 'PLL_COMPANY');

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

    {

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

            'error' => 0,

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

    public function testCreateRecord()

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

     * Testing editing permissions.

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

        $this->assertTrue(self::$recordAccounts->isEditable());

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

        $this->assertTrue(self::$recordAccounts->privilegeToMoveToTrash());

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

    }

Class name "C_RecordActions" is not in camel caps format
Open

class C_RecordActions extends \Tests\Base

There are no issues that match your filters.

Category
Status