Method register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
Missing class import via use statement (line '81', column '27'). Open
$layoutresultrow = (new \App\Db\Query())->from(self::TABLENAME)->where(['name' => $layoutName])->one();
- 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
The method export has a boolean flag argument $directDownload, which is a certain sign of a Single Responsibility Principle violation. Open
public function export($layoutName, $todir = '', $zipfilename = '', $directDownload = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method register has a boolean flag argument $isactive, which is a certain sign of a Single Responsibility Principle violation. Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method register has a boolean flag argument $isdefault, which is a certain sign of a Single Responsibility Principle violation. Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method register has a boolean flag argument $overrideCore, which is a certain sign of a Single Responsibility Principle violation. Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '128', column '17'). Open
$resId = (new \App\Db\Query())->select(['id'])->from(self::TABLENAME)->where(['name' => $name])->scalar();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'vtlib\Utils' in method '__initExport'. Open
Utils::checkFileAccessForInclusion("layouts/$layoutName/skins/style.less");
- 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
The method register uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$params['id'] = \App\Db::getInstance()->getUniqueID(self::TABLENAME, 'id', false);
$db->insert(self::TABLENAME, $params)->execute();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Log' in method 'deregister'. Open
\App\Log::trace("Deregistering Layout $name ... DONE", __METHOD__);
- 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\Purifier' in method 'exportLayout'. Open
$layoutname = \App\Purifier::decodeHtml($layoutresultrow['name']);
- 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\Version' in method 'exportLayoutDependencies'. Open
$this->outputNode(\App\Version::get(), 'vtiger_version');
- 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 'vtlib\Functions' in method 'deregister'. Open
Functions::recurseDelete('layouts' . \DIRECTORY_SEPARATOR . $name);
- 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
The method export uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$zip->close();
if ($todir) {
copy($zipfilename, $todir);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Zip' in method 'export'. Open
$zip = \App\Zip::createFile($zipfilename);
- 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\Purifier' in method 'exportLayout'. Open
$layoutlabel = \App\Purifier::decodeHtml($layoutresultrow['label']);
- 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\Log' in method 'register'. Open
\App\Log::trace("Registering Layout $name ... DONE", __METHOD__);
- 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 "label" 3 times. Open
$layoutlabel = \App\Purifier::decodeHtml($layoutresultrow['label']);
- 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.
Declaration of function export($layoutName, $todir = '', $zipfilename = '', $directDownload = null)
should be compatible with function export(\vtlib\Module $moduleInstance, $todir = '', $zipFileName = '', $directDownload = null)
(parameter #1 with no type cannot replace original parameter with type '\vtlib\Module')
defined in /code/vtlib/Vtiger/PackageExport.php:140
Open
* @param string $layoutName
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$resId = (new \App\Db\Query())->select(['id'])->from(self::TABLENAME)->where(['name' => $name])->scalar();
- Exclude checks
Declaration of function export(string $layoutName, string $todir = '', string $zipfilename = '', bool|false $directDownload = null)
should be compatible with function export(\vtlib\Module $moduleInstance, string $todir = '', string $zipFileName = '', bool|false $directDownload = null)
defined in /code/vtlib/Vtiger/PackageExport.php:140
Open
public function export($layoutName, $todir = '', $zipfilename = '', $directDownload = false)
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Deregistering Layout $name ... DONE", __METHOD__);
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db = \App\Db::getInstance()->createCommand();
- Exclude checks
Variable $prefix
is undeclared Open
$prefix = trim($prefix);
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
\App\Db::getInstance()->createCommand()->delete(self::TABLENAME, ['name' => $name])->execute();
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$layoutresultrow = (new \App\Db\Query())->from(self::TABLENAME)->where(['name' => $layoutName])->one();
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Registering Layout $name ... DONE", __METHOD__);
- Exclude checks
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance()->createCommand();
- 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
* @param bool $directDownload
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip = \App\Zip::createFile($zipfilename);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Export Layout Handler.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $zipfilename
- 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
// Export as Zip
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('' === $zipfilename) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Initialize Export.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zipfilename = "$layoutName-" . date('YmdHis') . '.zip';
- 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
// Security check to ensure file is withing the web folder.
- 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->outputNode(date('Y-m-d H:i:s'), 'exporttime');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'label' => $label,
- 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 ($todir) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool $isdefault
- 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->update(self::TABLENAME, $params, ['id' => $resId])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __initExport($layoutName)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->__initExport($layoutName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip->addDirectory('layouts/' . $layoutName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
copy($zipfilename, $todir);
- 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->openNode('dependencies');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
const TABLENAME = 'vtiger_layout';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Copy module directory
- 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->closeNode('module');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->outputNode(\App\Version::get(), 'vtiger_version');
- 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
$resId = (new \App\Db\Query())->select(['id'])->from(self::TABLENAME)->where(['name' => $name])->scalar();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'isdefault' => ($isdefault) ? 1 : 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
\App\Log::trace("Deregistering Layout $name ... DONE", __METHOD__);
- 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 $layoutName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportLayout($layoutName);
- 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
\App\Db::getInstance()->createCommand()->delete(self::TABLENAME, ['name' => $name])->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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->__write("<?xml version='1.0'?>\n");
- 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
* Export Module as a zip file.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Call layout export function
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Add manifest file
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($directDownload) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function exportLayoutDependencies()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool $isactive
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// We will not allow registering core layouts unless forced
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip->addFile($this->__getManifestFilePath(), 'manifest.xml');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$layoutresultrow = (new \App\Db\Query())->from(self::TABLENAME)->where(['name' => $layoutName])->one();
- 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->outputNode($maxVersion, 'vtiger_max_version');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => $name,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'active' => ($isactive) ? 1 : 0,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params['id'] = \App\Db::getInstance()->getUniqueID(self::TABLENAME, 'id', false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::trace("Registering Layout $name ... DONE", __METHOD__);
- 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
Utils::checkFileAccessForInclusion("layouts/$layoutName/skins/style.less");
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $todir
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zipfilename = "$this->_export_tmpdir/$zipfilename";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip->download($layoutName);
- 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->openNode('module');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->outputNode($layoutname, 'name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('basic' == strtolower($name) && false === $overrideCore) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- 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 = \App\Db::getInstance()->createCommand();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->insert(self::TABLENAME, $params)->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function export($layoutName, $todir = '', $zipfilename = '', $directDownload = false)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->__finishExport();
- 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 $layoutName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$layoutlabel = \App\Purifier::decodeHtml($layoutresultrow['label']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->outputNode('layout', 'type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- 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->outputNode($layoutlabel, 'label');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function register($name, $label = '', $isdefault = false, $isactive = true, $overrideCore = false)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function deregister($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
* @param string $layoutName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip->close();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->__cleanupExport();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$layoutname = \App\Purifier::decodeHtml($layoutresultrow['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
* @param string $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
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$prefix = trim($prefix);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $label
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('basic' == strtolower($name)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Functions::recurseDelete('layouts' . \DIRECTORY_SEPARATOR . $name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false !== $maxVersion) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Register layout pack information.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportLayoutDependencies();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$params = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$maxVersion = 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
'lastupdated' => date('Y-m-d H:i:s'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function exportLayout($layoutName)
- 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
// Export dependency information
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Export vtiger dependencies.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->closeNode('dependencies');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool $overrideCore
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($resId) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
The method __initExport is not named in camelCase. Open
public function __initExport($layoutName)
{
// Security check to ensure file is withing the web folder.
Utils::checkFileAccessForInclusion("layouts/$layoutName/skins/style.less");
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}