Function importLayout
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
- 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
Method importLayout
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
The method importLayout() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Refactor this function to reduce its Cognitive Complexity from 31 to the 15 allowed. Open
public function importLayout($zipfile)
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
The method initImport has a boolean flag argument $overwrite, which is a certain sign of a Single Responsibility Principle violation. Open
public function initImport($zipfile, $overwrite = true)
- 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 import has a boolean flag argument $overwrite, which is a certain sign of a Single Responsibility Principle violation. Open
public function import($zipfile, $overwrite = 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
Remove error control operator '@' on line 108. Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method update has a boolean flag argument $overwrite, which is a certain sign of a Single Responsibility Principle violation. Open
public function update($instance, $zipfile, $overwrite = true)
- 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
Avoid using static access to class '\App\Config' in method 'importLayout'. Open
$zip = \App\Zip::openFile($zipfile, ['illegalExtensions' => array_diff(\App\Config::main('upload_badext'), ['js'])]);
- 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 'importLayout'. Open
\App\Log::trace("Importing $name ... STARTED", __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
The method importLayout uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
\App\Log::trace("Copying file $fileName ... SKIPPED", __METHOD__);
}
- 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 'importLayout'. Open
\App\Log::trace("Incorrect file $fileName ... SKIPPED", __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\Log' in method 'importLayout'. Open
\App\Log::trace("Copying file $fileName ... FAILED", __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\Zip' in method 'importLayout'. Open
$zip = \App\Zip::openFile($zipfile, ['illegalExtensions' => array_diff(\App\Config::main('upload_badext'), ['js'])]);
- 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 importLayout uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
\App\Log::trace("Incorrect file $fileName ... SKIPPED", __METHOD__);
}
- 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 'importLayout'. Open
\App\Log::trace("Importing $name($label) ... 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
The method importLayout uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
\App\Log::trace("Copying file $fileName ... FAILED", __METHOD__);
}
- 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 'importLayout'. Open
\App\Log::trace("Copying file $fileName ... 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\Log' in method 'importLayout'. Open
\App\Log::trace("Copying file $fileName ... SKIPPED", __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 unused parameters such as '$overwrite'. Open
public function initImport($zipfile, $overwrite = true)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$instance'. Open
public function update($instance, $zipfile, $overwrite = true)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Copying file $fileName ... SKIPPED", __METHOD__);
- Exclude checks
Unused property Open
$this->_export_tmpdir;
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string Zip file name':
after string,
did not see an element name (will guess based on comment order) Open
* @param string Zip file name
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool True for overwriting existing module':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool True for overwriting existing module
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool True for overwriting existing module':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool True for overwriting existing module
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Copying file $fileName ... FAILED", __METHOD__);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string Zip file name':
after string,
did not see an element name (will guess based on comment order) Open
* @param string Zip file name
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Importing $name($label) ... DONE", __METHOD__);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param object Instance of Layout':
after object,
did not see an element name (will guess based on comment order) Open
* @param object Instance of Layout
- Exclude checks
Call to undeclared method \App\Zip::checkFile
Open
if (!$zip->checkFile($fileName)) {
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Copying file $fileName ... DONE", __METHOD__);
- Exclude checks
Call to method trace
from undeclared class \App\Log
Open
\App\Log::trace("Incorrect file $fileName ... SKIPPED", __METHOD__);
- Exclude checks
This branch's code block is the same as the block for the branch on line 96. Open
elseif (0 === stripos($targetdir, "layouts/$name/libraries")) {
$vtiger6format = true;
$dounzip = true;
}
- Read upRead up
- Exclude checks
Having two cases
in a switch
statement or two branches in an if
chain with the same implementation is at
best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then in an if
chain they should
be combined, or for a switch
, one should fall through to the other.
Noncompliant Code Example
switch ($i) { case 1: doSomething(); break; case 2: doSomethingDifferent(); break; case 3: // Noncompliant; duplicates case 1's implementation doSomething(); break; default: doTheRest(); } if ($a >= 0 && $a < 10) { doTheThing(); else if ($a >= 10 && $a < 20) { doTheOtherThing(); } else if ($a >= 20 && $a < 50) { doTheThing(); // Noncompliant; duplicates first condition } else { doTheRest(); } if ($b == 0) { doOneMoreThing(); } else { doOneMoreThing(); // Noncompliant; duplicates then-branch } var b = a ? 12 > 4 : 4; // Noncompliant; always results in the same value
Compliant Solution
switch ($i) { case 1: case 3: doSomething(); break; case 2: doSomethingDifferent(); break; default: doTheRest(); } if (($a >= 0 && $a < 10) || ($a >= 20 && $a < 50)) { doTheThing(); else if ($a >= 10 && $a < 20) { doTheOtherThing(); } else { doTheRest(); } doOneMoreThing(); b = 4;
or
switch ($i) { case 1: doSomething(); break; case 2: doSomethingDifferent(); break; case 3: doThirdThing(); break; default: doTheRest(); } if ($a >= 0 && $a < 10) { doTheThing(); else if ($a >= 10 && $a < 20) { doTheOtherThing(); } else if ($a >= 20 && $a < 50) { doTheThirdThing(); } else { doTheRest(); } if ($b == 0) { doOneMoreThing(); } else { doTheRest(); } int b = a ? 12 > 4 : 8;
Exceptions
Blocks in an if
chain that contain a single line of code are ignored, as are blocks in a switch
statement that contain a
single line of code with or without a following break
.
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool True for overwriting existing module
- 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->importLayout($zipfile);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool True for overwriting existing module
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $zipfile
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$targetfile = basename($fileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Import Layout.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$targetdir = substr($fileName, 0, strripos($fileName, '/'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_export_tmpdir;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $zipfile
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Call module import function
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Update Layout from zip file.
- 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
} // vtiger6 format
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dounzip = 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
* @param string Zip file name
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initImport($zipfile, $overwrite);
- 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
$vtiger6format = 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
parent::__construct();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $overwrite
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getModuleNameFromZip($zipfile);
- 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
$fileName = $zip->getNameIndex($i);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
elseif (0 === stripos($targetdir, "layouts/$name/libraries")) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$vtiger6format = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
@mkdir($targetdir, 0755, true);
- 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
/**
- 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 (false !== $zip->unzipFile($fileName, "$targetdir/$targetfile")) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $instance
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function update($instance, $zipfile, $overwrite = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$zip = \App\Zip::openFile($zipfile, ['illegalExtensions' => array_diff(\App\Config::main('upload_badext'), ['js'])]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$zip->isdir($fileName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::register($name, $label);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Initialize Import.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function initImport($zipfile, $overwrite = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Import Module from zip file.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string Zip file name
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->import($zipfile, $overwrite);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$vtiger6format = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
for ($i = 0; $i < $zip->numFiles; ++$i) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false === strpos($fileName, '/')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($dounzip) {
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $zipfile
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function importLayout($zipfile)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$name = $this->_modulexml->name;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::trace("Importing $name ... STARTED", __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
public function import($zipfile, $overwrite = false)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$label = $this->_modulexml->label;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip = \App\Zip::openFile($zipfile, ['illegalExtensions' => array_diff(\App\Config::main('upload_badext'), ['js'])]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dounzip = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} //case handling for the special library files
- 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
$targetdir = "layouts/$name/" . str_replace("layouts/$name", '', $targetdir);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$zip->checkFile($fileName)) {
- 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
$dounzip = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$vtiger6format = 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
\App\Log::trace("Copying file $fileName ... 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Constructor.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $overwrite
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param object Instance of Layout
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Case handling for jscalendar
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $overwrite
- 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("Copying file $fileName ... FAILED", __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
continue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dounzip = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
elseif (0 === stripos($targetdir, "layouts/$name/modules")) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($vtiger6format) {
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($zip) {
- 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
\App\Log::trace("Incorrect file $fileName ... SKIPPED", __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
}
- 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 mixed $zipfile
- 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 === stripos($targetdir, "layouts/$name/skins")) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// vtiger6 format
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::trace("Importing $name($label) ... DONE", __METHOD__);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::trace("Copying file $fileName ... SKIPPED", __METHOD__);
- Exclude checks