Method vtwsSaveLeadRelations
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function vtwsSaveLeadRelations($leadId, $relatedId, $setype)
{
$db = \App\Db::getInstance();
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
->createCommand()->query();
Function vtwsSaveLeadRelations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function vtwsSaveLeadRelations($leadId, $relatedId, $setype)
{
$db = \App\Db::getInstance();
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
->createCommand()->query();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return true;
Reduce the number of returns of this function 5, down to the maximum allowed 3. Open
public static function vtwsSaveLeadRelations($leadId, $relatedId, $setype)
- Read upRead up
- Exclude checks
Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.
Noncompliant Code Example
With the default threshold of 3:
function myFunction(){ // Noncompliant as there are 4 return statements if (condition1) { return true; } else { if (condition2) { return false; } else { return true; } } return false; }
Missing class import via use statement (line '46', column '22'). Open
$dataReader = (new \App\Db\Query())->select(['attachmentsid'])->from('vtiger_seattachmentsrel')->where(['crmid' => $id])->createCommand()->query();
- 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 '68', column '22'). Open
$dataReader = (new \App\Db\Query())->select(['productid'])
- 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 '119', column '22'). Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['relcrmid' => $leadId])
- 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 '215', column '14'). Open
throw new WebServiceException('LEAD_RELATEDLIST_UPDATE_FAILED', 'Failed to move related Records');
- 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 '37', column '22'). Open
$dataReader = (new \App\Db\Query())->select(['notesid'])->from('vtiger_senotesrel')->where(['crmid' => $id])->createCommand()->query();
- 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 '102', column '22'). Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
- 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 '170', column '14'). Open
throw new WebServiceException('LEAD_RELATEDLIST_UPDATE_FAILED', 'Failed to move related Activities/Emails');
- 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 '\App\Db' in method 'vtwsSaveLeadRelatedProducts'. Open
$db = \App\Db::getInstance();
- 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\Db' in method 'vtwsTransferRelatedRecords'. Open
$db = \App\Db::getInstance();
- 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\Db' in method 'vtwsSaveLeadRelations'. Open
$db = \App\Db::getInstance();
- 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\Db' in method 'vtwsSaveLeadRelatedCampaigns'. Open
$db = \App\Db::getInstance();
- 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 'CRMEntity' in method 'vtwsTransferComments'. Open
CRMEntity::getInstance('ModComments');
- 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 'vtwsTransferComments'. Open
if (\App\Module::isModuleActive('ModComments')) {
- 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 'ModComments' in method 'vtwsTransferComments'. Open
ModComments::transferRecords($sourceRecordId, $destinationRecordId);
- 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\Db' in method 'vtwsGetRelatedActivities'. Open
$db = \App\Db::getInstance();
- 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 'vtwsSaveLeadRelatedProducts'. Open
'rel_created_user' => \App\User::getCurrentUserId(),
- 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 "relcrmid" 4 times. Open
'relcrmid' => $row['relcrmid'],
- 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 "parent_id" 4 times. Open
$db->createCommand()->update('vtiger_outsourcedproducts', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- 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 "relatedid" 4 times. Open
$db->createCommand()->update('vtiger_lettersin', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- 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 "crmid" 14 times. Open
$dataReader = (new \App\Db\Query())->select(['notesid'])->from('vtiger_senotesrel')->where(['crmid' => $id])->createCommand()->query();
- 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 "relmodule" 3 times. Open
'relmodule' => $row['relmodule'],
- 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 "vtiger_crmentityrel" 4 times. Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
- 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 "module" 3 times. Open
'module' => $setype,
- 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 \App\Db::createCommand
Open
$resultNew = $db->createCommand()->insert('vtiger_crmentityrel', [
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$resultNew = $db->createCommand()->insert('vtiger_crmentityrel', [
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$resultNew = $db->createCommand()->insert('vtiger_seproductsrel', [
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
'rel_created_user' => \App\User::getCurrentUserId(),
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_activity', ['link' => $contactId], ['link' => $leadId])->execute();
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$dataReader = (new \App\Db\Query())->select(['productid'])
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_activity', ['link' => $accountId], ['link' => $leadId])->execute();
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$dataReader = (new \App\Db\Query())->select(['attachmentsid'])->from('vtiger_seattachmentsrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$dataReader = (new \App\Db\Query())->select(['notesid'])->from('vtiger_senotesrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$dbCommand = \App\Db::getInstance()->createCommand();
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['relcrmid' => $leadId])
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$rowCount = $db->createCommand()->update('vtiger_campaign_records', [
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_ossoutsourcedservices', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_outsourcedproducts', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_lettersin', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_reservations', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_lettersout', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_contactdetails', ['parentid' => $destinationRecordId], ['parentid' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_ossmailview_relation', ['crmid' => $destinationRecordId], ['crmid' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_osstimecontrol', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('vtiger_callhistory', ['destination' => $destinationRecordId], ['destination' => $sourceRecordId])->execute();
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->update('u_yf_squoteenquiries', ['accountid' => $destinationRecordId], ['accountid' => $sourceRecordId])->execute();
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class WebservicesUtils
- Exclude checks
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 26 and the first side effect is on line 12. Open
<?php
- Exclude checks
Avoid variables with short names like $id. Configured minimum length is 3. Open
public static function vtwsGetRelatedNotesAttachments($id, $relatedId)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Spaces must be used to indent lines; tabs are not allowed Open
while ($row = $dataReader->readColumn(0)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function used to get the lead related Notes and Attachments with other entities Account, Contact and Potential.
- 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 static function vtwsGetRelatedNotesAttachments($id, $relatedId)
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
$dataReader = (new \App\Db\Query())->select(['notesid'])->from('vtiger_senotesrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
$dataReader = (new \App\Db\Query())->select(['attachmentsid'])->from('vtiger_seattachmentsrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $id - leadid
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$dataReader->count()) {
- 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
* @param int $relatedId - related entity id (accountid / contactid)
- 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
$dataReader = (new \App\Db\Query())->select(['attachmentsid'])->from('vtiger_seattachmentsrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand = \App\Db::getInstance()->createCommand();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($row = $dataReader->readColumn(0)) {
- 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
$dataReader = (new \App\Db\Query())->select(['productid'])
- 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
while ($productId = $dataReader->readColumn(0)) {
- 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
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['relcrmid' => $leadId])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => $setype,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $fieldId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($leadId) || empty($relatedId) || (empty($accountId) && empty($contactId))) {
- 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
$dataReader = (new \App\Db\Query())->select(['notesid'])->from('vtiger_senotesrel')->where(['crmid' => $id])->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 === $dataReader->count()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 === $resultNew) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function used to save the lead related services with other entities Account, Contact and Potential.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($row = $dataReader->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new WebServiceException('LEAD_RELATEDLIST_UPDATE_FAILED', 'Failed to move related Activities/Emails');
- 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
$db->createCommand()->update('vtiger_activity', ['link' => $contactId], ['link' => $leadId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- 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
* Function used to save the lead related Campaigns with Contact.
- 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
$dbCommand->insert('vtiger_senotesrel', ['crmid' => $relatedId, 'notesid' => $row])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader->close();
- 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
return false;
- 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
if (!empty($contactId)) {
- 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
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$dataReader->count()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->createCommand()->query();
- 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
* @param string $setype - related module(Accounts/Contacts).
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$resultNew = $db->createCommand()->insert('vtiger_crmentityrel', [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 === $resultNew) {
- 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
* Function used to get the lead related activities with other entities Account and Contact.
- 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
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $leadId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$resultNew = $db->createCommand()->insert('vtiger_crmentityrel', [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'crmid' => $relatedId,
- 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
* @param int $leadId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function used to transfer all the lead related records to given Entity(Contact/Account) record.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function used to save the lead related products with other entities Account, Contact and Potential.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtwsSaveLeadRelatedProducts($leadId, $relatedId, $setype)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$resultNew = $db->createCommand()->insert('vtiger_seproductsrel', [
- 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
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $relatedId - related entity id to which the records need to be transferred
- 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
* @param int $leadId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'crmid' => $relatedId,
- 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
->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relmodule' => $row['module'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 === $resultNew) {
- 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
* vtwsGetFieldfromFieldId.
- 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
* @return bool true on success, false otherwise
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rowCount = $db->createCommand()->update('vtiger_campaign_records', [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], ['crmid' => $leadId]
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $setype - related module(Accounts/Contacts).
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'crmid' => $relatedId,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relcrmid' => $row['crmid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader->close();
- 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
foreach ($moduleModel->getFields() as $field) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $relatedId - related entity id (contactid/accountid)
- 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
* @param int $relatedId - related entity id (accountid/contactid/potentialid)
- 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 static function vtwsSaveLeadRelations($leadId, $relatedId, $setype)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader = (new App\Db\Query())->from('vtiger_crmentityrel')->where(['crmid' => $leadId])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $contactId - related contact id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_activity', ['link' => $accountId], ['link' => $leadId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $relatedId - related entity id (contactid/accountid)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 == $rowCount) {
- 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
'rel_created_user' => \App\User::getCurrentUserId(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relmodule' => $row['relmodule'],
- 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
if (0 === $dataReader->count()) {
- 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
* @return Vtiger_Field_Model|null
- 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
->from('vtiger_seproductsrel')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->where(['crmid' => $leadId])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader->close();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $relatedId - related entity id (accountid/contactid/potentialid)
- 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
'relcrmid' => $row['relcrmid'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param Vtiger_Module_Model $moduleModel
- 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
{
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtwsGetRelatedActivities($leadId, $accountId, $contactId, $relatedId)
- 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 static function vtwsSaveLeadRelatedCampaigns($leadId, $relatedId)
- 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
* @param string $seType - related module(Accounts/Contacts)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'setype' => $setype,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader->close();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtwsGetFieldfromFieldId($fieldId, Vtiger_Module_Model $moduleModel)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $field;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $accountId - related account id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader->close();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $leadId
- 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
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'productid' => $productId,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'rel_created_time' => date('Y-m-d H:i:s'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 === $dataReader->count()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($row = $dataReader->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- 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
'crmid' => $relatedId,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new WebServiceException('LEAD_RELATEDLIST_UPDATE_FAILED', 'Failed to move related Records');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsSaveLeadRelatedProducts($leadId, $relatedId, $seType);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsSaveLeadRelations($leadId, $relatedId, $seType);
- 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
$db->createCommand()->update('vtiger_outsourcedproducts', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- 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
//OSSOutsourcedServices
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//LettersIn
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_reservations', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- 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
ModComments::transferRecords($sourceRecordId, $destinationRecordId);
- 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
* The function transfers related records.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//OutsourcedProducts
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$db->createCommand()->update('vtiger_callhistory', ['destination' => $destinationRecordId], ['destination' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand->insert('vtiger_seattachmentsrel', ['crmid' => $relatedId, 'attachmentsid' => $row])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => $setype,
- 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 ($fieldId == $field->getId()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return null;
- 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
* @param int $leadId - lead entity id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($accountId)) {
- 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 (empty($leadId) || empty($relatedId) || empty($seType)) {
- 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
$db->createCommand()->update('vtiger_lettersin', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_lettersout', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//SQuoteEnquiries
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsSaveLeadRelatedCampaigns($leadId, $relatedId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtwsTransferLeadRelatedRecords($leadId, $relatedId, $seType)
- 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
$db->createCommand()->update('vtiger_contactdetails', ['parentid' => $destinationRecordId], ['parentid' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
$db->createCommand()->update('vtiger_ossmailview_relation', ['crmid' => $destinationRecordId], ['crmid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('u_yf_squoteenquiries', ['accountid' => $destinationRecordId], ['accountid' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
$db->createCommand()->update('vtiger_lettersout', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsGetRelatedNotesAttachments($leadId, $relatedId);
- 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
//CallHistory
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
$db->createCommand()->update('vtiger_lettersin', ['relatedid' => $destinationRecordId], ['relatedid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsTransferComments($leadId, $relatedId);
- 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
CRMEntity::getInstance('ModComments');
- 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
* @param int $sourceRecordId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_ossmailview_relation', ['crmid' => $destinationRecordId], ['crmid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* The function transfers the comments.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $destinationRecordId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\App\Module::isModuleActive('ModComments')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $destinationRecordId
- 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
//OSSTimeControl
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::vtwsTransferRelatedRecords($leadId, $relatedId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function vtwsTransferRelatedRecords($sourceRecordId, $destinationRecordId)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_callhistory', ['destination' => $destinationRecordId], ['destination' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//LettersOut
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
$db->createCommand()->update('vtiger_reservations', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- 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 static function vtwsTransferComments($sourceRecordId, $destinationRecordId)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_ossoutsourcedservices', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
$db->createCommand()->update('vtiger_ossoutsourcedservices', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->update('vtiger_osstimecontrol', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
$db->createCommand()->update('u_yf_squoteenquiries', ['accountid' => $destinationRecordId], ['accountid' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//Reservations
- 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
* @param int $sourceRecordId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//Contacts
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
$db->createCommand()->update('vtiger_contactdetails', ['parentid' => $destinationRecordId], ['parentid' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
$db->createCommand()->update('vtiger_outsourcedproducts', ['parent_id' => $destinationRecordId], ['parent_id' => $sourceRecordId])->execute();
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
$db->createCommand()->update('vtiger_osstimecontrol', ['link' => $destinationRecordId], ['link' => $sourceRecordId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//OSSMailView
- Exclude checks
Expected 0 spaces before closing bracket; newline found Open
$rowCount = $db->createCommand()->update('vtiger_campaign_records', [
- Exclude checks