Avoid using static access to class '\App\Request' in method '__construct'. Open
$this->returnUrl = \App\Request::_getServer('REQUEST_URI');
- 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\Request' in method 'currentUrl'. Open
return \App\Request::_getServer('REQUEST_URI');
- 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
Reference to undeclared property \VTWorkflowApplication->name
Open
$this->name = 'com_vtiger_workflow';
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->returnUrl
(Did you mean \VTWorkflowApplication->returnUrl() or $returnUrl) Open
$this->returnUrl = $returnUrl;
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->request
(Did you mean $_REQUEST) Open
$this->request;
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=deletetask$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->returnUrl
(Did you mean \VTWorkflowApplication->returnUrl()) Open
$this->returnUrl = \App\Request::_getServer('REQUEST_URI');
- Exclude checks
Unused property Open
$this->request;
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->label
Open
$this->label = 'Workflow';
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->returnUrl
(Did you mean \VTWorkflowApplication->returnUrl()) Open
return $this->returnUrl;
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=editworkflow$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=workflowlist";
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=edittask$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=errormessage&message=" . urlencode($message);
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->action
(Did you mean $action) Open
$this->action = $action;
- Exclude checks
Reference to undeclared property \VTWorkflowApplication->name
Open
return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class VTWorkflowApplication
- Exclude checks
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function deleteTaskUrl($id)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function editWorkflowUrl($id = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function editTaskUrl($id = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function deleteWorkflowUrl($id)
- 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
public function listViewUrl()
- 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
$idPart = "&workflow_id=$id";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=errormessage&message=" . urlencode($message);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct($action)
- 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 (null !== $id) {
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=" . urlencode($this->returnUrl());
- 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
return $this->returnUrl;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->returnUrl = $returnUrl;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=deletetask$idPart&return_url=" . urlencode($this->returnUrl());
- 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->name = 'com_vtiger_workflow';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function deleteTaskUrl($id)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->action = $action;
- 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 editWorkflowUrl($id = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->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
public function deleteWorkflowUrl($id)
- 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
public function errorPageUrl($message)
- 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->returnUrl = \App\Request::_getServer('REQUEST_URI');
- 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 editTaskUrl($id = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (null !== $id) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=edittask$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Request::_getServer('REQUEST_URI');
- 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
$idPart = "&task_id=$id";
- 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
$idPart = "&workflow_id=$id";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=" . urlencode($this->returnUrl());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function currentUrl()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function returnUrl()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=editworkflow$idPart&return_url=" . urlencode($this->returnUrl());
- 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 setReturnUrl($returnUrl)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->label = 'Workflow';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return "index.php?module={$this->name}&action=workflowlist";
- 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
$idPart = "&task_id=$id";
- Exclude checks