Function getTemplateType
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function getTemplateType(Vtiger_PDF_Model $template)
{
$matches = [];
$content = $template->get('body_content');
preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);
- 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 using static access to class 'Vtiger_PDF_Model' in method 'getTemplatesByModule'. Open
return Vtiger_PDF_Model::getTemplatesByModule($moduleName);
- 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 'Vtiger_Module_Model' in method 'getSupportedModules'. Open
$moduleModels = Vtiger_Module_Model::getAll([0, 2]);
- 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" 3 times. Open
'default' => 'LBL_DEFAULT_TPL',
- 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 "secondary_name" 3 times. Open
'secondary_name' => 'LBL_SECONDARY_NAME',
- 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 "body_content" 3 times. Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- 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 "status" 3 times. Open
'status' => 'LBL_STATUS',
- 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 "page_format" 3 times. Open
'page_format' => 'LBL_PAGE_FORMAT',
- 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 "generator" 3 times. Open
'generator' => 'LBL_GENERATOR_ENGINE',
- 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 "primary_name" 3 times. Open
'primary_name' => 'LBL_PRIMARY_NAME',
- 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_name" 5 times. Open
'module_name' => 'Module',
- 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.
Reference to constant VARIABLE_REGEX
from undeclared class \App\TextParser
(Did you mean class \Tests\App\TextParser) Open
preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
public static function getPageFormats()
{
return [
'4A0',
'2A0',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 173.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Avoid excessively long variable names like $supportedModuleModels. Keep variable name length under 20. Open
$supportedModuleModels = [];
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model
- Exclude checks
The class Settings_PDF_Module_Model is not named in CamelCase. Open
class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model
{
public $baseTable = 'a_yf_pdf';
public $baseIndex = 'pdfid';
public $listFields = [
- Read upRead up
- Exclude checks
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 for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return 'index.php?module=PDF&parent=Settings&view=List';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getCreateRecordUrl()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$supportedModuleModels[$tabId] = $moduleModel;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return self::$step1Fields;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'B', // 'B' format paperback size 128x198mm
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$type = Vtiger_PDF_Model::TEMPLATE_TYPE_DYNAMIC;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$type = Vtiger_PDF_Model::TEMPLATE_TYPE_SUMMARY;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'RA0', 'RA1', 'RA2', 'RA3', 'RA4',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @param string $moduleName - module name for which template was created
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Get template type.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 2:
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $parent = 'Settings';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getPageFormats()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @param Vtiger_PDF_Model $template
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$matches = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $step3Fields = ['conditions'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$moduleModels = Vtiger_Module_Model::getAll([0, 2]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return self::$step2Fields;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 1:
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'LEGAL',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'TABLOID',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'A', // 'A' format paperback size 111x178mm
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return array of template record models
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 3:
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'2A0',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getSupportedModules()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$supportedModuleModels = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'EXECUTIVE',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return string - url
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getDefaultUrl()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return 'index.php?module=PDF&parent=Settings&view=Import';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'LETTER',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'FOLIO',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function getTemplatesByModule($moduleName)
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getTemplateType(Vtiger_PDF_Model $template)
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$content = $template->get('body_content');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ('custom' === $match[1] && (\in_array($match[2], ['UserGroup|OSSTimeControl', 'List|OSSTimeControl', 'DetailedList|OSSTimeControl']) || false !== strpos($match[2], 'RecordsList'))) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Function to get the url for default view of the module.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return string - url
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getCreateViewUrl()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return $supportedModuleModels;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return int template type
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getImportViewUrl()
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return Vtiger_PDF_Model::getTemplatesByModule($moduleName);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $uploadPath = 'storage/Pdf/watermark/';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($moduleModel->isEntityModule()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static function getFieldsByStep($step = 1)
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
default:
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'SRA0', 'SRA1', 'SRA2', 'SRA3', 'SRA4',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'DEMY', // 'Demy' format paperback size 135x216mm
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'ROYAL', // 'Royal' format paperback size 153x234mm
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return 'index.php?module=PDF&parent=Settings&view=Edit';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public static $module = 'PDF';
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($moduleModels as $tabId => $moduleModel) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
switch ($step) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return self::$step3Fields;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'4A0',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'LEDGER',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Returns template records by module name.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($matches as $match) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ('custom' === $match[1] && false !== strpos($match[2], 'DynamicInventoryColumnsTable')) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return $type;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
protected $viewToPicklistValue = ['Detail' => 'PLL_DETAILVIEW', 'List' => 'PLL_LISTVIEW'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Function to get the url for create view of the module.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return "javascript:Settings_PDF_List_Js.triggerCreate('" . self::getCreateRecordUrl() . "')";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$type = Vtiger_PDF_Model::TEMPLATE_TYPE_STANDARD;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'generator' => 'LBL_GENERATOR_ENGINE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- Exclude checks
Line exceeds 120 characters; contains 489 characters Open
public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $baseTable = 'a_yf_pdf';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static $allFields = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'status' => 'LBL_STATUS',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => 'LBL_DEFAULT_TPL',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module_name' => 'Module',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'secondary_name' => 'LBL_SECONDARY_NAME',
- 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 $listFields = [
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
'language', 'filename', 'visibility', 'default', 'header_content', 'body_content', 'footer_content', 'conditions',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $baseIndex = 'pdfid';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title',
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content', 'styles'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'page_format' => 'LBL_PAGE_FORMAT',
- Exclude checks
Line exceeds 120 characters; contains 197 characters Open
if ('custom' === $match[1] && (\in_array($match[2], ['UserGroup|OSSTimeControl', 'List|OSSTimeControl', 'DetailedList|OSSTimeControl']) || false !== strpos($match[2], 'RecordsList'))) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'primary_name' => 'LBL_PRIMARY_NAME',
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title',
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation',
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
'watermark_type', 'watermark_text', 'watermark_angle', 'template_members', 'watermark_image', 'one_pdf', 'type', 'styles',
- Exclude checks
Class name "Settings_PDF_Module_Model" is not in camel caps format Open
class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model
- Exclude checks