YetiForceCompany/YetiForceCRM

View on GitHub
modules/com_vtiger_workflow/VTWorkflowApplication.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Avoid using static access to class '\App\Request' in method '__construct'.
Open

        $this->returnUrl = \App\Request::_getServer('REQUEST_URI');

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');

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';

Reference to undeclared property \VTWorkflowApplication->returnUrl (Did you mean \VTWorkflowApplication->returnUrl() or $returnUrl)
Open

        $this->returnUrl = $returnUrl;

Reference to undeclared property \VTWorkflowApplication->request (Did you mean $_REQUEST)
Open

        $this->request;

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=deletetask$idPart&return_url=" . urlencode($this->returnUrl());

Reference to undeclared property \VTWorkflowApplication->returnUrl (Did you mean \VTWorkflowApplication->returnUrl())
Open

        $this->returnUrl = \App\Request::_getServer('REQUEST_URI');

Unused property
Open

        $this->request;

Reference to undeclared property \VTWorkflowApplication->label
Open

        $this->label = 'Workflow';

Reference to undeclared property \VTWorkflowApplication->returnUrl (Did you mean \VTWorkflowApplication->returnUrl())
Open

        return $this->returnUrl;

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=editworkflow$idPart&return_url=" . urlencode($this->returnUrl());

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=workflowlist";

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=edittask$idPart&return_url=" . urlencode($this->returnUrl());

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=errormessage&message=" . urlencode($message);

Reference to undeclared property \VTWorkflowApplication->action (Did you mean $action)
Open

        $this->action = $action;

Reference to undeclared property \VTWorkflowApplication->name
Open

        return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=" . urlencode($this->returnUrl());

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class VTWorkflowApplication

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function deleteTaskUrl($id)

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)

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)

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)

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()

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $idPart = "&workflow_id=$id";

Spaces must be used to indent lines; tabs are not allowed
Open

        return "index.php?module={$this->name}&action=errormessage&message=" . urlencode($message);

Spaces must be used to indent lines; tabs are not allowed
Open

    public function __construct($action)

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        if (null !== $id) {

Line exceeds 120 characters; contains 121 characters
Open

        return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=" . urlencode($this->returnUrl());

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->returnUrl;

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->returnUrl = $returnUrl;

Spaces must be used to indent lines; tabs are not allowed
Open

    {

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());

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->name = 'com_vtiger_workflow';

Spaces must be used to indent lines; tabs are not allowed
Open

    public function deleteTaskUrl($id)

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->action = $action;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function editWorkflowUrl($id = null)

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->request;

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    public function deleteWorkflowUrl($id)

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function errorPageUrl($message)

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->returnUrl = \App\Request::_getServer('REQUEST_URI');

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function editTaskUrl($id = null)

Spaces must be used to indent lines; tabs are not allowed
Open

        if (null !== $id) {

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());

Spaces must be used to indent lines; tabs are not allowed
Open

        return \App\Request::_getServer('REQUEST_URI');

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

            $idPart = "&task_id=$id";

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

            $idPart = "&workflow_id=$id";

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());

Spaces must be used to indent lines; tabs are not allowed
Open

    public function currentUrl()

Spaces must be used to indent lines; tabs are not allowed
Open

    public function returnUrl()

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());

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function setReturnUrl($returnUrl)

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->label = 'Workflow';

Spaces must be used to indent lines; tabs are not allowed
Open

        return "index.php?module={$this->name}&action=workflowlist";

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        $idPart = "&task_id=$id";

There are no issues that match your filters.

Category
Status