qcubed/framework

View on GitHub
assets/php/examples/datagrid/qcheckboxcolumn.php

Summary

Maintainability
A
25 mins
Test Coverage

Function chkSelected_Click has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        protected function chkSelected_Click($strFormId, $strControlId, $params) {
            $blnChecked = $params['checked'];

            // The database record primary key is embedded after the last underscore in the id of the checkbox
            $idItems = explode('_', $params['id']);
Severity: Minor
Found in assets/php/examples/datagrid/qcheckboxcolumn.php - About 25 mins to fix

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 class ExampleForm has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
Open

class ExampleForm extends QForm {
        // Declare the DataGrid and Response Label
        protected $dtgPersons;
        protected $lblResponse;

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Missing class import via use statement (line '73', column '28').
Open

            $this->dtgPersons = new QDataGrid($this);

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 '101', column '37').
Open

            $this->dtgPersons->AddAction(new QHtmlTableCheckBoxColumn_ClickEvent(), new QAjaxAction ('chkSelected_Click'));

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 '76', column '24').
Open

            $objPaginator = new QPaginator($this->dtgPersons);

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 '157', column '29').
Open

            $this->dtgProjects = new QDataGrid($this);

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 '173', column '36').
Open

            $this->colProjectSelected = new ExampleCheckColumn2(QApplication::Translate('Select'));

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 '89', column '27').
Open

            $this->colSelect = new ExampleCheckColumn1('');

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 '67', column '29').
Open

            $this->lblResponse = new QLabel($this);

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 '101', column '80').
Open

            $this->dtgPersons->AddAction(new QHtmlTableCheckBoxColumn_ClickEvent(), new QAjaxAction ('chkSelected_Click'));

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 '161', column '40').
Open

            $this->dtgProjects->Paginator = new QPaginator($this->dtgProjects);

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 'QApplication' in method 'dtgProjects_Create'.
Open

            $this->dtgProjects->CreateNodeColumn(QApplication::Translate('Name'), QQN::Project()->Name);

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 'Project' in method 'dtgProjects_Bind'.
Open

            $this->dtgProjects->TotalItemCount = Project::CountAll();

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 'QQN' in method 'dtgPersons_Create'.
Open

            $this->dtgPersons->Watch(QQN::Person());

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 'QApplication' in method 'chkSelected_Click'.
Open

                    $strResponse = QApplication::HtmlEntities('You just deselected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');

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 'QApplication' in method 'chkSelected_Click'.
Open

                $strName = QApplication::HtmlEntities($objPerson->FirstName . ' ' . $objPerson->LastName);

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 'Person' in method 'GetAllIds'.
Open

            return Person::QueryPrimaryKeys();

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 'Project' in method 'SetItemCheckedState'.
Open

            $objProject = Project::Load($itemId);

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 SetItemCheckedState uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            {
                // Simulate unassociating the Project
                QApplication::DisplayAlert('Unassociating '.$objProject->Name);
            }

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

The method chkSelected_Click uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            else {
                $objPerson = Person::Load($intPersonId);

                // Let's respond to the user what just happened
                if ($blnChecked)

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 'QQ' in method 'dtgProjects_Bind'.
Open

                    QQ::SubSql(
                        'select 
                            project_id
                         from 
                             related_project_assn

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 'QApplication' in method 'chkSelected_Click'.
Open

                $strResponse = QApplication::HtmlEntities('You just selected all. ');

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 GetItemCheckedState uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            else {
                return false;
            }

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 'Person' in method 'dtgPersons_Bind'.
Open

            $this->dtgPersons->DataSource = Person::LoadAll(QQ::Clause(
                $this->dtgPersons->OrderByClause,
                $this->dtgPersons->LimitClause
            ));

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 'Person' in method 'chkSelected_Click'.
Open

                $objPerson = Person::Load($strId);

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 '198', column '8').
Open

        public function dtgProjects_Bind() {
            // Get Total Count b/c of Pagination
            $this->dtgProjects->TotalItemCount = Project::CountAll();

            $objClauses = array();

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 'Project' in method 'dtgProjects_Bind'.
Open

            $this->dtgProjects->DataSource = Project::LoadAll($objClauses);

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 'QQ' in method 'dtgProjects_Bind'.
Open

            $objClauses[] = QQ::Expand(
                QQ::Virtual('assn_item', 
                    QQ::SubSql(
                        'select 
                            project_id

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 'QApplication' in method 'SetItemCheckedState'.
Open

                QApplication::DisplayAlert('Associating '.$objProject->Name);

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 'QApplication' in method 'SetItemCheckedState'.
Open

                QApplication::DisplayAlert('Unassociating '.$objProject->Name);

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 'QApplication' in method 'dtgProjects_Create'.
Open

            $this->colProjectSelected = new ExampleCheckColumn2(QApplication::Translate('Select'));

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 '200', column '8').
Open

        public function dtgProjects_Bind() {
            // Get Total Count b/c of Pagination
            $this->dtgProjects->TotalItemCount = Project::CountAll();

            $objClauses = array();

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 'Person' in method 'dtgPersons_Bind'.
Open

            $this->dtgPersons->TotalItemCount = Person::CountAll();

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 'QApplication' in method 'chkSelected_Click'.
Open

                    $strResponse = QApplication::HtmlEntities('You just selected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');

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 'QQN' in method 'dtgProjects_Create'.
Open

            $this->dtgProjects->Watch(QQN::Project());

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 'Person' in method 'chkSelected_Click'.
Open

                $objPerson = Person::Load($intPersonId);

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 'QQ' in method 'dtgProjects_Bind'.
Open

                QQ::Virtual('assn_item', 
                    QQ::SubSql(
                        'select 
                            project_id
                         from 

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 'QQ' in method 'dtgPersons_Bind'.
Open

            $this->dtgPersons->DataSource = Person::LoadAll(QQ::Clause(
                $this->dtgPersons->OrderByClause,
                $this->dtgPersons->LimitClause
            ));

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 '$strFormId'.
Open

        protected function chkSelected_Click($strFormId, $strControlId, $params) {

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 '$strControlId'.
Open

        protected function chkSelected_Click($strFormId, $strControlId, $params) {

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

The parameter $_ITEM is not named in camelCase.
Open

        public function colProjectSelectedCheckbox_Created(Project $_ITEM, QCheckBox $ctl)
        {
            //If it's related to ACME, start it off checked
            if(null !== $_ITEM->GetVirtualAttribute('assn_item'))
                $ctl->Checked = true;

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The variable $_ITEM is not named in camelCase.
Open

        public function colProjectSelectedCheckbox_Created(Project $_ITEM, QCheckBox $ctl)
        {
            //If it's related to ACME, start it off checked
            if(null !== $_ITEM->GetVirtualAttribute('assn_item'))
                $ctl->Checked = true;

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method dtgPersons_Bind is not named in camelCase.
Open

        protected function dtgPersons_Bind() {
            // Let the datagrid know how many total items and then get the data source
            $this->dtgPersons->TotalItemCount = Person::CountAll();
            $this->dtgPersons->DataSource = Person::LoadAll(QQ::Clause(
                $this->dtgPersons->OrderByClause,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method dtgPersons_Create is not named in camelCase.
Open

        protected function dtgPersons_Create() {
            // Define the DataGrid
            $this->dtgPersons = new QDataGrid($this);

            // Specify Pagination with 10 items per page

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method GetAllIds is not named in camelCase.
Open

        protected function GetAllIds()
        {
            return Person::QueryPrimaryKeys();
        }

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method GetItemCheckedState is not named in camelCase.
Open

        protected function GetItemCheckedState ($item) {
            if(null !== $item->GetVirtualAttribute('assn_item')) {
                return true;
            }
            else {

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method dtgProjects_Bind is not named in camelCase.
Open

        public function dtgProjects_Bind() {
            // Get Total Count b/c of Pagination
            $this->dtgProjects->TotalItemCount = Project::CountAll();

            $objClauses = array();

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method dtgProjects_Create is not named in camelCase.
Open

        protected function dtgProjects_Create() {
            // Setup DataGrid
            $this->dtgProjects = new QDataGrid($this);
            $this->dtgProjects->CssClass = 'datagrid';

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method colProjectSelectedCheckbox_Created is not named in camelCase.
Open

        public function colProjectSelectedCheckbox_Created(Project $_ITEM, QCheckBox $ctl)
        {
            //If it's related to ACME, start it off checked
            if(null !== $_ITEM->GetVirtualAttribute('assn_item'))
                $ctl->Checked = true;

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method Form_Create is not named in camelCase.
Open

        protected function Form_Create() {

            $this->dtgPersons_Create();
            $this->dtgProjects_Create();

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method chkSelected_Click is not named in camelCase.
Open

        protected function chkSelected_Click($strFormId, $strControlId, $params) {
            $blnChecked = $params['checked'];

            // The database record primary key is embedded after the last underscore in the id of the checkbox
            $idItems = explode('_', $params['id']);

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method SetItemCheckedState is not named in camelCase.
Open

        public function SetItemCheckedState($itemId, $blnChecked) {
            $objProject = Project::Load($itemId);
            if($blnChecked)
            {
                // Simulate an associating with the project

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status