Avoid using static access to class '\App\RecordConverter' in method 'testInitialize'. Open
$this->assertTrue(\App\RecordConverter::isActive('SQuotes', 'Detail'));
- 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\Json' in method 'testInitialize'. Open
'field_mapping' => \App\Json::encode(
['auto']
),
- 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\Json' in method 'testInitialize'. Open
'inv_field_mapping' => \App\Json::encode(
['auto']
),
- 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
Remove this commented out code. Open
// $this->assertCount(1, $convertInstance->createdRecords);
- Read upRead up
- Exclude checks
Programmers should not comment out code as it bloats programs and reduces readability.
Unused code should be deleted and can be retrieved from source control history if required.
See
- MISRA C:2004, 2.4 - Sections of code should not be "commented out".
- MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
- MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
- MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"
Remove this commented out code. Open
// $id = (new \App\Db\Query())->select(['squotesid'])->from('u_#__squotes')->scalar();
- Read upRead up
- Exclude checks
Programmers should not comment out code as it bloats programs and reduces readability.
Unused code should be deleted and can be retrieved from source control history if required.
See
- MISRA C:2004, 2.4 - Sections of code should not be "commented out".
- MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
- MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
- MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"
Remove this commented out code. Open
// ];
- Read upRead up
- Exclude checks
Programmers should not comment out code as it bloats programs and reduces readability.
Unused code should be deleted and can be retrieved from source control history if required.
See
- MISRA C:2004, 2.4 - Sections of code should not be "commented out".
- MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
- MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
- MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"
Call to undeclared method \Tests\App\RecordConverter::markTestSkipped
Open
$this->markTestSkipped('unfinished');
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$dbCommand = \App\Db::getInstance('admin')->createCommand();
- Exclude checks
Call to undeclared method \Tests\App\RecordConverter::assertTrue
Open
$this->assertTrue(\App\RecordConverter::isActive('SQuotes', 'Detail'));
- 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 ($id) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// $convertInstance->process([$id]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// $this->assertCount(1, $convertInstance->createdRecords);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Initialize test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'field_mapping' => \App\Json::encode(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// $this->logs = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'status' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'inv_field_mapping' => \App\Json::encode(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'show_in_list' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'show_in_detail' => 1,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand = \App\Db::getInstance('admin')->createCommand();
- 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
)->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'a_yf_record_converter',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => 'Record converter test',
- 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
// 'inventory' => $recordModel->getInventoryData(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// foreach ($convertInstance->createdRecords as $id) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
['auto']
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('unfinished');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// 'data' => $recordModel->getData(),
- 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
public function testProcess()
- 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
// $this->assertTrue((new \App\Db\Query())->from('u_yf_ssingleorders')->where(['ssingleordersid' => $id])->exists());
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
// $this->assertTrue((new \App\Db\Query())->from('u_yf_ssingleorders')->where(['ssingleordersid' => $id])->exists());
- 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
'destiny_module' => 90,
- 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
public function testInitialize()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(\App\RecordConverter::isActive('SQuotes', 'Detail'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// $convertInstance = \App\RecordConverter::getInstanceById(1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand->insert(
- 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
// }
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
['auto']
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// $recordModel = \Vtiger_Record_Model::getInstanceById($id, 'SQuotes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'source_module' => 89,
- 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
* Process test.
- 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
// $id = (new \App\Db\Query())->select(['squotesid'])->from('u_#__squotes')->scalar();
- Exclude checks