Method setDataFromRequest
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
Function setDataFromRequest
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- 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
The method setDataFromRequest() has an NPath complexity of 2016. The configured NPath complexity threshold is 200. Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method setDataFromRequest() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10. Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- 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 22 to the 15 allowed. Open
public function setDataFromRequest(App\Request $request)
- 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
Missing class import via use statement (line '35', column '14'). Open
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
- 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 '86', column '25'). Open
$pagingModel = new \Vtiger_Paging_Model();
- 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 '116', column '16'). Open
throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');
- 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\Condition' in method 'setDataFromRequest'. Open
$searchParams = \App\Condition::validSearchParams($this->moduelName, $request->getArray('search_params'));
- 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\Condition' in method 'setDataFromRequest'. Open
$queryGenerator->setAdvancedConditions(\App\Condition::validAdvancedConditions($advancedConditions));
- 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 assigning values to variables in if clauses and the like (line '77', column '7'). Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\App\Condition' in method 'setDataFromRequest'. Open
if ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {
- 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 assigning values to variables in if clauses and the like (line '108', column '10'). Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\App\Config' in method 'setDataFromRequest'. Open
$exportLimit = \App\Config::performance('MAX_NUMBER_EXPORT_RECORDS');
- 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 assigning values to variables in if clauses and the like (line '71', column '20'). Open
public function setDataFromRequest(App\Request $request)
{
if ($request->has('xmlExportType')) {
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\App\Config' in method 'process'. Open
->setLimit(\App\Config::performance('MAX_NUMBER_EXPORT_RECORDS'))
- 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 'Users_Privileges_Model' in method 'checkPermission'. Open
$userPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
- 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
Call to method exportData
from undeclared class \App\Export\ExportRecords
Open
$this->exportModel->exportData();
- Exclude checks
Call to method getQueryGenerator
from undeclared class \App\Export\ExportRecords
Open
$queryGenerator = $this->exportModel->getQueryGenerator();
- Exclude checks
Reference to instance property fullData
from undeclared class \App\Export\ExportRecords
Open
$this->exportModel->fullData = true;
- Exclude checks
Call to method setLimit
from undeclared class \App\Export\ExportRecords
Open
$this->exportModel->setLimit($limit);
- Exclude checks
Property \Vtiger_ExportData_Action->exportModel
has undeclared type \App\Export\ExportRecords
Open
protected $exportModel;
- Exclude checks
Call to method sendHttpHeader
from undeclared class \App\Export\ExportRecords
Open
$this->exportModel->sendHttpHeader();
- Exclude checks
Call to method setTemplate
from undeclared class \App\Export\ExportRecords
Open
$this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
- Exclude checks
Identical blocks of code found in 2 locations. Consider refactoring. Open
case 'ExportSelectedRecords':
$selectedIds = $request->getArray('selected_ids', \App\Purifier::ALNUM);
if ($selectedIds && 'all' !== $selectedIds[0]) {
$queryGenerator->addCondition('id', $selectedIds, 'e');
}
- 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 135.
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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Vtiger_ExportData_Action extends Vtiger_Mass_Action
- Exclude checks
The class Vtiger_ExportData_Action is not named in CamelCase. Open
class Vtiger_ExportData_Action extends Vtiger_Mass_Action
{
/** @var string Module name */
protected $moduelName;
/** @var \App\Export\ExportRecords Export model instance */
- 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
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\NoPermitted
- 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
$queryGenerator->setStateCondition($request->getByType('entityState'));
- 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 (!$userPrivilegesModel->hasModuleActionPermission($this->moduelName, 'Export')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->setLimit(\App\Config::performance('MAX_NUMBER_EXPORT_RECORDS'))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setDataFromRequest(App\Request $request)
- 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
case 'ExportSelectedRecords':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition('id', $excludedIds, 'n');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($operator && $searchValue && $searchKey) {
- 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
Line exceeds 120 characters; contains 220 characters Open
if ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator = $this->exportModel->getQueryGenerator();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'ExportCurrentPage':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportModel->setLimit($limit);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->setLimit($limit)
- 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->exportModel->sendHttpHeader();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Set condition data in export model.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $pagingModel->getPageLimit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition($searchKey, $searchValue, $operator);
- 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
protected $moduelName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- 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 ($excludedIds = $request->getArray('excluded_ids', \App\Purifier::INTEGER)) {
- 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->setDataFromRequest($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$exportLimit = \App\Config::performance('MAX_NUMBER_EXPORT_RECORDS');
- 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->moduelName = $request->getModule();
- 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
$searchKey = $request->getByType('search_key', \App\Purifier::ALNUM);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pagingModel = new \Vtiger_Paging_Model();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $exportLimit;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$offset = ($currentPage - 1) * $limit;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedIds = $request->getArray('selected_ids', \App\Purifier::ALNUM);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($selectedIds && 'all' !== $selectedIds[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
$userPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function process(App\Request $request)
- 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
$cvId = $request->getInteger('viewname');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($advancedConditions = $request->has('advancedConditions') ? $request->getArray('advancedConditions') : []) {
- 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 to check permission.
- 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
Line exceeds 120 characters; contains 138 characters Open
$this->exportModel = \App\Export\Records::getInstance($this->moduelName, $request->getByType('export_type', \App\Purifier::ALNUM))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->setFormat(\App\Export\Records::EXPORT_FORMAT);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$operator = $request->isEmpty('operator') ? '' : $request->getByType('operator');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($operator && $searchValue && $searchKey) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition($searchKey, $searchValue, $operator);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportModel->exportData();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->initForCustomViewById($cvId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->setAdvancedConditions(\App\Condition::validAdvancedConditions($advancedConditions));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function is called by the controller.
- 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->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($limit > $exportLimit) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->parseAdvFilter($queryGenerator->parseBaseSearchParamsToCondition($searchParams));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
default:
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var \App\Export\ExportRecords Export model instance */
- 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
protected $exportModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportModel->fullData = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($request->has('xmlExportType')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$searchParams = \App\Condition::validSearchParams($this->moduelName, $request->getArray('search_params'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->parseAdvFilter($queryGenerator->parseBaseSearchParamsToCondition($searchParams));
- 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
/** @var string Module name */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exportModel = \App\Export\Records::getInstance($this->moduelName, $request->getByType('export_type', \App\Purifier::ALNUM))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
switch ($request->getMode()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'ExportAllData':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$currentPage = $request->getInteger('page', 1) ?: 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function checkPermission(App\Request $request)
- 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 ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->setOffset($offset)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition('id', $selectedIds, 'e');
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
default:
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
case 'ExportCurrentPage':
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
case 'ExportSelectedRecords':
- Exclude checks
Class name "Vtiger_ExportData_Action" is not in camel caps format Open
class Vtiger_ExportData_Action extends Vtiger_Mass_Action
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($operator && $searchValue && $searchKey) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($limit > $exportLimit) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
case 'ExportAllData':
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($excludedIds = $request->getArray('excluded_ids', \App\Purifier::INTEGER)) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($operator && $searchValue && $searchKey) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
if ($selectedIds && 'all' !== $selectedIds[0]) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Closing brace indented incorrectly; expected 8 spaces, found 12 Open
}
- Exclude checks