Method testModuleModel
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testModuleModel()
{
$moduleModel = \Settings_CustomView_Module_Model::getInstance('Settings:CustomView');
$cvsData = \App\CustomView::getFiltersByModule('Leads');
$this->assertIsArray($cvsData, 'Custom views list should be array type');
Missing class import via use statement (line '85', column '27'). Open
$this->assertEmpty((new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['cvid' => $newCvid])->scalar(), 'New CustomView should be removed');
- Read upRead up
- Exclude checks
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 '81', column '24'). Open
$leadsDefCvid = (new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['entitytype' => 'Leads', 'setdefault' => 1])->scalar();
- Read upRead up
- Exclude checks
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 '\Settings_CustomView_Module_Model' in method 'testModuleModel'. Open
$moduleModel = \Settings_CustomView_Module_Model::getInstance('Settings:CustomView');
- Read upRead up
- Exclude checks
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 '\CustomView_Record_Model' in method 'testModuleModel'. Open
$recordModel = \CustomView_Record_Model::getInstanceById($cvData['cvid']);
- Read upRead up
- Exclude checks
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 '\Settings_CustomView_Module_Model' in method 'testModuleModel'. Open
$supportedModules = \Settings_CustomView_Module_Model::getSupportedModules();
- Read upRead up
- Exclude checks
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 '\CustomView_Record_Model' in method 'testModuleModel'. Open
$newCustomViewModel = \CustomView_Record_Model::getCleanInstance();
- Read upRead up
- Exclude checks
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 'testModuleModel'. Open
$this->assertSame($supportedModules[\App\Module::getModuleId('Leads')], 'Leads', 'Module mapping mismatch');
- Read upRead up
- Exclude checks
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\CustomView' in method 'testModuleModel'. Open
$cvsData = \App\CustomView::getFiltersByModule('Leads');
- Read upRead up
- Exclude checks
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 'testModuleModel'. Open
$user = 'Users:' . \App\User::getActiveAdminId();
- Read upRead up
- Exclude checks
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 "default" 4 times. Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be array type');
- Read upRead up
- Exclude checks
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 "setdefault" 3 times. Open
'setdefault' => 0,
- Read upRead up
- Exclude checks
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 "featured" 5 times. Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be array type');
- Read upRead up
- Exclude checks
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" 9 times. Open
$cvsData = \App\CustomView::getFiltersByModule('Leads');
- Read upRead up
- Exclude checks
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\Settings\CustomView::assertIsArray
Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be array type');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotEmpty
Open
$this->assertNotEmpty($cvData, 'Leads custom view record should contain data');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertEmpty
Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be empty');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotNull
Open
$this->assertNotNull($newCvid, 'Expected cvid');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertEmpty
Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be emptied');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame($supportedModules[\App\Module::getModuleId('Leads')], 'Leads', 'Module mapping mismatch');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertEmpty
Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=featured&sourceModule=Leads&cvid=115', $moduleModel->getFeaturedFilterUrl('Leads', 115), 'Generated featured filter url mismatch');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame($newCustomViewModel->getId(), $leadsDefCvid, 'Default cvid for module Leads mismatch');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertIsArray
Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be array type');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads&record=115', $moduleModel->getUrlToEdit('Leads', 115), 'Generated edit url mismatch');
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$this->assertEmpty((new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['cvid' => $newCvid])->scalar(), 'New CustomView should be removed');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertIsArray
Open
$this->assertIsArray($cvsData, 'Custom views list should be array type');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotEmpty
Open
$this->assertNotEmpty($filterPermsView, 'Custom view permissions list(default) should be not empty');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=default&sourceModule=Leads&cvid=115&isDefault=1', $moduleModel->getUrlDefaultUsers('Leads', 115, 1), 'Generated default users url mismatch');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertSame
Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads', $moduleModel->getCreateFilterUrl('Leads'), 'Generated create filter url mismatch');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertEmpty
Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$leadsDefCvid = (new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['entitytype' => 'Leads', 'setdefault' => 1])->scalar();
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertEmpty
Open
$this->assertEmpty((new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['cvid' => $newCvid])->scalar(), 'New CustomView should be removed');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertTrue
Open
$this->assertTrue($filterPermsFound, 'Created default users filter view entry not found');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotEmpty
Open
$this->assertNotEmpty($supportedModules, 'System should have any custom view supported modules');
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotEmpty
Open
$this->assertNotEmpty($cvsData, 'Leads module should contain views');
- Exclude checks
Call to method getActiveAdminId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$user = 'Users:' . \App\User::getActiveAdminId();
- Exclude checks
Call to undeclared method \Tests\Settings\CustomView::assertNotEmpty
Open
$this->assertNotEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be not empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$cvData = \array_pop($cvsData);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user = 'Users:' . \App\User::getActiveAdminId();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel = \CustomView_Record_Model::getCleanInstance();
- Exclude checks
Line exceeds 120 characters; contains 170 characters Open
$this->assertEmpty((new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['cvid' => $newCvid])->scalar(), 'New CustomView should be removed');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads&record=115', $moduleModel->getUrlToEdit('Leads', 115), 'Generated edit url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'status' => 0,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=featured&sourceModule=Leads&cvid=115', $moduleModel->getFeaturedFilterUrl('Leads', 115), 'Generated featured filter url mismatch');
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be array type');
- Exclude checks
Line exceeds 120 characters; contains 230 characters Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=featured&sourceModule=Leads&cvid=115', $moduleModel->getFeaturedFilterUrl('Leads', 115), 'Generated featured filter url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->setModule('Leads');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty((new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['cvid' => $newCvid])->scalar(), 'New CustomView should be removed');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel = \CustomView_Record_Model::getInstanceById($cvData['cvid']);
- Exclude checks
Line exceeds 120 characters; contains 165 characters Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be array type');
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setDefaultForMember($user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($filterPermsView as $val) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be emptied');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be array type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$supportedModules = \Settings_CustomView_Module_Model::getSupportedModules();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty($supportedModules, 'System should have any custom view supported modules');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$leadsDefCvid = (new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['entitytype' => 'Leads', 'setdefault' => 1])->scalar();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\CustomView_Record_Model::getInstanceById($newCvid)->delete();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleModel = \Settings_CustomView_Module_Model::getInstance('Settings:CustomView');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty($cvsData, 'Leads module should contain views');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty($filterPermsView, 'Custom view permissions list(default) should be not empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\in_array($user, $val)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue($filterPermsFound, 'Created default users filter view entry not found');
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->removeDefaultForMember($user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame($supportedModules[\App\Module::getModuleId('Leads')], 'Leads', 'Module mapping mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=default&sourceModule=Leads&cvid=115&isDefault=1', $moduleModel->getUrlDefaultUsers('Leads', 115, 1), 'Generated default users url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->removeFeaturedForMember($user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'featured' => 0,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
'columnslist' => array_keys(\CustomView_Record_Model::getInstanceById($recordModel->getId())->getSelectedFields()),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->set('mode', 'edit');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame($newCustomViewModel->getId(), $leadsDefCvid, 'Default cvid for module Leads mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filterPermsFound = true;
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$this->assertNotEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be not empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'columnslist' => array_keys(\CustomView_Record_Model::getInstanceById($recordModel->getId())->getSelectedFields()),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->set('setdefault', 1);
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads&record=115', $moduleModel->getUrlToEdit('Leads', 115), 'Generated edit url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads', $moduleModel->getCreateFilterUrl('Leads'), 'Generated create filter url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'setdefault' => 0,
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
$leadsDefCvid = (new \App\Db\Query())->select(['cvid'])->from('vtiger_customview')->where(['entitytype' => 'Leads', 'setdefault' => 1])->scalar();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$cvsData = \App\CustomView::getFiltersByModule('Leads');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filterPermsView = $moduleModel->getFilterPermissionsView($recordModel->getId(), 'default');
- Exclude checks
Line exceeds 120 characters; contains 174 characters Open
$this->assertSame('index.php?module=CustomView&view=EditAjax&source_module=Leads', $moduleModel->getCreateFilterUrl('Leads'), 'Generated create filter url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$customViewData = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCvid = $newCustomViewModel->getId();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing module model.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testModuleModel()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filterPermsFound = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be not empty');
- Exclude checks
Line exceeds 120 characters; contains 240 characters Open
$this->assertSame('index.php?module=CustomView&parent=Settings&view=FilterPermissions&type=default&sourceModule=Leads&cvid=115&isDefault=1', $moduleModel->getUrlDefaultUsers('Leads', 115, 1), 'Generated default users url mismatch');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => 'Record delete test',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newCustomViewModel->setData($customViewData);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotEmpty($cvData, 'Leads custom view record should contain data');
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be emptied');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'viewname' => 'DeleteTest',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotNull($newCvid, 'Expected cvid');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertIsArray($cvsData, 'Custom views list should be array type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordModel->setFeaturedForMember($user);
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'featured'), 'Custom view permissions list(featured) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertIsArray($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be array type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($moduleModel->getFilterPermissionsView($recordModel->getId(), 'default'), 'Custom view permissions list(default) should be empty');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'setmetrics' => 0,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'color' => '',
- Exclude checks